My 3D asset workflow

This is my 3D asset pipeline. I have been doing 3D modelling for a whole week so there are probably much better ways of doing things, please offer me your advice!

I haven’t tackled animation yet.

Tools used

Everything is open source and linux friendly.

  • godot 4.2
  • blender 4.0
  • armorpaint (main branch)
  • material maker v1.2p1

Armorpaint is used rather than blender’s built in painting because it
supports painting multiple texture channels at once, e.g. painting roughness,
metallic, colour, normal and height all with one sweep.

Steps

blender

  1. make an untextured model, both a high poly & low poly version
  2. uv unwrap both and adjust so there will be more texels where it is more important
  3. export the high poly as a wavefront obj

armorpaint

  1. open the obj in armorpaint and paint it
  2. export the textures from armorpaint, including colour, metallic, roughness, normals and height

back to blender

  1. apply the armorpaint textures to the high poly model material
  2. bake the textures into the low poly model and save them as png (look up a tutorial for this)
  3. export the low poly object to glb/gltf, do not include the materials

material maker

Using material maker at this point has the advantage of letting you see what they will look like
in godot (as MM itself is made with godot) and also packing the channels automatically rather than
manually doing it in blender.

  1. make a new material using the baked pngs
  2. export it to godot format (some_material.tres)

godot

  1. import the baked pngs and the glb
  2. go to the advanced import settings for the glb (double click the glb in filesystem)
  3. click mesh and check enabled on “save to file”
  4. set the path to save to file, e.g. some_mesh.tres
  5. hit re-import
  6. go to the import settings for your pngs (click png in filesystem, click import tab top left pane)
  7. set the options like “high quality” and compression mode as you prefer
  8. In your scene, add a meshinstance3d (do not add the glb to your scene)
  9. load the mesh resource (some_mesh.tres) into the meshinstance3d’s mesh property
  10. set the mesh’s material (or it’s material override) by loading the material resource (some_material.tres)

When you need to make any changes, update the files in blender and do it all again. At least for the godot side though you should get the new models and textures in your existing scenes without having to touch anything.

Other thoughts

I just discovered that material maker has a “painter project” mode which could potentially do away with the need for armorpaint.

Armorpaint also has a baking mode which could potentially replace doing that in blender.

It is definitely worth working entirely in one quality mode (low or high) and probably without textures to
avoid all this garbage, at least before things are finalised.

Baking in blender is screwy. I noticed the base colour channel leaking into the roughness and metallic maps, so my workaround was to disable every input channel on the PBR apart from the one I want to bake.

Blender’s cycles renderer has no option to bake metallic or height but you can abuse the roughness baking and plug whatever texture you want to that channel on the high poly material.

Armorpaint really doesn’t like UVs outside the (0, 0), (1, 1) boundaries.

6 Likes

I personally do everything in Blender so far. For baking, I recommend Bystedt’s Blender Baker addon. It works well in 3.x, but not 4.x. However, it helps so much that I think it’s worth opening your files in 3.6 just for that addon alone.
Keeping things in Blender lets me make full use of its node systems that I use heavily for materials.

For baking, another trick is to use an emissive shader for material output, connect whatever you need there, and bake emissive.

Also, I don’t think you need to pack channels, Godot does that automatically whem importing glTF files with PBR materials and embedded textures.

3 Likes