Is there a way to force the 3D object to appear behind objects on layers above it? I'm having an issue where the 3D Object is sitting on top of the gameplay as intended but is drawing over menu items that are on global layers. Thanks for any hints you can provide!
Is the 3DObject on a lower layer, than the global layer? If so, can you make a simple project showing the issue, so I can debug? You can share a file with sendgb.com.
Hello! I don't know if this is the place to report an issue, but I've been having some trouble with the models I've imported
I made my models with Blockbench ,exported them as GLTF and imported them into Construct 3. But when the model opens, it's always missing one entire object from the model (since in Blockbench you model only with cubes, one entire cube is missing from my model)
I think it's important to notice that the models in the project are .glb, and the ones that I sent you are .gltf, but all I did was convert them in that debug website that you recommended
I see that one of your cushin was missing. I fixed that by importing gltf model to blender and exporting it as glb 2.0, check that with rest of your models, they should be fixed by this method ;) (Sorry can't attach screenshots, I'm getting errors by itch.io.)
This should make the glb files work (also thanks to Zaykoworks for the additional idea for a workaround.)
In the above post, I also noted why the original gltf files do not currently work, so please continue using the converted glb versions for now. I now also have a good example Blockbench gltf file to work with to see if I can support it.
hello, I thought of something, to do a 3d collision detection I can't impose a condition in which if the point is one of the points of the gltf file, the player cannot cross it? Is there a way to know which are the points of the space where the gltf exists and prevent the player from going there?
No, that would be a huge number of points for any kind of complicated shape and you would need to create a 3d representation of the shape to check on the intersection.
This is why most simple 3D engines use much simpler 3d colliders, like boxes, spheres, and capsules to use as collision shapes (broad phase collision detection). After that, if a more precise collision detection is needed, it gets complicated quickly, making a more precise representation of the object and checking for the intersection. I suggest starting simple first, adjusting the bounding box up or down a little to see if it is good enough.
If you need much more precision, you might think about moving to a full 3D engine (Unity, Unreal, etc.) that can implement mesh colliders.
First I would like to say great plug in. Thank you for the great work.
But I have one small request. When I rotate a model around any axis, the positions of the 3D model in the browser debugger is constantly updating.
It looks like this: [481.68552815121427,128.09595206334762,93.11600597748952][452.86811617090655,128.09595206334762,-111.93053470466374][304.9698742241982,438.51172210652123,-91.1447923304571]... ...and so on.
Turned off the debug switch in the 3D Object settings and kicked out the browser plugin altogether. Happens nevertheless.
So you can't really use the browser plug in of Construct anymore.
Yes this was for plug-in dev internal debug. I was going to wait for the next release to turn off, but I will do a quick patch and upload today instead.
You have to implement a 3D collision system yourself, C3 does not have support for this. I have seen and implemented examples of using collision filtering based on zElevation. More complex is to use a 3d collision JS library like cannon.js or simpler AABB bounding box collision in JS or C3 events. JS implementation is described here: https://developer.mozilla.org/en-US/docs/Games/Techniques/3D_collision_detection
Cant switch animations on 3d model with construct 3 events. Like platformer moving or with global variables. Animations do not work if more than one is used. for example, if the character is moving then walk animation, if not moving then idle. When I remove one, the other works. Only here the logic works the other way around, that is, if the platformer moves, then the walk animation does not work, if not, then it works.
there’s a free behavior plugin you can get called “FSM”. Use this to change states and then have the animations activate on the “->on state change to ___” condition.
Yes thank you. I figured it out after an hour of testing :)) I thought it would work like basic animations in construct. And thanks for the benavior plugin, it will be very useful
I found a solution to my problem with the help of an additional "trigger once" event. Turns out the animation was playing from the beginning each time (stuck on the first frame), so it looked like the animation wasn't working :) .
I have a question, how do I stretch my model, no matter how much I mess with the scale values of x, y, . It's still the same size getting disproportionate.
Use xscale, yscale, zscale (these are divisors, smaller number makes model larger, similar to C3 zscale). Or use 'scale' to increase all (this is a multiplier, higher make model larger.)
I would like to know if the size of the model in the scene impacts the performance of the game. Due to the terrain limitation of Construct in 3d I would like to create a terrain model, but my layout size is 5000 by 5000, does a terrain like this matter greatly impact the performance?Em
The fillrate (number of pixels/texels) and number of triangles in the model will impact performance. Is all the terrain visible all the time? If not I would cut up the terrain into separate models, so offscreen areas wouldn’t need to render.
I looked closely and I realized that maybe when the implementation left, the bottom point of the model, the model would disappear, so when you look up, just leaving the electricity at the bottom of the model, the whole model would disappear
I added a couple of older versions. Is there a bug with the current version (for example are you using the image texture and it is showing as white? That usually means there is no material in the gltf/glb file.)
There is an ACE Update bounding box, which works during runtime, please try that, it takes a little perf from the C3 engine, so update sparingly if possible (e.g. not every tick). Also, you can adjust zHeight if it's due to the camera looking 'up' above the model.
There is also a new ACE: Set origin x/y which can help 'center' the bbox depending on the 0,0,0 point in your model local coordinates.
In the picture below, is the model the L shaped desk? If you reload the project, does the bbox change to match the L shape? I added a feature to update the bbox on the load of the model in the editor. If you are using an older version of the plug-in also try updating.
I've tried using the update bounding box action, doesn't seem to do anything, the center with x/y action would have to be manually done for every model (everything seems to be off center from the bounding box) and I've reloaded the project multiple times and made sure that it's on the latest update. I even re-exported the model to have it's geometry to the origin, still is off center.
I have also tried to artificially fix it by adding a plane to the model way out of sight to increase the bounding box, the models sill go past the bounding box, which causes the clipping issu
Have you tried setting z height to increase the bounding box size in z? Is the object rotated? Can you send me the gltf/glb file so I can try on my side?
Discovering this plugin this week and I am very happy.
I would like to know if in the current version I can use this plugin in a serious game. Whether there are limitations of 3D objects created in the scene. The game will have some 3D characters and some objects like trees, things that the native plugin cannot integrate. Thanks and great work.
Definitely take the performance comments seriously it's best for low poly models and fewer animations if possible.
I suggest making a quick test scene to check out the performance.
I have found desktop performance to be reasonable, but mobile performance varies greatly (in general.) iOS and modern android look good, older android phones are usually not as good.
Overall this is a good plugin but i have a few things i think need fixing When creating a model it looks super stretched in the editor the only way to see it no stretched is if you boot the game and once the object loads set the z scale to the 3d cams and then run the rotation command, it would be nice to see a zscale option the the object so you can set it there, another thing that needs adding is a re render button because if you change the model it stays with the old one and you have to reopen the project. last the texture on this model is off, i've tryed reimporting and reexsporting but nothing seems to work any ideas?
Ok, I think I got this fixed, thanks for the sample models, they render correctly for me now. It looks like the UVs for these models expect the texture mode to be repeated (which is the gltf/glb default.) So, I have updated the addon to have default teture wrap, please try out the latest version.
Also - can you point me at what tool created these models? I am interested in why the uvs are set this way.
For the stretch of the model, set the project z-xis setting to 'regular'. I've updated the notes to include this comment.
In terms of the texture, if you are not using the texture embedded directly into the gltf/glb file (which is now the recommended way after I added this support) and you are using the texture in the image editor, the texture size must be larger than the Project settings sprite sheet size. If you need to continue to use the texture in the image editor, I recommend setting the Project sprite sheet setting to 512 and then resizing any image textures to be larger than 512x512.
In terms of updating the model on the file name change, I have added that to my list of possible future enhancements.
Thanks for the model reference, there does seem to be some different formatting for these models compared to the ones I use, I'm taking a look.
For the Project Display -> Z axis scale, you should be able to change to regular (I can), if you still can't can you send me your project, so I can take a look?
I'm still learning to use blender, I tried your plugin for 3d animation and it worked, but when trying to create a box without animation the image size is different. Should 3d objects use animation or not?
Can you send your project? You can also take a look at setting zScale for the box (to 3DCamera.zScale on load.) Hard to tell what you expect here without seeing blender model and then C3 preview.
Plugin is amazing! I wonder if there would be a possibility to add some form of anti-aliasing to match visual of 3D models with texture sampling quality. I'm also curious if some option to change textures or materials inside consturct editor(To make Visual Equipment/Paperdoll) is planned? Looking forward for these features!
The latest version uses the project sampling setting for the texture itself. So if your project sampling is trilinear, the 3D textures will be trilinear.
if you are talking about the edge of the model itself, you can try using low quality full screen and scale up a little or use an effect at the layout level to blur a little.
Dynamic material changes is interesting, but probably further out.
Okay, Thank you. I will try to use some effect on layer!
About the option just to force loading texture for model from external source image and then option to refresh that model would be atleast a milestone I would like to achieve. (For example: Changing Skins for model like in GTA 3-VC).
I guess the true solution for this idea would be possibility to use diffrent objects and materials from inside model.file but I think that it is a much harder to make so if you make just this idea above I would be very grateful!
Can't seem to get the latest version to build to Android though unfortunately
/str/c3runtime.js:4138:16: ERROR - [JSC_LANGUAGE_FEATURE] This language feature is only supported for ES_NEXT_IN mode or better: Optional chaining. 4138| if (textures?.length > 0) { ^ 1 error(s), 0 warning(s)
Oh! Interesting, more limited javascript feature support in that version of android/chromium. I can work around that in a future release, I just need to add some code to implement that language feature in a few spots.
Thanks for getting on it so quick with those fixes. I can now build to Android but throws up an error if I try to build with script minified, not too important during debugging at this stage though.
/str/c3runtime.js:4194:8: ERROR - [JSC_DUPLICATE_CLASS_METHODS] Class contains duplicate method name "Release" 4194| Release() ^^^^^^^ 1 error(s), 0 warning(s)
I am testing this right now, I will write a dev log about it. It will allow you to create an object without a model and create an instance and load a model with an ACE during runtime (you can only load/initialize once). However be aware this will take up memory for the texture and model for each instance.
Do you mean do 3D collisions? If so, you would need to create your own system, since C3 does not handle 3D collisions or 3D physics directly. There are some examples of 3D platforming on the example page and I think I have seen some other 3D collision examples on the Construct Community Discord, so you could ask there too.
My model from sketchfab is incorrect for some reason, I used https://github.khronos.org/glTF-Validator/ GLTF VALIDATOR to make sure its correct but its always incorrect, no matter what model I use and how low poly it is, can you please help?
Ok, a few different compatibility issues to solve for it to be compatible with 3DObject.
1. The format needs to be gltf embedded, not gltf with an external bin file. You can use blender to load gltf with an external bin and export with gltf embedded.
2. The texture must all be in one png file, in the fnaf file there is a texture per color, they must all be baked together into one file.
3. The texture file resolution must be larger than the project sprite sheet size, so it the single baked texture must be larger than that (you can set the project spritesheet size to 512 and then size the texture resolution to be 512x512.
These requirements are listed in the details for the plug-in on itch, so I suggest reviewing that again.
Another great resource is the video on this site which explains how to export gltf embedded and how to bake and export textures.
for number 3, when I would import the files I would always change there size to 512 x 512, for number 1, thanks, I will try to do that. number 2, was the fnaf security badge holder not that? but in all, thanks!
Hey I noticed when switching to the new "regular" z axis scale in the latest update, it shrinks the models on the z scale. It's easy to fix during runtime with the "Set Zheight" action but it makes things hard to adjust while in the editor. Idk if I'm doing something wrong or if it was an oversight.
I was just thinking about that today. There is a set zScale ACE, but no zScale property for the editor, so I was thinking about adding it. I am also thinking about making the default zScale '1', since in general, I think it's better to operate with the 'regular' z-axis scale and a zScale of 1 (and zElevation using the same units as x and y. So look for a new release shortly.
I don't have a tutorial, reading about Kenshape it looks better to export to glb, then you can convert glb to gltf embedded using blender or something like that. However, you also need to get the texture as png also.
Hey, I've done a lot of research on what to do for my multiplayer game. I was wondering if there is a way to do modular models? (Weapon switch/Custom outfits). Also any tips for syncing 3D animation for multiplayer?
I found the "Tank movement" Game Demo. I was wondering if you could create a hierarchy of animated parts assembled? I don't see why not. Gonna have to buy into Construct 3 and test it myself if nobody knows. Just can't find anything on it.
Right now modular parts / skins would need to be separate objects. This includes having separate 3DObject for different textures for different skins (one workaround is to have greyscale tanks and apply different colors to them with the color property, then the same 3DObject parts could be used.) For a little more sophisticated coloring, could use my Two color tint effect (though I have not tried it on 3DObject yet.)
I am almost done testing with the plugin and need some more help with a question.
I have this model of a tree.
I imported it into blender, exported it as GLTF, added the model to the Construct and applied the texture.
It looks like this:
Notice the flaws in the foliage.
I solved this by applying the "AlphaDiscard" color effect. It looks like this:
Beautiful!
Then I had to apply "z height" because the model disappeared in front of me when I looked up, and the tree again had flaws in the foliage. It seems that the "z height" ignores the "AlphaDiscard".
Thanks for the example project. This might be a C3 limitation. Once we change zHeight, it looks like C3 then does a pre-draw which breaks how the Alpha Discard effect works.
One possible way is to not change the camera to be parallel to layout, but keep it perpendicular. Then it may not be needed to change the zHeight, but instead can change bounding box size.
The big issue here is that then you probably can't use the normal behaviors to control objects because of the screen orientation.
Transparency & C3 remain a difficult issue for models like this.
I commented in that thread with a possible solution, but I imagine it's a bit more complex than Ashley would want to implement (it would be best if it was an option, not always on.)
My game will use only non-animated models and it would be a great labor-saver not having to convert the model in blender.
I think it would also help many. It's just a request to help with development, if it will disturb you or cause any problems for the plugin please ignore this request.
Unlikely for now, due to the complexity of integrating in a brand new library for FBX import. I think this is some of the unfortunate baggage that comes along with 3D models, dealing with different formats, optimization for real time rendering and game engines.
That being said if someone else wants to implement that feature, let me know, I am open to collaborating.
First of all, congratulations on the amazing work, this project will help many.
I am exporting some lowpoy models I have from Unity, they are simple models with no movements. I open in blender and export as indicated in the documentation; everything is fine as it should be.
The problem is that the model in the Construct has only the silhouette and does not show the internal polygons.
I think this is due to the light, isn't it? How can I solve this?
Try setting the specular color to black. Specular causes the ‘shiny’ effect. If you want roughness, you need to change the solid color textures to a more varied texture.
I've noticed that the distance between the 3DObject model and the camera is quite far when the model becomes invisible. Is there a way to shorten this distance? I thought having the camera on a seperate layer would help but hasn't seemed to work.
This is likely due to the bounding 'cube' of the object leaving the area of the Construct 3 camera.
Currently the way to handle this is to use the ACE 'Set z height' to increase the size of the cube. Try a value around the height of your model divided by zScale. Experiment a little to find a good range. I don't know the size of your model, but start with 20 or so and go up/down. Let me know your results and if you need any more help.
You are welcome, I really like the look of your game, can't wait to see more! I have a new Light Layer 3D Effect with a procedural normal map which can add a little more lighting 'roughness' to textures. I'll post it today.
I can't seem to find any references to Current Animation Frame expressions (sounds useful for adding footstep sounds with animated models) Was this removed?
you can get vertices of a mesh, for an attachment the best way to do it is to add a small cube to the attachment point and just use the first vertex of that mesh, look at the dev logs for more details
Check if the image texture size is larger than the project sprite sheet size. Set the project sprite sheet size to 512 and resize the image texture size to be 512 or greater.
I tested my loypolycar gltf on babylon its working fine on babylon but when i used it on c3 it shows white screen i didnot add any texture on babylon but it shows the texture but when i import it on c3 it shows white screen plz help
check your UV map in blender before export. you need to bake mutiple textures/materials into one. > add 3d object alpha > open texture diffuse/color map with edit and set path for gltf mesh > done
Yea, like if I want the relative position/rotation of like the head bone or hand bone. That way I could track an object on to it, like a helmet or a baseball.
Which version of C3 are you using? For this plug-in, I recommend the latest beta. Some of the earlier C3 stable versions did not have the latest C3 SDK which this plug-in depends on.
Sorry you are having an issue, which version of the addon are you using? There are two different versions posted. If you are using a 2.x version, try downloading the project again, I have heard that works for people sometimes.
Its possible to import to c3 3d model without purhase "better fbx importer / exporter" ? i try use original export option from blender 2.93.5. On preview i see 3d model in game but on layout editor is not visible.
EDIT, i try using BLENDER and 3DsMax to export simple gltf models, but this dont work correctly
Check out the example projects, look at the documentation for the project requirements for the gltf. 3D models and game engines tend to be techy unfortunately!
← Return to asset pack
Comments
Log in with itch.io to leave a comment.
is these C3 build support?
Generally should support, though do not use advanced minification.
Is there a way to force the 3D object to appear behind objects on layers above it? I'm having an issue where the 3D Object is sitting on top of the gameplay as intended but is drawing over menu items that are on global layers. Thanks for any hints you can provide!
Is the 3DObject on a lower layer, than the global layer? If so, can you make a simple project showing the issue, so I can debug? You can share a file with sendgb.com.
I'll hit you up in the Discord channel with a file.
For others seeing this type of issue. The problem was the other 2D layers were not set to type '2D'.
Hello! I don't know if this is the place to report an issue, but I've been having some trouble with the models I've imported
I made my models with Blockbench ,exported them as GLTF and imported them into Construct 3. But when the model opens, it's always missing one entire object from the model (since in Blockbench you model only with cubes, one entire cube is missing from my model)
Do you know what I could be doing wrong?
Thank you in advance
Not sure, hard to tell without an example. Can you post a link to a model or c3 project?
here's the link of the project
https://drive.google.com/file/d/142IkcrcrfP4_UBN3Sv8pooKvAWbpCQQM/view?usp=shari...
and here's the link to the .rar with the models and the models' textures
https://drive.google.com/file/d/1rufoD3Pmp0plr_JHfFpdua7E2DmhhoZG/view?usp=shari...
I think it's important to notice that the models in the project are .glb, and the ones that I sent you are .gltf, but all I did was convert them in that debug website that you recommended
I see that one of your cushin was missing. I fixed that by importing gltf model to blender and exporting it as glb 2.0, check that with rest of your models, they should be fixed by this method ;) (Sorry can't attach screenshots, I'm getting errors by itch.io.)
it worked! thank you so much!
You are welcome! I am looking forward to your game and would be happy to share your videos/game links in a 3DObject showcase.
One fix was added here: https://kindeyegames.itch.io/c3-3dobject-alpha/devlog/378121/fix-glb-import-fix-...
This should make the glb files work (also thanks to Zaykoworks for the additional idea for a workaround.)
In the above post, I also noted why the original gltf files do not currently work, so please continue using the converted glb versions for now. I now also have a good example Blockbench gltf file to work with to see if I can support it.
Another fix to support the original Blockbench gltf file with data URIs, try it out and let me know if it works for you.
https://kindeyegames.itch.io/c3-3dobject-alpha/devlog/378151/fix-gltf-import-add...
hello, I thought of something, to do a 3d collision detection I can't impose a condition in which if the point is one of the points of the gltf file, the player cannot cross it? Is there a way to know which are the points of the space where the gltf exists and prevent the player from going there?
I can add expressions for the size of the bounding box in 3D coordinates (min x,y,z, and max x,y,z). From this, you could create an axis-aligned 3D bounding box and do rough AABB collision detection: https://developer.mozilla.org/en-US/docs/Games/Techniques/3D_collision_detection
thank for reply, but there isn’t a way for get all the points of gltf object, and prevent the player from going there?
No, that would be a huge number of points for any kind of complicated shape and you would need to create a 3d representation of the shape to check on the intersection.
This is why most simple 3D engines use much simpler 3d colliders, like boxes, spheres, and capsules to use as collision shapes (broad phase collision detection). After that, if a more precise collision detection is needed, it gets complicated quickly, making a more precise representation of the object and checking for the intersection. I suggest starting simple first, adjusting the bounding box up or down a little to see if it is good enough.
If you need much more precision, you might think about moving to a full 3D engine (Unity, Unreal, etc.) that can implement mesh colliders.
First I would like to say great plug in. Thank you for the great work.
But I have one small request. When I rotate a model around any axis, the positions of the 3D model in the browser debugger is constantly updating.
It looks like this:
[481.68552815121427,128.09595206334762,93.11600597748952][452.86811617090655,128.09595206334762,-111.93053470466374][304.9698742241982,438.51172210652123,-91.1447923304571]...
...and so on.
Turned off the debug switch in the 3D Object settings and kicked out the browser plugin altogether. Happens nevertheless.
So you can't really use the browser plug in of Construct anymore.
Yes this was for plug-in dev internal debug. I was going to wait for the next release to turn off, but I will do a quick patch and upload today instead.
https://kindeyegames.itch.io/c3-3dobject-alpha/devlog/364109/fix-log-remove-debu...
Waow that was fast. Thanks. ☺️👍🏻
You are welcome, happy game dev!
hi i have a problem, I would like to solidify the imported gltf object and not the rectangle of the 3DObject plugin, do you know a way to do this?
You have to implement a 3D collision system yourself, C3 does not have support for this. I have seen and implemented examples of using collision filtering based on zElevation. More complex is to use a 3d collision JS library like cannon.js or simpler AABB bounding box collision in JS or C3 events. JS implementation is described here: https://developer.mozilla.org/en-US/docs/Games/Techniques/3D_collision_detection
thank you so much
Hi, can you help me plz .
Cant switch animations on 3d model with construct 3 events. Like platformer moving or with global variables. Animations do not work if more than one is used. for example, if the character is moving then walk animation, if not moving then idle. When I remove one, the other works. Only here the logic works the other way around, that is, if the platformer moves, then the walk animation does not work, if not, then it works.
Thanks in advance
it’s constantly playing the animation from the beginning. Add a condition “if not playing animation ____”
there’s a free behavior plugin you can get called “FSM”. Use this to change states and then have the animations activate on the “->on state change to ___” condition.
Yes thank you. I figured it out after an hour of testing :)) I thought it would work like basic animations in construct. And thanks for the benavior plugin, it will be very useful
no prob, good luck with your game!
Thanks, StarCoffey, for jumping in and answering.
I found a solution to my problem with the help of an additional "trigger once" event. Turns out the animation was playing from the beginning each time (stuck on the first frame), so it looked like the animation wasn't working :) .
Yes, I use similar for C3 sprite animation and 3DObject animations.
why it does not work with GLTF files created with c4d, iclone other than Blender? any idea?
Do they export glb? Try glb with textures included.
tried, but no luck
Can you share the glb model?
Use xscale, yscale, zscale (these are divisors, smaller number makes model larger, similar to C3 zscale). Or use 'scale' to increase all (this is a multiplier, higher make model larger.)
I would like to know if the size of the model in the scene impacts the performance of the game. Due to the terrain limitation of Construct in 3d I would like to create a terrain model, but my layout size is 5000 by 5000, does a terrain like this matter greatly impact the performance?Em
The fillrate (number of pixels/texels) and number of triangles in the model will impact performance. Is all the terrain visible all the time? If not I would cut up the terrain into separate models, so offscreen areas wouldn’t need to render.
Hi,
I'm having some problems
My model is upside down
I tried XYZ. Three Angels couldn't get him up
When I changed the scale, only one side was stretched
How Do I fix it
Thank you
if you can send me the model or project, I can take a look.
Thank you
Problem solved! ! I found the reason.
There's a new problem
When I'm in FPS mode, my orientation angle is about 60-90 degrees(When I look up,) The model will disappear.
I looked closely and I realized that maybe when the implementation left, the bottom point of the model, the model would disappear, so when you look up, just leaving the electricity at the bottom of the model, the whole model would disappear
To be precise, the model disappears when the eye is away from its foot. Is there any way out of this
set the z height using an ACE to the z height of the model.
Did you only change zScale?
If you want all sides changed, change scale not zScale.
How to download previous version?
I can reupload a previous version, which version do you need? Is there a bug with the current version?
I added a couple of older versions. Is there a bug with the current version (for example are you using the image texture and it is showing as white? That usually means there is no material in the gltf/glb file.)
If you are having issues with an 'Image texture' rather than an embedded texture, please also see this devlog:
https://kindeyegames.itch.io/c3-3dobject-alpha/devlog/348439/add-image-texture-p...
I've been having some clipping issues where the models position doesn't match the bounding box which causes objects to disappear during gameplay.
I can't scale the bounding box to include the model anymore so I'm wondering if there is a way to fix this that I'm just missing.
Thanks~
There is an ACE Update bounding box, which works during runtime, please try that, it takes a little perf from the C3 engine, so update sparingly if possible (e.g. not every tick). Also, you can adjust zHeight if it's due to the camera looking 'up' above the model.
There is also a new ACE: Set origin x/y which can help 'center' the bbox depending on the 0,0,0 point in your model local coordinates.
In the picture below, is the model the L shaped desk? If you reload the project, does the bbox change to match the L shape? I added a feature to update the bbox on the load of the model in the editor. If you are using an older version of the plug-in also try updating.
I've tried using the update bounding box action, doesn't seem to do anything, the center with x/y action would have to be manually done for every model (everything seems to be off center from the bounding box) and I've reloaded the project multiple times and made sure that it's on the latest update. I even re-exported the model to have it's geometry to the origin, still is off center.
I have also tried to artificially fix it by adding a plane to the model way out of sight to increase the bounding box, the models sill go past the bounding box, which causes the clipping issu
Have you tried setting z height to increase the bounding box size in z? Is the object rotated? Can you send me the gltf/glb file so I can try on my side?
https://drive.google.com/file/d/1EwqIy0SIKw837BSFnW8gjCFguR0VEuhV/view?usp=shari...
Hi
Discovering this plugin this week and I am very happy.
I would like to know if in the current version I can use this plugin in a serious game. Whether there are limitations of 3D objects created in the scene. The game will have some 3D characters and some objects like trees, things that the native plugin cannot integrate. Thanks and great work.
Definitely take the performance comments seriously it's best for low poly models and fewer animations if possible.
I suggest making a quick test scene to check out the performance.
I have found desktop performance to be reasonable, but mobile performance varies greatly (in general.) iOS and modern android look good, older android phones are usually not as good.
Great, my project is made for desktop, I'll use as little 3d as possible. . Thank you and I look forward to new updates
Is it possible to get per axis scaling?
I will look at doing this.
Overall this is a good plugin but i have a few things i think need fixing
When creating a model it looks super stretched in the editor the only way to see it no stretched is if you boot the game and once the object loads set the z scale to the 3d cams and then run the rotation command, it would be nice to see a zscale option the the object so you can set it there, another thing that needs adding is a re render button because if you change the model it stays with the old one and you have to reopen the project. last the texture on this model is off, i've tryed reimporting and reexsporting but nothing seems to work any ideas?
Update: I've added animations to the people and now they have the same texture issue as the statue!
Ok, I think I got this fixed, thanks for the sample models, they render correctly for me now. It looks like the UVs for these models expect the texture mode to be repeated (which is the gltf/glb default.) So, I have updated the addon to have default teture wrap, please try out the latest version.
Also - can you point me at what tool created these models? I am interested in why the uvs are set this way.
Works perfectly! i got the models from here and ran then through a converter, and in the players case it also went through mixamo
For the stretch of the model, set the project z-xis setting to 'regular'. I've updated the notes to include this comment.
In terms of the texture, if you are not using the texture embedded directly into the gltf/glb file (which is now the recommended way after I added this support) and you are using the texture in the image editor, the texture size must be larger than the Project settings sprite sheet size. If you need to continue to use the texture in the image editor, I recommend setting the Project sprite sheet setting to 512 and then resizing any image textures to be larger than 512x512.
In terms of updating the model on the file name change, I have added that to my list of possible future enhancements.
I am using the embedded texture, also you cant change the z-axis its read only
Models I'm using:
https://drive.google.com/drive/folders/17UAx6R6pWFqraifpFawOt92q0ow5B4wI?usp=sha...
Thanks for the model reference, there does seem to be some different formatting for these models compared to the ones I use, I'm taking a look.
For the Project Display -> Z axis scale, you should be able to change to regular (I can), if you still can't can you send me your project, so I can take a look?
I get this error when trying to load a simple cube gltf file. Happens as soon as I assign the file path for the 3d object. Any ideas?
Type: unhandled rejection
Reason: Error: Cannot read properties of undefined (reading 'width') @ TypeError: Cannot read properties of undefined (reading 'width') at Object3DType.LoadDynamicTextures (blob:https://editor.construct.net/45dc5ce9-ae58-422a-bac3-816fff486006:26:53) at Object3DInstance.Draw (blob:https://editor.construct.net/9ae7f534-3062-4c24-94b6-fde482a28fc9:112:40)
Stack: TypeError: Cannot read properties of undefined (reading 'width') at Object3DType.LoadDynamicTextures (blob:https://editor.construct.net/45dc5ce9-ae58-422a-bac3-816fff486006:26:53) at Object3DInstance.Draw (blob:https://editor.construct.net/9ae7f534-3062-4c24-94b6-fde482a28fc9:112:40)
Working with TerrorSoul on Discord. In general, now recommending to use embedded texture in gltf and glb files.
Hi,
I'm still learning to use blender, I tried your plugin for 3d animation and it worked, but when trying to create a box without animation the image size is different. Should 3d objects use animation or not?
Can you send your project? You can also take a look at setting zScale for the box (to 3DCamera.zScale on load.) Hard to tell what you expect here without seeing blender model and then C3 preview.
I tried zscal before and it didn't work, but after I restarted Construct 3 it worked. I don't know why this happened, but thanks for your support
Plugin is amazing! I wonder if there would be a possibility to add some form of anti-aliasing to match visual of 3D models with texture sampling quality. I'm also curious if some option to change textures or materials inside consturct editor(To make Visual Equipment/Paperdoll) is planned? Looking forward for these features!
The latest version uses the project sampling setting for the texture itself. So if your project sampling is trilinear, the 3D textures will be trilinear.
if you are talking about the edge of the model itself, you can try using low quality full screen and scale up a little or use an effect at the layout level to blur a little.
Dynamic material changes is interesting, but probably further out.
Okay, Thank you. I will try to use some effect on layer!
About the option just to force loading texture for model from external source image and then option to refresh that model would be atleast a milestone I would like to achieve. (For example: Changing Skins for model like in GTA 3-VC).
I guess the true solution for this idea would be possibility to use diffrent objects and materials from inside model.file but I think that it is a much harder to make so if you make just this idea above I would be very grateful!
I made a room in Blender using a 64x64 tile set and it shows up blurry in Construct. Does 3DObject only use anti-aliasing on model textures? Thanks!
Right now yes, but I will change it to use the project sampling setting in a later release. I added this to my todo list.
See the latest release, it should now support project sampling for embedded textures. Let me know if it works for you.
https://kindeyegames.itch.io/c3-3dobject-alpha/devlog/344701/solid-color-support...
Works excellent! File sizes have gone down so much too because of the embedded texture support. Great job!
Can't seem to get the latest version to build to Android though unfortunately
/str/c3runtime.js:4138:16: ERROR - [JSC_LANGUAGE_FEATURE] This language feature is only supported for ES_NEXT_IN mode or better: Optional chaining. 4138| if (textures?.length > 0) { ^ 1 error(s), 0 warning(s)
Oh! Interesting, more limited javascript feature support in that version of android/chromium. I can work around that in a future release, I just need to add some code to implement that language feature in a few spots.
The latest release should address this specific issue, let me know if it helped or if there are other errors beyond this now.
Thanks for getting on it so quick with those fixes. I can now build to Android but throws up an error if I try to build with script minified, not too important during debugging at this stage though.
/str/c3runtime.js:4194:8: ERROR - [JSC_DUPLICATE_CLASS_METHODS] Class contains duplicate method name "Release" 4194| Release() ^^^^^^^ 1 error(s), 0 warning(s)
I'm making a car racing game using container. I want to use different car models in the same 3D object which is assign as a container.
Is there a way to change the gltf path from event sheet ?
so I could use my selected car file.
I am testing this right now, I will write a dev log about it. It will allow you to create an object without a model and create an instance and load a model with an ACE during runtime (you can only load/initialize once). However be aware this will take up memory for the texture and model for each instance.
See the latest dev log for some details, if you have questions let me know.
I cant get the "Set Rotation" ACE to work, just the rotation properties are working with me. Anyone else having roation issues via code?
I got it working. It's because I used "Pause Animation" at the start.
So looks like the rotations events are tied to the animations.
Yes, that's correct. Rotation is applied as part of animation.
hi, how i can do to make the gltf solid in the game? if i put solid in the behavior, only the square of the 3d object became solid, thank you
Do you mean do 3D collisions? If so, you would need to create your own system, since C3 does not handle 3D collisions or 3D physics directly. There are some examples of 3D platforming on the example page and I think I have seen some other 3D collision examples on the Construct Community Discord, so you could ask there too.
thank you and great job!
Show post...
My model from sketchfab is incorrect for some reason, I used https://github.khronos.org/glTF-Validator/ GLTF VALIDATOR to make sure its correct but its always incorrect, no matter what model I use and how low poly it is, can you please help?
Sure, can try to help. Can you share your gltf embedded model file and texture png file?
Show post...
https://www.mediafire.com/file/pnzuira4wqs5ejv/models.zip/file
here are all the models I used
Show post...
they all work fine when I open them in Microsoft 3D viewer
Ok, a few different compatibility issues to solve for it to be compatible with 3DObject.
1. The format needs to be gltf embedded, not gltf with an external bin file. You can use blender to load gltf with an external bin and export with gltf embedded.
2. The texture must all be in one png file, in the fnaf file there is a texture per color, they must all be baked together into one file.
3. The texture file resolution must be larger than the project sprite sheet size, so it the single baked texture must be larger than that (you can set the project spritesheet size to 512 and then size the texture resolution to be 512x512.
These requirements are listed in the details for the plug-in on itch, so I suggest reviewing that again.
Another great resource is the video on this site which explains how to export gltf embedded and how to bake and export textures.
Show post...
for number 3, when I would import the files I would always change there size to 512 x 512, for number 1, thanks, I will try to do that. number 2, was the fnaf security badge holder not that? but in all, thanks!
Hey I noticed when switching to the new "regular" z axis scale in the latest update, it shrinks the models on the z scale. It's easy to fix during runtime with the "Set Zheight" action but it makes things hard to adjust while in the editor. Idk if I'm doing something wrong or if it was an oversight.
I was just thinking about that today. There is a set zScale ACE, but no zScale property for the editor, so I was thinking about adding it. I am also thinking about making the default zScale '1', since in general, I think it's better to operate with the 'regular' z-axis scale and a zScale of 1 (and zElevation using the same units as x and y. So look for a new release shortly.
Hey @kindeyegames,
how do I get a model exported from Kenshape (.obj) into the 3D Object?
I tried to convert it into .gltf via online converters, but none seem to work as inteded. Is there a tutorial for this?
I don't have a tutorial, reading about Kenshape it looks better to export to glb, then you can convert glb to gltf embedded using blender or something like that. However, you also need to get the texture as png also.
I have not used this, but you could try:
https://products.aspose.app/3d/extractor/glb
To get gltf embedded:
https://products.aspose.app/3d/conversion/glb-to-gltf
Alright, I will try this. Thank you so much for your ultra fast reply 👍
Unfortunately, it doesn't work. The model shows up totally messed up. Sad, I would have loved to use Kenshape within this context.
Would be lovely to have that in the future some time 🙂
Can you share the exported glb from kenshape?
Yes, here are the files I used:
https://drive.google.com/drive/folders/1ifWnm0KG065VRKmfBnXGrGRy6ZG0yftU?usp=sha...
I exported the model also as .obj in order to receive a texture file.
Hey, I've done a lot of research on what to do for my multiplayer game. I was wondering if there is a way to do modular models? (Weapon switch/Custom outfits). Also any tips for syncing 3D animation for multiplayer?
I found the "Tank movement" Game Demo. I was wondering if you could create a hierarchy of animated parts assembled? I don't see why not. Gonna have to buy into Construct 3 and test it myself if nobody knows. Just can't find anything on it.
Right now modular parts / skins would need to be separate objects. This includes having separate 3DObject for different textures for different skins (one workaround is to have greyscale tanks and apply different colors to them with the color property, then the same 3DObject parts could be used.) For a little more sophisticated coloring, could use my Two color tint effect (though I have not tried it on 3DObject yet.)
does this 3d object have or support preload object/occlusion culling? because i tried spawn 4 3d object and use 90% CPU
No object culling, would need to be done in the Construct project itself.
Also in general need to use low poly models, because C3 is not set up to be an efficient 3D renderer, so we are limited by that.
I am almost done testing with the plugin and need some more help with a question.
I have this model of a tree.
I imported it into blender, exported it as GLTF, added the model to the Construct and applied the texture.
It looks like this:
Notice the flaws in the foliage.
I solved this by applying the "AlphaDiscard" color effect.
It looks like this:
Beautiful!
Then I had to apply "z height" because the model disappeared in front of me when I looked up, and the tree again had flaws in the foliage.
It seems that the "z height" ignores the "AlphaDiscard".
How do I fix this?
Can you share a sample project, so I can see what C3 is doing in this case?
Transparency with 3D is difficult to deal with in C3, since the C3 renderer does not sort on a per quad basis for transparency.
Link to the project:
https://drive.google.com/file/d/1sYZD2hPn3BdlfuIVh2HjnwwUA5hJA0S4/view?usp=shari...
From the tests I have done, if I can solve this issue, I think I will be able to develop my project in Construct.
Thanks for the example project. This might be a C3 limitation. Once we change zHeight, it looks like C3 then does a pre-draw which breaks how the Alpha Discard effect works.
One possible way is to not change the camera to be parallel to layout, but keep it perpendicular. Then it may not be needed to change the zHeight, but instead can change bounding box size.
The big issue here is that then you probably can't use the normal behaviors to control objects because of the screen orientation.
Transparency & C3 remain a difficult issue for models like this.
its C3 limitation, this issue is also with in original based 3d shape plugin i ask on forum about this:
https://www.construct.net/en/forum/construct-3/general-discussion-7/3d-boxes-3d-...
I commented in that thread with a possible solution, but I imagine it's a bit more complex than Ashley would want to implement (it would be best if it was an option, not always on.)
Hello friend, me again.
Would you consider dropping the FBX support?
My game will use only non-animated models and it would be a great labor-saver not having to convert the model in blender.
I think it would also help many. It's just a request to help with development, if it will disturb you or cause any problems for the plugin please ignore this request.
Thanks again for the plugin.
Unlikely for now, due to the complexity of integrating in a brand new library for FBX import. I think this is some of the unfortunate baggage that comes along with 3D models, dealing with different formats, optimization for real time rendering and game engines.
That being said if someone else wants to implement that feature, let me know, I am open to collaborating.
I agree, too many formats, that makes it difficult to support. Don't worry, I will export the models in GLTF.
The biggest problem on that issue is that Blender can't import any FBX, some it reports an error. I don't know what to do in this case.
Thanks for your attention.
Hello!
First of all, congratulations on the amazing work, this project will help many.
I am exporting some lowpoy models I have from Unity, they are simple models with no movements. I open in blender and export as indicated in the documentation; everything is fine as it should be.
The problem is that the model in the Construct has only the silhouette and does not show the internal polygons.
I think this is due to the light, isn't it? How can I solve this?
In Unity
In Construct3
This is indeed likely due to lighting. Try out the LayerLight3D effect which is included in this project. You need to play with the parameters a bit to get something that looks good. See this dev log: https://kindeyegames.itch.io/c3-3dobject-alpha/devlog/324554/light-layer-3d-effe... and this one: https://kindeyegames.itch.io/c3-3dobject-alpha/devlog/330791/add-optional-proced...
I managed to solve it, now it's lighting well!
Now I would like to give it a rougher appearance, it's a metallic reflection even with the dimmer lighting.
Try setting the specular color to black. Specular causes the ‘shiny’ effect. If you want roughness, you need to change the solid color textures to a more varied texture.
I've noticed that the distance between the 3DObject model and the camera is quite far when the model becomes invisible. Is there a way to shorten this distance? I thought having the camera on a seperate layer would help but hasn't seemed to work.
This is likely due to the bounding 'cube' of the object leaving the area of the Construct 3 camera.
Currently the way to handle this is to use the ACE 'Set z height' to increase the size of the cube. Try a value around the height of your model divided by zScale. Experiment a little to find a good range. I don't know the size of your model, but start with 20 or so and go up/down. Let me know your results and if you need any more help.
Setting the z height to 10 has worked perfectly. Thanks for explaining how that works!
You are welcome, I really like the look of your game, can't wait to see more! I have a new Light Layer 3D Effect with a procedural normal map which can add a little more lighting 'roughness' to textures. I'll post it today.
was having the same issue but this fixed it! thanks!
can you be texture changed using set frame?
No, it cannot at the present time. How important is this request? What's the use case? I can look at adding it to the todo list.
It's not urgent, it's just nice :)
Cool idea though! We could make character models have facial expressions if we could swap out textures.
I can't seem to find any references to Current Animation Frame expressions (sounds useful for adding footstep sounds with animated models) Was this removed?
3DObject.CurrentAnimationTime
3DObject.CurrentAnimationFrame
Thank you, was looking in all the wrong places.
May I ask for the ability to get the coordinates of the points of a 3D object? For example, the point of the arm bone to attach a weapon.
it’s not there yet, but I will take a look at it.
Was there ever any progress on this?
you can get vertices of a mesh, for an attachment the best way to do it is to add a small cube to the attachment point and just use the first vertex of that mesh, look at the dev logs for more details
Oh great, thanks!
Probably easiest thing to do for now is swap to a different 3D model.
this is great but
It breaks when using more than 1 plugin
Check if the image texture size is larger than the project sprite sheet size. Set the project sprite sheet size to 512 and resize the image texture size to be 512 or greater.
thx
I tested my loypolycar gltf on babylon its working fine on babylon but when i used it on c3 it shows white screen i didnot add any texture on babylon but it shows the texture but when i import it on c3 it shows white screen plz help
Did you follow all the instructions in the usage notes? Did you add a texture image to the 3DObject?
@Probroman
check your UV map in blender before export. you need to bake mutiple textures/materials into one. > add 3d object alpha > open texture diffuse/color map with edit and set path for gltf mesh > done
Can I request more expressions and conditions like what the current frame is and get the position data of a specific bone?
Yes, current animation time / frame. In terms of specific bone, can you give an example in terms of the gltf model?
Yea, like if I want the relative position/rotation of like the head bone or hand bone. That way I could track an object on to it, like a helmet or a baseball.
probably make adding hitboxes easier as well
"Failed to open project. Check it is a valid Construct 3 single-file (.c3p) project." when i try open all your c3p projects
Which version of C3 are you using? For this plug-in, I recommend the latest beta. Some of the earlier C3 stable versions did not have the latest C3 SDK which this plug-in depends on.
This is the error I get as well. Both on the most current live version and the latest beta (as you suggested)
Sorry you are having an issue, which version of the addon are you using? There are two different versions posted. If you are using a 2.x version, try downloading the project again, I have heard that works for people sometimes.
Its possible to import to c3 3d model without purhase "better fbx importer / exporter" ? i try use original export option from blender 2.93.5. On preview i see 3d model in game but on layout editor is not visible.
EDIT, i try using BLENDER and 3DsMax to export simple gltf models, but this dont work correctly
good job, but I am not much techy, i tried few models exported from blender but in c3 its not showing up when added path in 3dobject . thanks
Check out the example projects, look at the documentation for the project requirements for the gltf. 3D models and game engines tend to be techy unfortunately!