3d object doesn't show up in game

ERROR:GAMESYS: Failed to create Model component. Material vertex space option VERTEX_SPACE_LOCAL does not support skinning.
WARNING:RESOURCE: Unable to create resource: /_generated_91034f4d.modelc: NOT_SUPPORTED
WARNING:RESOURCE: Unable to create resource: /_generated_eff192e8.goc: NOT_SUPPORTED
ERROR:GAMEOBJECT: Could not instantiate game object from prototype /_generated_eff192e8.goc.
WARNING:RESOURCE: Unable to create resource: /game/minigames/guest-service/shelving/shelving.collectionc: FORMAT_ERROR

Originally I got this error when trying to play the game after importing my 3d object and the textures with it so I changed the vertex space to world, however it’s still black, which confuses me. I was reading up on Defold materials manual and am thinking it might have to do with render.enable_material() or something along those lines but am not sure what I should do now.

The model has no animations so I left it blank, but I think I imported everything in correctly after reading 3D models in Defold? Thanks in advance to anyone who replies.

You have an error in the console there, is that relevant?

Otherwise, I’d look into that the lighting of your shader works.
E.g. set the output color of the pixel shader to something related to the incoming light.
Then move on to the normals, to make sure they seem correct.

Hi there, so there is no skeleton for your model and no animations - what happens if you leave these fields blank and just fill in the fields for mesh, material and texture? At least the error should be gone then.

1 Like

Hello, as @raetia mentioned the animation fields are not blank and should be if no animation is provided.

These 3 properties are the animation properties for your model. So it assumes that the provided (.dea) has a skeleton and also if the (Animations) property also has no animation there is no need to add anything to this field and the (default animation) is there for when you have provided animations in a set or a single animation and can choose a default animation to play. If you remove the .dea url from these fields the error should go away and then you can focus on the textures showing on the model.

1 Like

Thanks for the idea guys but I just tried that and it still hasn’t worked. I wonder if it’s due to lack of lighting? I don’t have a normal map or shadows attached to it, and it’s not a sprite even.

Yes it could be lighting, you are using the built-in model.material which does take in a lighting constant. Also could be the rendering script. Did you start your project from the template basic 3d? The basic 3d template provides a render script which renders the model predicate, otherwise you would need a custom renderscript with model rendering. Default empty project renderscript is 2d oriented.

1 Like

I did not, and that was my bad, I decided to switch to using 3d models last second to reuse them so I was using the desktop template beforehand. Should I just make a project using the basic 3d template, then copy the render scripts from there and import them? Thanks MasterMind for replying. Or could I just modify the material so it doesn’t take in 3d lighting and instead is only texture based?

You could copy or download the main.render and main.render_script from the basic 3d template and add it to your project and make sure to add it to the project setting > main> bootstrap > Render . You could also study the basic 3d template to learn about the light and add it to your project or copy the model.material + model.vp + model.fp add it to your project and edit the fragment program to be unlit( you would also need to set the .vp and .fp in the copied material).

Here’s the template on github you can copy or download it from here or you can just create a project straight from defold if you’d like

1 Like

Thanks, will get back to you if I have more troubles with applying this.

You could also share your project here and pehaps someone will take a closer look at whats wrong.


Thanks Mathias, will do soon, I have to figure out another problem first before this one, and unfortunately I do have a time limit. :sweat_smile: