This plugin loads a 3D Model into Construct 3, similar to the new built-in 3DShape plugin, but the 3D object can be a more complicated 3D model, loaded from a 3D model file format and texture. It also supports 3D animations.
It only supports gltf embedded and glb formats (preferably with an embedded texture in the file, a separate texture png file can also be supported.)
Please leave feedback or tag @kindeyegames on X or Mikal in the Construct Community Discord.
Some more (From @meta comments on CC Discord)
Advanced uses: read the dev logs and look at their associated examples.
Future state if this goes well:
Big thanks to r0j0hound on the Construct forums for sharing the gltf parsing and animation code which I used as a base for the gltf integration in this plug-in.
Fire elemental model credit: https://sketchfab.com/3d-models/fire-elemental-05fe96ef7fca472ba0bf753686216002
Again, please leave feedback or tag @kindeyegames on Twitter.
A great video from @FozzleCC describing details of how to use 3D models with the plug-in. If this video is useful for you, please support FozzleCC on his Patreon: https://bit.ly/PatreonFoozleCC
Note one change since this video was produced, it is now recommended to embed textures in the gltf / glb files and 3DObject will use them directly from the file, there is no need to load them into the 'image' of the 3DObject. The image can be left blank or filled with a solid color for easier identification in the event sheet.
If you want to go directly to specific subjects in the video, please see the timecode links below:
0:00 - Intro
2:31 - 3DObject Plugin Overview
6:48 - What is GLTF?
7:40 - Blender Intro
8:53 - Where to get 3D Models?
9:59 - Extracting Unity Asset Store Assets
15:21 - Sketchfab and Blender Reference
16:46 - Merging Multiple FBX Animations in Blender
22:35 - Associating texture to model in Blender
24:33 - Export GLTF from Blender
25:29 - Import GLTF into Construct 3
28:43 - Bake Multiple Textures to One in Blender
34:41 - Setting up Lighting for Baking in Blender
40:56 - Importing Baked Texture Model into C3
42:43 - Getting Free Animations from Mixamo.com
43:23 - GTLF Viewer & Debug
45:27 - Tips on Using GLTF Models & Performance
47:04 - Improve Performance with Blender Decimate
Status | Released |
Category | Assets |
Rating | Rated 5.0 out of 5 stars (23 total ratings) |
Author | kindeyegames |
Made with | Construct |
Tags | 3D,construct,construct-3 |
Click download now to get access to the following files:
Log in with itch.io to leave a comment.
This add-on will not be ported to SDK V2 (but an LTS version of C3 that is compatible with it will be available for use for quite a while).
I am working on a new, similar addon with more capabilities, which is working with SDK V2 now. I will announce here when it is ready (it will take a bit to get to the same feature set, but it already supports PBR texture and normal maps.)
Yes, transparency/alpha in 3D, in general, is always a challenge. The better results for simple renderers like C3 are to render in order as much as possible.
Check that the render order is the distance from the camera and all layers are 3D.
If your 'world' is one big GLB/GLTF model, it will be hard to sort properly (near and far meshes will all be part of one model.)
An alternate option is the 'screendoor transparency' in the 3D effect, which has a particular 'look' but will make the rendering support out-of-order rendering better.
DAN
Hello,
Watching FoozleCC, he shows sample code to copy and use. I have no idea where this code is – which sample is he showing/using?
https://www.youtube.com/watch?v=p02bz6jax8Y&t=1105s
Construct 3 r416.2 stable
Installed addons: Frag Light 2.8.0, SSAO 1.6, 3DObject, Rotate 3D
Preview 3DObjectFragLight - Scene is completely black.
F12 – I now see I have an error:
main.js:98 Uncaught TypeError: Cannot set properties of undefined (setting 'GetDefaultVertexShaderSource') at main.js:98:57
(anonymous) @ main.js:98Understand this errorAI
c3runtime.js:280 Uncaught (in promise) Error: Error compiling fragment shader: ERROR: 0:11: 'pos' : redefinition
at C3.Gfx.WebGLShaderProgram.Compile (c3runtime.js:280:1243)
at async C3.Gfx.WebGLShaderProgram.Create (c3runtime.js:280:1904)
at async C3.Gfx.WebGLRenderer.CreateShaderProgram (c3runtime.js:460:9318)
at async Promise.all (3DObjectFragLight-8/index 1)
at async C3.CanvasManager._InitWebGL (c3runtime.js:1190:6728)
at async C3.CanvasManager._InitRenderer (c3runtime.js:1190:7050)
at async C3.CanvasManager.CreateCanvas (c3runtime.js:1190:4819)
at async C3.Runtime._InitialiseCanvas (c3runtime.js:1195:18300)
at async C3.Runtime.Init (c3runtime.js:1195:10955)
at async Q._InitDOM (main.js:26:12442)
Same error after publishing and running in chrome using IIS.
3DObjectVertexColor –
Project exported – running in Chrome.. Scene is completely black.
Error log:
main.js:99 Uncaught TypeError: Cannot set properties of undefined (setting 'GetDefaultVertexShaderSource') at main.js:99:57Understand this errorAI
c3runtime.js:280 Uncaught (in promise) Error: Error compiling fragment shader: ERROR: 0:11: 'pos' : redefinition
ERROR: 0:12: 'vColor' : redefinition
at C3.Gfx.WebGLShaderProgram.Compile (c3runtime.js:280:1243)
at async C3.Gfx.WebGLShaderProgram.Create (c3runtime.js:280:1904)
at async C3.Gfx.WebGLRenderer.CreateShaderProgram (c3runtime.js:460:9318)
at async Promise.all (3DObjectVertexColor/index 0)
at async C3.CanvasManager._InitWebGL (c3runtime.js:1190:6728)
at async C3.CanvasManager._InitRenderer (c3runtime.js:1190:7050)
at async C3.CanvasManager.CreateCanvas (c3runtime.js:1190:4819)
at async C3.Runtime._InitialiseCanvas (c3runtime.js:1195:18300)
at async C3.Runtime.Init (c3runtime.js:1195:10955)
at async Q._InitDOM (main.js:26:12442)
Hello, thank you for this great plugin, I have a doubt, when I import a 3d object with the texture embeded appears compresed in game.
If I search the texture manually in construct 3 it shows ok.
The problem is I can´t search the texture for a mesh with multiples materials, also if I set a mesh as "static" with the texture checkbox marked, the texture appears corrupted.
Any idea how to resolve it? Thank you so much
Hi, there! First of all, congratulations and thank you for developing this much needed plugin!
I am creating a 2.5D platformer, but, after implementing some basic functionality to make the camera follow the player, I noticed that the objects on the left or right border of the screen pop in instead of just being there. Any idea of how I can prevent that and make sure that objects within the camera view are always visible?
I've attached a gif to illustrate the issue. The issue is noticeable if you look at the floor close to the horizontal border the player moves toward.
Yes, I used the bounding box scale ACE. Here is a screenshot of a model at the right border, with its bounding box scale set to 2x:
I've noticed that this behavior during runtime is very similar to what happens to 3D models in the layout editor. Here is a gif to illustrate what I mean (I'm scrolling the layout manually with the mouse):
I don't know if seeing the same symptom happening in the layout editor might give us any clue, but I thought I should include this. Perhaps this is caused by some project setting?
secondary nodes seem to light weird. notice that when I export just one node (the sprockets here) they light fine on their own. any idea? (the turret is it's own object so is unrelated to the body) It must be related to my object as testing with the clerk model from your examples is fine. But I don't what property of my object could be influenced by the other nodes
Try the latest version uploaded.
https://kindeyegames.itch.io/c3-3dobject-alpha/devlog/828933/fix-addon-fix-corru...
Apologies if the addon was corrupted for you; use safe mode to uninstall the addon:
https://www.construct.net/en/make-games/manuals/addon-sdk/guide/safe-mode
I am getting an error and I am not sure what it means.
When I set the object source in C3 I get "error: gltf, unhandled bufferView, try exporting gltf without using sparse accessors"
The model loads fine on the tester sites. the error it gives me is "
0
UNUSED_OBJECT
This object may be unused.
2
/meshes/0/primitives/0/attributes/TEXCOORD_0
" But I Don't know what that means.
I uploaded the file I am testing if you wanted to look at it.
https://drive.google.com/file/d/1JPLh9YELbWTffP7mHefZT7v2FmyJtujR/view?usp=shari...
Try this with the original file:
https://kindeyegames.itch.io/c3-3dobject-alpha/devlog/828684/fix-accessors-add-s...
Ok, I looked and the ACE is already there. Use Enable Quaternion and Set Quatrenion.
Set quaternion uses this format: "[x,y,z,w]", where x,y,z,w are the values of the quaternion.
You can use JS to create the quaternion using the globatThis.glMatrix libraries, they are documented here:
You could try:
Hi, thanks for your reply, here is a test .....
https://drive.google.com/file/d/1Z3WFFDmTIyCTQur6u1Bz4tMStKRL2iF4/view?usp=drive...
original question....
I have tried every way to alter rotation but can't achieve this. please help.
It just picks a point in the mesh defined by the number and position of the point in the mesh list of points.
If you want to be more specific create a very small box and attach it to the model where you want the node to be, so that any of the points will be close to the location desired.
Also be aware that this may not work in gpu skinning. Instead use static geometry setting when this is needed.
Hi kindeyegames,
I'm working on a simulation game about a children's playground, but it will take a while (only 30% of the progress is done at the moment).
Due to the fact that there are a lot of 3D models used (about 30 different models), the performance will need to be optimized again later on (the image only show 1/5 of the game as it is still being designed).
I'll share it with you later if it's done.
Thank you very much for the addon, it makes it easier to make 3D games!
Hello, can you show me using a small example in Construct 3 engine, how to display 3D models and animations for all players using the Photon Engine multiplayer plugin.
tried different options. And for the first person who entered the room, his 3D avatar is displayed, but for all subsequent ones, it is not displayed, as well as the animations that are triggered.
Hey kindeyegames, I'm not sure if you saw my reply to your request of a project file containing the bugs I had reported previously. Since the response was pretty deep in the thread, you may have missed it, but I did manage to put together a demo for you showcasing the issues I mentioned back then.
Here's the link to the demo just in case you didn't see it:
https://creativeed.itch.io/construct-3-3d-object-rotate-3d-bugs
Hi kindeyegames,
I'd like to follow up on the progress of fixing this bug, as I've noticed that it keeps causing some strange issues.
Currently it has come up again:
if the 3DObject is set to Static, when loading a material from sprite, some sizes of the sprite canvas (eg: 256x256) will causes the material to render incorrectly.
This can only be solved by disabling the project's "Max spritesheet size". This may be the same bug causing the problem.
Please check the screenshot below, and the new .c3p file.
Demo file: