Learning 3d dev in Defold (SOLVED)

Hey guys.
I started learning 3D in Defold today, and I must admit that it was a fun experience.
However, I as I always do, I have some questions about using 3d in Defold :wink:

  • Having multiple meshes in one scene - @sven helped me solve it here
  • But, those merged multiple meshes don’t have textures - again, @sven said to

ā€œEnsure UV Maps are named the same prior to merge (unless you want the UV Maps to remain separate) then combineā€

How do I do this? (honestly, I opened blender for the first time today :crazy_face:)

ALERT!! - More questions are on their way :smile:

4 Likes

Excellent questions! I’d love to get some input here and use as basis for a new manual page.

2 Likes

More of a Blender question than anything Defold-related really.

I messed around with the collada version a bit and couldn’t figure out why it wasn’t working. Then I tried importing the OBJ version into blender → selected them all → join → export collada → boom, it just works. (It even exported to have the right rotation in Defold on the first try!)


Oh, I spoke too soon. Importing the collada works fine, you just have to rename the UV maps. Somehow I couldn’t figure out how to double-click before. :blush: You can find the UV maps in the ā€œobject dataā€ tab (the little triangle mesh icon thingy) in the properties pane. Then you just double-click to start renaming them. If you name them all the same before joining then it works.

3 Likes

If you’re new to Blender, one tip: you can press space and start typing to search for commands, so you don’t have to remember the hotkeys for everything.

3 Likes

Yayy!!! :partying_face: Got it working exactly as I wanted :muscle:.

But I am not over yet, there’s still a couple of things I want to know :
Q2 : - After setting up the cars, I moved on to add some environment. Fortunately, the kind Kenney has already made one, so I didn’t have to go far. For reference, here it is. But unfortunately, it pings up another problem, multiple materials aren’t supported in Defold. Any possible workarounds?

Q3 : How do we go about 3d physics in Defold. Is it similar to 2d, or different?

As a side note : I am really enjoying Defold’s 3D :grin:

3 Likes

But unfortunately, it pings up another problem, multiple materials aren’t supported in Defold

Multi texturing is an upcoming feature.

How do we go about 3d physics in Defold. Is it similar to 2d, or different?

I’d say similar. What we currently don’t support is to select a model file (e.g. collada) to choose the physics shape(s) from.

2 Likes

As I will be working with box shapes, it won’t be a problem :slight_smile:

Any workarounds for now?

1 Like

Q2: I guess now you know the cost of ā€œfreeā€ assets. :stuck_out_tongue: I’m not an expert on modern 3D workflow, but to me it doesn’t make any sense for these assets to have multiple materials, unless you’re doing something fancy with shaders that you can’t get with a traditional texture + normal map + specular map shader. I think the best option is to texture & UV map them yourself. In Blender, if you have the materials tab open while in edit mode, you can select all the vertices that are assigned to a certain material, so if you just want flat colors this shouldn’t be too difficult once you figure out the general workflow.

4 Likes

That’s why I hate using free assets :smiling_imp: . But having zero creativity, and almost no Game Dev funds :moneybag: means that I am bound to them.

Anyways, I just wanted to say that my first experience with Defold 3D was quite fun, and in the end, I was able to do what I wanted. Thanks a lot @sven @ross.grams and @Mathias_Westerdahl for helping me. :slight_smile:

4 Likes

I’d suggest version up to 2.80. The workflow is so much nicer :slight_smile:

2 Likes

Pff, you don’t need creativity to make boxy little cars and roads, just go for it. Though using free assets probably still saves time getting -something- up and running. You could also check out MagicaVoxel–it’s pretty fun and simple to play around with, and when I tried it it was easy to get the models+textures into Defold.


@gianmichele Haha, yup, just downloaded it a few hours ago! So far nothing is very different, they just moved a bunch of the tools around, though a few things work a bit nicer. It’s definitely a good change though, much more beginner-friendly. [Edit] (…okay, anyone-friendly.)

2 Likes

Hmm. Maybe I should leave my comfort zone sometimes and start learning some useful things :wink: