Basic 3d example

I’m now trying 3d with Defold. Since I see that Defold supports 3d, I expect something must be super easy to start for beginner but it is quite confused…

I was just adding a model like this:

But when running, what I see is just a black screen. Do I need a light source to light objects?

1 Like

Highly recommend you to start with Basic 3D project.
In your case, you don’t have the camera on the collection

2 Likes

Ah, it seems a camera is required for 3d to render normally

1 Like

I’m following this guide but it seems something not working properly or I missed something…

What I’ve got: looks like just a part of it is displayed

I don’t know much about Blender but did you join the meshes?

I think it’s an optional step since I just exported a selected mesh

Only the part which you selected was exported. In blender it is showing that you have the center part selected in a parented object of multiple meshes. The TRON BIKE > BACK mesh is selected for export. With the dea format exporting you should join the desired mesh parts or export all the pieces separately if that’s your intention. The guide is a bit off on several things, the materials for dea format don’t matter at all. Also Z should be forward and Y up for global orientation. Note that with glTF you can export multiple selected meshes as a single mesh object.

edit : If you have exported correctly the part you want and it isn’t showing in defold it could be that the normals need to be flipped for the parts not showing but it doesn’t look to be the case from the photo.

Yes, the BACK mesh should be the whole back wheel which is marked in orange lines. There are other meshes but I set eye off to focus on this wheel.
It seems just the center of this BACK wheel is showing in Defold editor?

I can also see a mirror modifier which should be applied, then there is the question of is it being applied on export? Also if it is applied are the normals pointing outward. By default in defold inside facing normals will not be rendered.

1 Like

I don’t even know what a mirror modifier is. Here is the place I downloaded the model TRON BIKE | CGTrader

Took a look at it, the mirror modifier was not applied on export so you had exported half the wheel and part of it was facing away from the camera. The problem really is that usually these downloadable models are not game ready assets. This model has more than a few small issues with topology, ngons , needs uv unwrapped for texturing, modiefiers need to be applied and cleaned up. I took a minute to do that and throw it in defold just for example if you wanted to look it over. I added the .blend file in the project and made some shaders one for texture and one for displaying vertex colors. Hope it helps


Tron_Bike.zip (489.1 KB)

ps. uv mapping and texture is quick and dirty :grimacing:

3 Likes

Thanks a lot! This is more than what I was expected.
There are many things I should learn from blender to defold.
It’s still a long journey…

2 Likes