When I change a 3d objects gltf path to something else, the current model does not change in the editor without saving and reloading Construct again. Is there a trick or work around to make it show the new paths object without reloading Construct? Like some sort of refresh but without refreshing whole site.
Yes, that's an old issue, having to do with the unsophisticated ( :) ) way I did the model loading in the editor. I'll put that one back on my list to take a look at, it would be a nice QoL thing.
Would be very nice. Also, idk if possible but, when replacing a object with same name would be amazing. Constantly editing in blender and overwriting the same object to make stuff match each other lol.
When you make a edit in blender for your model (like color change) and you replace the glb with the edited one. The change doesn't update in the editor.
Ah, I see. I'll need to check if I can detect that. Before that, I have on my list updating when the file name changes. If that becomes available, this should be doable also.
Hey! happy to say that with the newest update with webview2 comes with no errors exporting with workers enabled. For comparison, this is my exported game with the latest nw.js. BLACK SCREEN + CREATEOBJURL ERROR. So happy to finally ditch nw.js lol. My game actually feels a lot smoother too.
Still broken, but I see Ashley responded. Would still be cool to have this fix to have different export options, and nw.js still is the only one with transparent steam overlay.
any way to make sides like this to look like flat shading? kinda like this but nicer lol.this would be a cool addition to ssao, i put sampling at .1 and moving camera left to right looks pretty cool.
kind of, but the big issue is that ground plane angle is typically such that it gets heavy ao applied too, so the ground becomes dark, which I imagine you don't want. Will look a bit more over time, but definitely don't count on it. Of course an alternative is to use the flat lighting ACEs on 3DObjects directly.
Try setting the original texture in the model to nearest and use a low resolution texture and have the project also run nearest. In addition, you may try adding some slight jitter to the camera view.
I love your plugin, thank you for creating it, I'm trying to upload my file to construct 3 arcade but since I can't upload 3D models I'm trying to get the models to load by uploading them to a url, how can I upload a model through the url, I've tried everything in google drive dropbox but it does not recognize the file when entering the url, some help please, I am developing a 3D multiplayer game
To upload to c3 arcade, try adding an additional. ".txt" to the glb/gltf filename in the project and change path to match. Good luck with your game, send a link when you can.
You may also need to use gltf format instead of glb.
Thank you very much, I was able to upload the game thanks to your mode, my game still has a long way to go and bugs to resolve since it is the alpha version, it is only the bases, Thank you very much. I send you the link
No, it does not interact with 3D Shape. You can make models of the same geometry as 3D shape and load yhem into 3D Object and do the rotation as needed.
the vertex rounding is so cool! since the ps1 graphics is popular right now. would this effect only work with models with animation? does non animated stuff like walls or buildings work? will test after i build my pc
You might want to do some other things too, like lock the 3DCamera to rounded x,y,z coordinates, similar for object locations, similar for rotation angles and camera angles, try it out!
Just saw and tested this, I love this look! I can't get it to work on trees or walls without animations though. Is this possible like in this video? At 3:50. Or something that makes textures look crooked. Tried rounding stuff, nothing really worked out.
You have to turn it off when the object isn't near your camera view. You wont notice this from a distance anyway. Without turning it off though, around 15 highish poly animated models(8k+tri) onscreen at once, the cpu is 10%-15% increase and fps drop is up to 15-20. I don't know if its the same with non animated stuff, I can't get it to work to test. Haven't tested with low poly models either. Should be pretty good performance unless your making a game with 50+ enemies on screen at once, which would probably still be okay with lower poly's and good optimization techniques.
I'll just use blender and move uv around for crooked textures. I gave the buildings a tiny animation that move sideways, now to just stop it when camera isn't moving much. Pretty sure this isn't the best way to do this but it still works lol. Will definitely use this to create ps1 style game after my main game.
Right, the textures in PS1 are not perspective correct, perhaps you can play with 3D Camera FOV (dynamically?) and also changing between orthogonal and perspective for the 3DCamera
intersting to looking a 3d mesh point from your project uploaded, but i still did not know how to set point on a node? i try to download the model and import it on blender i thought its from origin but its not, any advice?
Ah, I see. We can't change the vertex shader, but we could play with vertex values on the CPU. So would take some CPU perf to do it, I'll take a look. Adding to the list for later.
I dont really understand the new update. I guess top level means the first of the hierarchy which would be the Armature? Does it mean, for performance, that we should leave all rotation and location to 0 and scale to 1? If so, is it ok to just Apply All Transforms before exporting?
This is really only for skinned meshes that need to be transformed by the root transforms, I will review again and make sure that it has no perf impact on other cases. So, if your models worked fine for this change, you will not need to do anything.
Hi, Is it possible to use UV Offset to move this around like my model is changing face expressions? The one in the Uv Offset lava example is always scrolling.
Yeah sorry lol, I was using 1 and -1 so I wasn't seeing a difference. This is really nice for cartoony style models. Here is a test with Jet Set Radio character. With SSAO.
new update broke my debug preview.it freezes if in debug,but works in normal preview. also the weirdest thing is happening with my bullets. the 3d bullets do not show when i shoot, but if i delete my player model, they show again. everything works perfect in previous version. here is console,
1. if player1 spawn is outside the layout, the console has errors
2.if player1spawn is inside the layout, the console has NO error
3.if the 3d model's worker animation is OFF, the console has NO errors if spawn is inside or outside the layout.
so basically the error only shows for 3d objects with worker ON and OUTSIDE the layout. this is also the reason my game freezes in debug mode when using camera with lerp while 3d worker objects are not in view. it could also be the reason my 3d bullets are acting weird and not loading if 3d worker model is also in layout. if not i will try to reproduce in a new test.
i found out its not only on spawn. if every model with worker is on screen its fine until 1 of them goes out of view then all freezes and error pops up.
Nice. I noticed this problem too, when worker object is not on screen, every objects animations just stops. New stuff I spawn after that does not render. If I do the same thing in Debug, the whole game just stops/freezes.
Me again, to report a bug or something that could be improved with the plugin.
Right now, if you set Z elevation in a 3DObject Properties, it is not displayed correctly in Constructs editor preview window.
For example, I created a 3DShape object (the grey slope) as I use for topology purposes. Set it's Common properties Z elevation to 32
Then I created a 3D model of stairs, set it's properties Z elevation to 32, yet in preview, the 3DSHAPE renders at 32, the stairs still renders at 0.
In game it works fine, stairs AND grey topology slope are rendered at 32.
But for a level building point of view it could be complicated if every 3D object is not rendered at the right Z elevation in editor. It's working in the dark.
One idea could be to move the Z elevation setting from Properties to Common so it gets rendered correctly.
Else maybe there's a way for the editor to render it at the correct z elevation without moving the setting. Don't know.
An easier way to build levels is to just keep them all at 0 in the editor and set the z elevation for both objects with events at start of layout. Or use hierarchies so you would only need to set 1 objects z elevation. If your going to make objects with higher z elevations, its really hard to see whats happening in the editor or if everything is aligned correctly.
Thanks a lot ! Sadly there's still a small bug. Now the item renders at twice the Z elevation set. For example I made a small gif. I created two 3D Objects cube, that have a scale of 16. So, If I set a Z Elevation of 16 to one of the cubes, it should render at the height of the first cube. Yet it seems to render at twice that Z Elevation. The 3DObject blue selection square is located at the right position tho. I tried with different scales, but even with a scale of 1, the issue is still there, so it's not scale related. I don't know exactly where the problem is, but there's a x2 somewhere :p.
Good to notice it's only editor related, in game it renders at the correct Z Elevation.
Don't be too sad :) We got this! Thanks for the great bug report and gif. It is always so helpful to get detailed reports like this. I am a one person operation for this particular project, so I really rely on good community feedback.
A new version is going up now. Please let me know if it fixes this issue for you.
I just want to give an update on the error with exporting to NW.js. I said before it doesn't work with 3dObjects, but it does. As long as "Use worker" is turned off in Project Properties, 3dObjects are working even with worker animations on. I dont see much difference in performance, but idk how stable it is. Use this work around with caution I guess.
Lol, I always have that setting to off. For some reason, I get MORE fps with it off.
EDIT: With my crash test file, I get 144fps with it off, and 120 fps with it on. No idea why. Maybe it only helps with stuttering, like micro fps freezes or something.
2nd question : is there a way to set only outside faces render, as I want to add a outline style to my 3D models (by duplicating the meshes, lil' scale, and black texture), but for this to work I have to be able to set visible only outside of faces textures
I see, sorry I don't see a way of doing this in 3DObject right now. It will look different, but you might try applying one of the C3 'outline' effects to the object and see if this different style of outline will work.
You cannot turn them off during runtime and I would not expect them to free memory when off screen. However, they should require very little CPU when offscreen, since the animation and lighting is not being updated. I will check and make sure this is true when lighting is active also.
Ah ok, thought so. I dont have lighting at all yet, and all is running smooth at 144fps. It's just the memory problem that starts building up until the crash. Will test on earlier versions of Chrome later.
I have a problem when I use worker mode for an object. I can get around 200 of the same models on screen at once without lag but the game crashes after running it for around 5 minutes or so. Seems to be a memory leak? I get this error on the games window.
SBOX_FATAL_MEMORY_EXCEEDED
Here is a test demo, I only have 16gb ram might take a bit longer for other to get the error.
EDIT: Lowering animation rate or having the objects offscreen does NOT help at all, still crashes. It only prolongs the amount of time that goes by before it crashes. Also exporting with nwjs, the game window simply closes after a while.
My game has 1 enemy monster so far thats 256 tris and a texture of 128x128. The crash happens with 300 of them even when my fps was at max 144 still with no drops.
EDIT: Reuploaded a better test that's 250 models and 144 fps with worker crash.
I see the crash. After a little research, it _may_ be a chrome bug that gets fixed in chrome 115 when available. I will keep an eye on this when that version releases.
This also may be another bug/issue with chrome and workers where they don't do reliable GC. In fact, I see that if I do manual forcing of GC through Chrome dev tools, I can stop the crash from happening.
I've seen bug reports on this, but no resolution in chrome yet. I will look at this one possible solution which requires the workers to be terminated and created again. I'm not sure what they will do w/ perf and we'll see if it's actually viable.
Yep its not fixed even in Chrome Canary which is 117, also tried as far back as Chromium 97 same results. Hope your fix helps!
EDIT: In the test that crashes with 250 objects, I was able to get up to 300 objects at 60fps without crashing if I split it up, 150 workers and 150 nonworkers. So having 2 of the same type of enemies in a Object Bank layer, I can split them up while spawning. Not perfect but works ok for now. Will try to see if prefab instances, destroying 3d objects offscreen and respawning onscreen helps with memory.
ran similar test with my game. With 60 worker objects,I saw memory go from 800 to 2400. But after 10 or 15 min it went back down to 1600. From there on for about an hour i see it going to 2200 then back down to 1600 again, it just hovers around those numbers.pretty low % so it does not crash at all at these low numbers.
if i push the limits with 150+ objects. it does crash pretty fast in 10 -15 seconds, same error u have. i also got 16gb
in your test, lowering animation rate from 30 to 2 does help a lot, it lowered memory usage by almost 30% and does not crash, BUT any rate over 10 still crashes. so maybe it could help if u set offscreen objects to animation rate 0. and onscreen farther away objects to like 5 where you wont be able to tell.
what kind of game are you makin btw with 300 monsters o,o im guessing hack n slash game?
Your right, setting rate to anything under 5 helps a bit, but anything under 10 or even 15 looks bad even from far away lol. With rate at 5, I crash at 350 instead of at 300 enemies.
I was making a platformer similar to the game Toree, but as I was adding more and more stuff to the game it then changed to an action game lol.
hi, me again, if I have a 3D model with multiple items, like hats, weapons etc. Is there a way to set visible or invisible parts of a 3D model using actions in construct ?
Hi thx for your work, I have a problem with the addon, I have a 3D model made with Blockbench, exported the gltf with embed texture, it loads perfectly fine with Babylon but I can't make it work in Construct. It's invisible.
Thx for your answer :) Sadly I don't find how to disconnect alpha node in Blockbench. Does it mean I have to go through blender after exporting it with blockbench to disconnect alpha node in order to make my models visible in Construct ? Isn't there a way to build and export models usable by this addon using only blockbench ? Thx again !
Hello, Is there a way to set a sprites width and height to a 3d objects bounding box size? I want to add collision boxes and have the parented sprite match the 3d object on startup.
EDIT: Its hard to match the sprites size with the buildings in the editor lol.
I have a doubt, in an isometric topdown project, where only the characters, npcs will be 3d would it be possible to reach something professional using the plugin, taking into account having an average of 500 to 1k of 3d models on the same map
it’s hard to know without the specifics, but if they are complex models, 500-1000 onscreen would be tough on reasonable PC. If they are not on screen though, there is almost no perf required, so depends on the game and what is in view.
Hello, there seems to be a error exporting with the newest nw.js version with 3D Objects in the scene. How would I make a report in the Construct bugs Github with a 3rd party plugin if I cant include an example? Here is the error. Exports with a 3D Object give this error and the game does not start
Hi, I found some pretty bad bugs when worker animations are on. First, in this picture, the 3 models that surround you and aren't in view at start are invisible as is the whole city model (the city loads when looking at the very center of it). Second, on the 1 model in front that does load , if you turn away from it so that its not in view, the animations completely freeze.
EDIT: If lights are on, when looking away from the model that also freezes the animations, the model bakes the lights and stops updating.
EDIT: The model looks weird with backface cull on.
For static models, like the city, do not enable worker mode for now (it will likely have worse performance and other issues eventually I will fix the other issues, but they are lower priority, since worker animation mode should generally not be used for static models.)
For back face cull, the model must be using CCW ordering for vertices. If it does not, do not enable BFC.
Yay nice update! TY!. Is it bad to have EVERYTHING in worker mode? Should I turn it off for static objects? Also will setting fullscreen quality to low help performance on 3d objects.
Lol yeah, this is what happens when I turn on worker mode for a low poly static model. With culling off. Makes sense to leave worker off for such objects.
The main reason is because C3 estimates that the object is off screen. With very large objects, it may not track that well. I added an ACE to scale the bounding box which may help. Try the scale bbox ACE going from 1-2+ times the bbox size. Let me know if it helps.
Thanks for your support, I have one more question. i want these 2 animations to run at the same time but only Plane.003Action works (These are the propellers of airplanes.)
Hey, I won my school game competition! You can play my game here: https://cheva360.itch.io/pookies I think it's a cool showcase of the plugins. It's not the best because it is still my first game but I worked hard on it. I had to turn a lot of the 3D models (especially the trees) into 2D but it still has a decent amount of 3D models. You can toggle the flashlight with a right click.
Love It! Nice work. Got me on a good jump scare too! A lot of nice systems and work here. Congrats on winning the competition, now I can say 3DObject played a part in an Award Winning Game! It's a great showcase, I'll make a dev log about it.
Feels very complete for a first game. Are you using high quality or low quality scaling? Low quality could help with perf if you are using high, with some image degradation, but might be ok for this image style. Good luck on future games! Also any feedback from using the addon is welcome.
On perf, one thing I do for perf is play with culling distant objects, or objects in non visible rooms (but within the viewport).
yeah i originally had a culling system for the 3d trees but it wasn't enough so i switched it to 2d. If i employed that system for the rest of the games 3d objects I'm sure it would perform better as well. The code wasnt very good though i must admit since it would have to scroll through each tree id and check if it was in distance or not.
You are welcome, enjoy! Check out the examples and all the dev logs for info, a lot has been added from feedback and commissions from the wonderful user community.
Okay. I have purchased it and I'm actively testing it. I love it. The performance, the included effects with Ambient occlusion, it's all perfect!
I had a question, however. Is there a way to apply textures/object images to basic shapes?
Asking this because, AFAIK, to use said textures, the shapes need to be exported externally with the materials already on them & the materials don't loop on models, they stretch.
I am trying to understand the question, in what case are you doing this? Are you using the load material ACE? In general the best initial load of textures should be done in blender and exported with embedded textures in the gltf, glb. Are you doing another procedure after that? Any screenshot or demo project, so I can understand the issue better?
Oh I see what you mean. I was talking about using basic shapes: I want to create an environment with basic shapes such as cubes but can't use the one from Construct 3 directly because they don't support 3D rotation. So i wanted to use cubes rendered from Blender and change their texture directly from C3 (because I'll be using a lot of different textures).
But with what you said it sounds simpler to do it externally rather than build it in Construct.
Hmm, I see. Well you could use load material, but it would depend on your UV setup for your textured cube, you would need to match that with the material you are loading.
Exams over, can finally get back to gamedev. Love that you added shape keys stuff! Also tried gdevelop3d stuff, and im kinda jealous they can load millions of polys without much lag, but hate everything else besides the 3d lol.
I have a complete 3D third person platformer set up (like the game Toree 3D) just need models, ima put that morphing to good use!
I have used both for a long time (since construct classic), and construct is just way better imo. 3d is gdev's strong point atm, but you never know with Ashley, maybe next beta cycle will have some webgpu and 3d performance. Also, I too have started a 3d platformer. =)
Can you comment on the lag, what situation do you see that in? If it is on loading the first time (e.g. loading from the file), you can think about preloading the models in a loading screen, etc. Once loaded, new instances should load more quickly.
Oh no, Im not lagging at all. Just did some tests for fun(on a 10 year old laptop with integrated graphics), a model with 120k tri, Construct would get 20-30 fps with 2 or 3 of them on screen, Gdevelop would get 20-30 fps at around 8 or 10. With my newer pc, i'll probably never hit that problem lol.
On the 2D sprite test I did (with the same old laptop), on Construct I got 30-40fps (looked quite smooth still) with 30k-35k rotating sprites while on Gdev I got 30 fps (looked sluggish) with around 3k-5k rotating sprites, which is a pretty crazy difference. Again tho, will probably never notice on a newer pc.
No there is not. If the rotation is predictable or easily traceable, you might try using a sprite with a mesh and translate the mesh points to match what is needed.
Nice lighting updates. This really helps cpu if you dont mind a slight delay. Maybe an option to bake like this, not needed at all though since tickcount exists. I think a baking technique like this could work on a dynamic model only baking every angle towards the light at 8 or 16 directions kinda like billboarding(very ps1 style). Will do some testings.
Cool idea! I also tried spreading out objects to update light on alternate ticks, that helps too. For example some on even tick, some on odd tick. Could go further like you did above, split between more than two ticks.
Hello, great Light plugin works in my project, sun light cast dark black shadow on back side so its possible to adjust shadow opacity to avoid full black color?
for example in dark cave full black is needed but in sunlight shadow should have opacity more less 50% ?
Heh, thanks, especially when it’s something I should have added in the first place. Will watch your devlogs to see if you are able to use it in the remake.
← Return to asset pack
Comments
Log in with itch.io to leave a comment.
When I change a 3d objects gltf path to something else, the current model does not change in the editor without saving and reloading Construct again. Is there a trick or work around to make it show the new paths object without reloading Construct? Like some sort of refresh but without refreshing whole site.
Yes, that's an old issue, having to do with the unsophisticated ( :) ) way I did the model loading in the editor. I'll put that one back on my list to take a look at, it would be a nice QoL thing.
Would be very nice. Also, idk if possible but, when replacing a object with same name would be amazing. Constantly editing in blender and overwriting the same object to make stuff match each other lol.
Can you please add more details about the same name request? I am not sure what you mean.
When you make a edit in blender for your model (like color change) and you replace the glb with the edited one. The change doesn't update in the editor.
Ah, I see. I'll need to check if I can detect that. Before that, I have on my list updating when the file name changes. If that becomes available, this should be doable also.
Hey! happy to say that with the newest update with webview2 comes with no errors exporting with workers enabled. For comparison, this is my exported game with the latest nw.js. BLACK SCREEN + CREATEOBJURL ERROR. So happy to finally ditch nw.js lol. My game actually feels a lot smoother too.
Nice! Thanks for the report! I definitely interested in the new webview2 + webview2 c++ addons path, exploring it myself also.
Also looking at the thread on the issue in nw.js, not obvious that it has been resolved yet, mixed reports: https://github.com/nwjs/nw.js/issues/8075
Still broken, but I see Ashley responded. Would still be cool to have this fix to have different export options, and nw.js still is the only one with transparent steam overlay.
any way to make sides like this to look like flat shading? kinda like this but nicer lol.this would be a cool addition to ssao, i put sampling at .1 and moving camera left to right looks pretty cool.
Try fake global illumination example?
EDIT: This is probably the best way for the flat colors effect your trying to get, just adjust light angles at certain angles.
yea iknow but that light doesnt change on ur camera view like ssao. seeing stuffs flat shaded where ssao would normally be would be cool
Nope! Don't think ssao will ever work like that lol.
kind of, but the big issue is that ground plane angle is typically such that it gets heavy ao applied too, so the ground becomes dark, which I imagine you don't want. Will look a bit more over time, but definitely don't count on it. Of course an alternative is to use the flat lighting ACEs on 3DObjects directly.
yea dont really need this, just thought would be a cool effect for ssao
any way to do this like cristo example without giving animation to building?
https://streamable.com/fififa
Try setting the original texture in the model to nearest and use a low resolution texture and have the project also run nearest. In addition, you may try adding some slight jitter to the camera view.
i think i found a cool look thanks.
What about performance update? Do you have any progress?
I am focusing on other features and bug fixes now. Do you have a specific game / project issue that the community could help review in terms of perf?
To upload to c3 arcade, try adding an additional. ".txt" to the glb/gltf filename in the project and change path to match. Good luck with your game, send a link when you can.
You may also need to use gltf format instead of glb.
https://www.construct.net/en/free-online-games/power-rpg-c3-3d-online-24422/play...
nice! i like the turn base battle transitions when you enter battle.
is it possible to use this addon to make a regular 3D shape rotate on the z axis?
No, it does not interact with 3D Shape. You can make models of the same geometry as 3D shape and load yhem into 3D Object and do the rotation as needed.
Note 3D Shape already rotates on Z, but not X/Y.
the vertex rounding is so cool! since the ps1 graphics is popular right now. would this effect only work with models with animation? does non animated stuff like walls or buildings work? will test after i build my pc
You might want to do some other things too, like lock the 3DCamera to rounded x,y,z coordinates, similar for object locations, similar for rotation angles and camera angles, try it out!
Just saw and tested this, I love this look! I can't get it to work on trees or walls without animations though. Is this possible like in this video? At 3:50. Or something that makes textures look crooked. Tried rounding stuff, nothing really worked out.
o,o. Gives horror game vibes. How is the cpu usage? Any fps hit?
You have to turn it off when the object isn't near your camera view. You wont notice this from a distance anyway. Without turning it off though, around 15 highish poly animated models(8k+tri) onscreen at once, the cpu is 10%-15% increase and fps drop is up to 15-20. I don't know if its the same with non animated stuff, I can't get it to work to test. Haven't tested with low poly models either. Should be pretty good performance unless your making a game with 50+ enemies on screen at once, which would probably still be okay with lower poly's and good optimization techniques.
Perhaps lower resolution? Nearest textures in model?
I'll just use blender and move uv around for crooked textures. I gave the buildings a tiny animation that move sideways, now to just stop it when camera isn't moving much. Pretty sure this isn't the best way to do this but it still works lol. Will definitely use this to create ps1 style game after my main game.
Right, the textures in PS1 are not perspective correct, perhaps you can play with 3D Camera FOV (dynamically?) and also changing between orthogonal and perspective for the 3DCamera
intersting to looking a 3d mesh point from your project uploaded, but i still did not know how to set point on a node? i try to download the model and import it on blender i thought its from origin but its not, any advice?
Just add a vertex in blender where you want.
@cristo1 's got the idea for the most specific placement, in the test case it just uses one of the vertex points from the node, based on vertex index.
thank guys for the answer appreciate
Oddly specific request, can you somehow make it do that 'wobbly' thing that PS1 graphics do? Or is that just not possible?
Can you show an example? This kind of sounds like an effect or using lower resolution with nearest and no filtering.
https://github.com/dsoft20/psx_retroshader
Ah, I see. We can't change the vertex shader, but we could play with vertex values on the CPU. So would take some CPU perf to do it, I'll take a look. Adding to the list for later.
Check out the dev logs - does the new vertex rounding ACE do what you want?
Updated to a new version, all models have become small and they do not change the z Elevation in the code
Can you share one of your models?
The z elevation issue may be due to the recent z elevation change to use the standard C3 ACEs for Z elevation.
https://kindeyegames.itch.io/c3-3dobject-alpha/devlog/560185/change-to-zelevatio...
"they do not change the z Elevation in the code" - do you mean in JS or in event actions?
I dont really understand the new update. I guess top level means the first of the hierarchy which would be the Armature? Does it mean, for performance, that we should leave all rotation and location to 0 and scale to 1? If so, is it ok to just Apply All Transforms before exporting?
This is really only for skinned meshes that need to be transformed by the root transforms, I will review again and make sure that it has no perf impact on other cases. So, if your models worked fine for this change, you will not need to do anything.
Ah ok cool, I'm an ultra beginner blender user. I wouldn't know what would kill performance. All my models and animations work good so far.
Hi, Is it possible to use UV Offset to move this around like my model is changing face expressions? The one in the Uv Offset lava example is always scrolling.
Just set the offset once and don’t change it. The lava one is scrolling because it is changing the offset over time.
Yeah sorry lol, I was using 1 and -1 so I wasn't seeing a difference. This is really nice for cartoony style models. Here is a test with Jet Set Radio character. With SSAO.
Looks great! Nice work.
newest update fixed all bugs. thanks! this plugin basically has everything working perfect to make some really cool 3d games. =)
great, can’t wait to see what you do, please share!
new update broke my debug preview.it freezes if in debug,but works in normal preview. also the weirdest thing is happening with my bullets. the 3d bullets do not show when i shoot, but if i delete my player model, they show again. everything works perfect in previous version. here is console,
i made a test
https://www.mediafire.com/file/emt8w0yzofyvz5v/ERROR.c3p/file
1. if player1 spawn is outside the layout, the console has errors
2.if player1spawn is inside the layout, the console has NO error
3.if the 3d model's worker animation is OFF, the console has NO errors if spawn is inside or outside the layout.
so basically the error only shows for 3d objects with worker ON and OUTSIDE the layout. this is also the reason my game freezes in debug mode when using camera with lerp while 3d worker objects are not in view. it could also be the reason my 3d bullets are acting weird and not loading if 3d worker model is also in layout. if not i will try to reproduce in a new test.
i found out its not only on spawn. if every model with worker is on screen its fine until 1 of them goes out of view then all freezes and error pops up.
Thanks for the detailed review and report, I will have some time to debug this early next week.
thanks! also thanks for leaving older version up, i accidentally deleted it
Getting some cycles to look at this, seems like an init timing issue, which requires a Draw() call, tracking it down.
Nice. I noticed this problem too, when worker object is not on screen, every objects animations just stops. New stuff I spawn after that does not render. If I do the same thing in Debug, the whole game just stops/freezes.
Me again, to report a bug or something that could be improved with the plugin.
Right now, if you set Z elevation in a 3DObject Properties, it is not displayed correctly in Constructs editor preview window.
For example, I created a 3DShape object (the grey slope) as I use for topology purposes.
Set it's Common properties Z elevation to 32
Then I created a 3D model of stairs, set it's properties Z elevation to 32, yet in preview, the 3DSHAPE renders at 32, the stairs still renders at 0.
In game it works fine, stairs AND grey topology slope are rendered at 32.
But for a level building point of view it could be complicated if every 3D object is not rendered at the right Z elevation in editor. It's working in the dark.
One idea could be to move the Z elevation setting from Properties to Common so it gets rendered correctly.
Else maybe there's a way for the editor to render it at the correct z elevation without moving the setting. Don't know.
An easier way to build levels is to just keep them all at 0 in the editor and set the z elevation for both objects with events at start of layout. Or use hierarchies so you would only need to set 1 objects z elevation. If your going to make objects with higher z elevations, its really hard to see whats happening in the editor or if everything is aligned correctly.
Great tip!
OK, I finally bit the bullet and implemented the newer C3 SDK support for z Elevation, so it should work the same in the editor as runtime. This will require updates to the new Common "Z elevation" property. Details are in the dev log: https://kindeyegames.itch.io/c3-3dobject-alpha/devlog/560185/change-to-zelevatio...
Thanks a lot ! Sadly there's still a small bug. Now the item renders at twice the Z elevation set. For example I made a small gif. I created two 3D Objects cube, that have a scale of 16. So, If I set a Z Elevation of 16 to one of the cubes, it should render at the height of the first cube. Yet it seems to render at twice that Z Elevation. The 3DObject blue selection square is located at the right position tho. I tried with different scales, but even with a scale of 1, the issue is still there, so it's not scale related. I don't know exactly where the problem is, but there's a x2 somewhere :p.
Good to notice it's only editor related, in game it renders at the correct Z Elevation.
We're almost there !
Don't be too sad :) We got this! Thanks for the great bug report and gif. It is always so helpful to get detailed reports like this. I am a one person operation for this particular project, so I really rely on good community feedback.
A new version is going up now. Please let me know if it fixes this issue for you.
It works ! Thx again :)
I just want to give an update on the error with exporting to NW.js. I said before it doesn't work with 3dObjects, but it does. As long as "Use worker" is turned off in Project Properties, 3dObjects are working even with worker animations on. I dont see much difference in performance, but idk how stable it is. Use this work around with caution I guess.
Lol, I always have that setting to off. For some reason, I get MORE fps with it off.
EDIT: With my crash test file, I get 144fps with it off, and 120 fps with it on. No idea why. Maybe it only helps with stuttering, like micro fps freezes or something.
Thanks for the report. I am going to look at the C3 related nw.js bug report too and see if there's an update.
EDIT: Looks like the bug is still open for nw.js: https://github.com/nwjs/nw.js/issues/8075
Is there something I can do to set opacity on the black part of the lights as I use as shadows ?
2nd question : is there a way to set only outside faces render, as I want to add a outline style to my 3D models (by duplicating the meshes, lil' scale, and black texture), but for this to work I have to be able to set visible only outside of faces textures
I think I know what you are trying to do, what do you mean only 'outside' faces of texture?
For the my 2nd question, the outline I try to get, this is how I'm doing it in Blockbench :
I duplicate every meshes, I do a little rescale and then I paint in black the backface of the entire duplicated meshes.
In Blockbench, to get this result I have to specify that I want the preview to render only outside of faces :
But when I import this model with the outline in Construct, It renders Outside AND Inside faces :
Sorry again if I'm unclear, I'm doing my best ^^'
And thanks again for your help !
I see, sorry I don't see a way of doing this in 3DObject right now. It will look different, but you might try applying one of the C3 'outline' effects to the object and see if this different style of outline will work.
Can you please highlight the areas that you want me to look at? I don't know what part you are discussing.
So, for my first question : This is my WIP scene without lighting :
When I add lighting to create shadow I get this :
I can only manage to get 100% black shadows, what I would like to get is this (quick photoshop where I put shadows at only 30% opacity) :
Sorry if I'm unclear ^^'
Are the shadows separate 3DObjects? If they are, you can try setting their opacity to 30%.
no they are not separate objects, I only used the lights actions included in the 3D Object plugin
Hi, with more testing, it seems like having the worker objects offscreen and setting their animation rate to 0 while offscreen does not free memory.
Is there a way to turn off worker mode for objects during runtime? Or is that not possible?
You cannot turn them off during runtime and I would not expect them to free memory when off screen. However, they should require very little CPU when offscreen, since the animation and lighting is not being updated. I will check and make sure this is true when lighting is active also.
Ah ok, thought so. I dont have lighting at all yet, and all is running smooth at 144fps. It's just the memory problem that starts building up until the crash. Will test on earlier versions of Chrome later.
I have a problem when I use worker mode for an object. I can get around 200 of the same models on screen at once without lag but the game crashes after running it for around 5 minutes or so. Seems to be a memory leak? I get this error on the games window.
SBOX_FATAL_MEMORY_EXCEEDED
Here is a test demo, I only have 16gb ram might take a bit longer for other to get the error.
https://www.mediafire.com/file/ec10qwvs5djld87/crash.c3p/file
EDIT: Lowering animation rate or having the objects offscreen does NOT help at all, still crashes. It only prolongs the amount of time that goes by before it crashes. Also exporting with nwjs, the game window simply closes after a while.
My game has 1 enemy monster so far thats 256 tris and a texture of 128x128. The crash happens with 300 of them even when my fps was at max 144 still with no drops.
EDIT: Reuploaded a better test that's 250 models and 144 fps with worker crash.
Thanks, I’ll take a look next week. Thanks for the example.
cool thanks!
I see the crash. After a little research, it _may_ be a chrome bug that gets fixed in chrome 115 when available. I will keep an eye on this when that version releases.
https://stackoverflow.com/questions/75728569/web-worker-memory-leak-when-using-t...
This also may be another bug/issue with chrome and workers where they don't do reliable GC. In fact, I see that if I do manual forcing of GC through Chrome dev tools, I can stop the crash from happening.
I've seen bug reports on this, but no resolution in chrome yet. I will look at this one possible solution which requires the workers to be terminated and created again. I'm not sure what they will do w/ perf and we'll see if it's actually viable.
Yep its not fixed even in Chrome Canary which is 117, also tried as far back as Chromium 97 same results. Hope your fix helps!
EDIT: In the test that crashes with 250 objects, I was able to get up to 300 objects at 60fps without crashing if I split it up, 150 workers and 150 nonworkers. So having 2 of the same type of enemies in a Object Bank layer, I can split them up while spawning. Not perfect but works ok for now. Will try to see if prefab instances, destroying 3d objects offscreen and respawning onscreen helps with memory.
ran similar test with my game. With 60 worker objects,I saw memory go from 800 to 2400. But after 10 or 15 min it went back down to 1600. From there on for about an hour i see it going to 2200 then back down to 1600 again, it just hovers around those numbers.pretty low % so it does not crash at all at these low numbers.
if i push the limits with 150+ objects. it does crash pretty fast in 10 -15 seconds, same error u have. i also got 16gb
in your test, lowering animation rate from 30 to 2 does help a lot, it lowered memory usage by almost 30% and does not crash, BUT any rate over 10 still crashes. so maybe it could help if u set offscreen objects to animation rate 0. and onscreen farther away objects to like 5 where you wont be able to tell.
what kind of game are you makin btw with 300 monsters o,o im guessing hack n slash game?
Your right, setting rate to anything under 5 helps a bit, but anything under 10 or even 15 looks bad even from far away lol. With rate at 5, I crash at 350 instead of at 300 enemies.
I was making a platformer similar to the game Toree, but as I was adding more and more stuff to the game it then changed to an action game lol.
hi, me again, if I have a 3D model with multiple items, like hats, weapons etc. Is there a way to set visible or invisible parts of a 3D model using actions in construct ?
Yes, use the ACE Node Disable to turn on/off node/meshes.
Works perfectly, thx !
you are welcome, happy deving!
Is there a different method for collider :d
the propeller is nearer to camera so it looks like that lol, try rotate the collision more ccw
Hi thx for your work, I have a problem with the addon, I have a 3D model made with Blockbench, exported the gltf with embed texture, it loads perfectly fine with Babylon but I can't make it work in Construct. It's invisible.
gltf file : https://drive.google.com/file/d/1PKuh8E37zGLSXeUpmglgHXMecYAX9fWe
tried with glb too, still invisible
tried it, it works. disconnect the alpha node and export as glb
Thx for your answer :) Sadly I don't find how to disconnect alpha node in Blockbench. Does it mean I have to go through blender after exporting it with blockbench to disconnect alpha node in order to make my models visible in Construct ? Isn't there a way to build and export models usable by this addon using only blockbench ? Thx again !
im not sure. i never used blockbench but on blender its really easy.
go in shaders tab at the top, click your model, and at the bottom drag alpha so its not connected, then export as glb again
im trying blockbench but, it looks like it cant import gltf/glb? it can only export them? weird lol.
Hello, Is there a way to set a sprites width and height to a 3d objects bounding box size? I want to add collision boxes and have the parented sprite match the 3d object on startup.
EDIT: Its hard to match the sprites size with the buildings in the editor lol.
Have you tried using the expressions XBBMin, XBBMax (and Y, Z versions)?
I have a doubt, in an isometric topdown project, where only the characters, npcs will be 3d would it be possible to reach something professional using the plugin, taking into account having an average of 500 to 1k of 3d models on the same map
it’s hard to know without the specifics, but if they are complex models, 500-1000 onscreen would be tough on reasonable PC. If they are not on screen though, there is almost no perf required, so depends on the game and what is in view.
I've sent an error report. I hope Ashley can work with a 3rd party addon.
https://github.com/Scirra/Construct-bugs/issues/7110
Also if anyone else can test and confirm, would be nice to know if it isn't just me.
Looking at the comments, it looks like its not related to this plugin at all.
Thanks, I have changed it. Skymen provided an example. Had nothing to do with 3d Objects, my bad. Looks like an nw.js issue.
Thanks for all the info. For now, either use a previous version of nw.js or do not use worker animation for 3DObject.
does this have something to do with it?
https://github.com/nodejs/node/pull/47574
Hello, there seems to be a error exporting with the newest nw.js version with 3D Objects in the scene. How would I make a report in the Construct bugs Github with a 3rd party plugin if I cant include an example? Here is the error. Exports with a 3D Object give this error and the game does not start
https://ibb.co/8KYKzzG
I don't know what that error is. Some things to try though: don't minimize, don't compress nw contents.
You can ask on Github for a way to share the files, usually they ask you to email them a link to your file.
Even adding a empty 3d object to a new project and building with chromium 114 has that error. 113 still works. Hope its somehow fixed for 115.
Hi, I found some pretty bad bugs when worker animations are on. First, in this picture, the 3 models that surround you and aren't in view at start are invisible as is the whole city model (the city loads when looking at the very center of it). Second, on the 1 model in front that does load , if you turn away from it so that its not in view, the animations completely freeze.
EDIT: If lights are on, when looking away from the model that also freezes the animations, the model bakes the lights and stops updating.
EDIT: The model looks weird with backface cull on.
https://www.mediafire.com/file/v4trtiugdm1rw40/InvisibleandAnimationsLightsStop.c3p/file
2-48-5 animations do not freeze and models are visible.
Thanks for the reports.
A fix for the offscreen animations is now in.
For static models, like the city, do not enable worker mode for now (it will likely have worse performance and other issues eventually I will fix the other issues, but they are lower priority, since worker animation mode should generally not be used for static models.)
For back face cull, the model must be using CCW ordering for vertices. If it does not, do not enable BFC.
Thanks for the quick fix!
Just tried the new update with webgpu, the performance boost is awesome.
Yay nice update! TY!. Is it bad to have EVERYTHING in worker mode? Should I turn it off for static objects? Also will setting fullscreen quality to low help performance on 3d objects.
might be only for objects with animations.
You are right, particularly higher poly objects (and higher poly objects with lighting enabled)
Worker mode is more important for high poly objects that have animation and/or lighting. For low poly / static, do not use worker mode.
Lol yeah, this is what happens when I turn on worker mode for a low poly static model. With culling off. Makes sense to leave worker off for such objects.
Can you share the project? Something looks incorrect in this case with worker mode. Is lighting enabled?
https://www.mediafire.com/file/7xw976zjdqha96d/3DLighting.c3p/file
here u go
EDIT: model does not load in worker mode unless you look at the ground.
It also does that in your townscaper fake gi example. Some sides stay black if worker is on.
Thanks for the info, appreciate it. I don’t have a QA department, so I rely on my friendly users for feedback.
Try the new version with Worker BFC property disabled.
The object becomes invisible when the camera approaches, how do I fix it?
Noticed this in my game as well. My truck would go invisible at certain angles but i could go inside it just fine.
The main reason is because C3 estimates that the object is off screen. With very large objects, it may not track that well. I added an ACE to scale the bounding box which may help. Try the scale bbox ACE going from 1-2+ times the bbox size. Let me know if it helps.
thanks it worked :)
Great, let me know when your game releases, I’ll promote it.
Thanks for your support, I have one more question.
i want these 2 animations to run at the same time but only Plane.003Action works (These are the propellers of airplanes.)
There is not a way to do this in 3DObject right now. Perhaps you can combine them in blender?
Hello, my game is out
https://lagged.com/en/g/unicycle-duel
Congratulations! The outline effect on the plane looks really nice.
Hey, I won my school game competition! You can play my game here: https://cheva360.itch.io/pookies I think it's a cool showcase of the plugins. It's not the best because it is still my first game but I worked hard on it. I had to turn a lot of the 3D models (especially the trees) into 2D but it still has a decent amount of 3D models. You can toggle the flashlight with a right click.
Love It! Nice work. Got me on a good jump scare too! A lot of nice systems and work here. Congrats on winning the competition, now I can say 3DObject played a part in an Award Winning Game! It's a great showcase, I'll make a dev log about it.
Feels very complete for a first game. Are you using high quality or low quality scaling? Low quality could help with perf if you are using high, with some image degradation, but might be ok for this image style. Good luck on future games! Also any feedback from using the addon is welcome.
On perf, one thing I do for perf is play with culling distant objects, or objects in non visible rooms (but within the viewport).
yeah i originally had a culling system for the 3d trees but it wasn't enough so i switched it to 2d. If i employed that system for the rest of the games 3d objects I'm sure it would perform better as well. The code wasnt very good though i must admit since it would have to scroll through each tree id and check if it was in distance or not.
damn bro, good job! was good
On my way to purchase it right now. From what I've seen, this looks absolutely amazing. Thank you for making this.
You are welcome, enjoy! Check out the examples and all the dev logs for info, a lot has been added from feedback and commissions from the wonderful user community.
Okay. I have purchased it and I'm actively testing it. I love it. The performance, the included effects with Ambient occlusion, it's all perfect!
I had a question, however. Is there a way to apply textures/object images to basic shapes?
Asking this because, AFAIK, to use said textures, the shapes need to be exported externally with the materials already on them & the materials don't loop on models, they stretch.
I am trying to understand the question, in what case are you doing this? Are you using the load material ACE? In general the best initial load of textures should be done in blender and exported with embedded textures in the gltf, glb. Are you doing another procedure after that? Any screenshot or demo project, so I can understand the issue better?
Oh I see what you mean.
I was talking about using basic shapes: I want to create an environment with basic shapes such as cubes but can't use the one from Construct 3 directly because they don't support 3D rotation. So i wanted to use cubes rendered from Blender and change their texture directly from C3 (because I'll be using a lot of different textures).
But with what you said it sounds simpler to do it externally rather than build it in Construct.
Hmm, I see. Well you could use load material, but it would depend on your UV setup for your textured cube, you would need to match that with the material you are loading.
cool! Yes I am still working on enabling lighting in worker mode. It will get there, likely this coming week.
Exams over, can finally get back to gamedev. Love that you added shape keys stuff! Also tried gdevelop3d stuff, and im kinda jealous they can load millions of polys without much lag, but hate everything else besides the 3d lol.
I have a complete 3D third person platformer set up (like the game Toree 3D) just need models, ima put that morphing to good use!
I have used both for a long time (since construct classic), and construct is just way better imo. 3d is gdev's strong point atm, but you never know with Ashley, maybe next beta cycle will have some webgpu and 3d performance. Also, I too have started a 3d platformer. =)
Fun! Good luck with your exam results and dev!
Can you comment on the lag, what situation do you see that in? If it is on loading the first time (e.g. loading from the file), you can think about preloading the models in a loading screen, etc. Once loaded, new instances should load more quickly.
Oh no, Im not lagging at all. Just did some tests for fun(on a 10 year old laptop with integrated graphics), a model with 120k tri, Construct would get 20-30 fps with 2 or 3 of them on screen, Gdevelop would get 20-30 fps at around 8 or 10. With my newer pc, i'll probably never hit that problem lol.
On the 2D sprite test I did (with the same old laptop), on Construct I got 30-40fps (looked quite smooth still) with 30k-35k rotating sprites while on Gdev I got 30 fps (looked sluggish) with around 3k-5k rotating sprites, which is a pretty crazy difference. Again tho, will probably never notice on a newer pc.
Got it, thanks. There is definitely room for improvement, so I'll be looking that over time.
My characters can finally blink!
woooo! can you share a vid?
Its nice for dialogue parts of my game
Cool, cute character!
Every update makes me want to start a new game lol. Newest morph update giving me n64 cartoony platformer ideas.
Fun! Morph can definitely do some nice things, facial expressions being a great one for cartoony characters.
Is there a way to set a face or texture of a 3dobject to a sprite image? trying to make a rotating tv but need to use a sprites animation.
No there is not. If the rotation is predictable or easily traceable, you might try using a sprite with a mesh and translate the mesh points to match what is needed.
ok tnx, ended up using mesh
Nice lighting updates. This really helps cpu if you dont mind a slight delay. Maybe an option to bake like this, not needed at all though since tickcount exists. I think a baking technique like this could work on a dynamic model only baking every angle towards the light at 8 or 16 directions kinda like billboarding(very ps1 style). Will do some testings.
Cool idea! I also tried spreading out objects to update light on alternate ticks, that helps too. For example some on even tick, some on odd tick. Could go further like you did above, split between more than two ticks.
Hello, great Light plugin works in my project, sun light cast dark black shadow on back side so its possible to adjust shadow opacity to avoid full black color?
for example in dark cave full black is needed but in sunlight shadow should have opacity more less 50% ?
keep good work!
I’ll look at adding an ambient light color, that should help. Also I love your project.
Try this update: https://kindeyegames.itch.io/c3-3dobject-alpha/devlog/523185/3dfacelight-add-set...
perfect! you produce addons fast as lightning
Heh, thanks, especially when it’s something I should have added in the first place. Will watch your devlogs to see if you are able to use it in the remake.