0
\$\begingroup\$

I'm trying to create some simple assets for using in my rendering engine. What I'm trying to do is to generate simple low poly models and then importing them into my application using Assimp. I can successfully import models I find on the web so everything works fine application-wise. But since I'm a total noob at Blender (I managed to learn some interface basics through tutorials) I just seem able to export a model with geometry information (vertex positions) and that's it. My models don't have normals or uv-cordinates, and no textures whatsoever. What I'm asking is a simple workflow to create and export a very simple mesh to a obj or collada format that I can read into my code.

\$\endgroup\$
2
  • \$\begingroup\$ It's unclear whether you want to export with normal and uv data or that you just want vertex data. Does Assimp automatically process normals and uvs? \$\endgroup\$
    – Sidar
    Commented May 15, 2018 at 12:15
  • \$\begingroup\$ "What I'm asking is a simple workflow to create and export a very simple mesh to a obj or collada format that I can read into my code." I want to create a model, import it and render it using a simple shader in my game engine. So I need vertex data (positions, normals and uv coordinates) and material/texture data. \$\endgroup\$
    – Luca
    Commented May 15, 2018 at 12:42

1 Answer 1

1
\$\begingroup\$

This is more of a Blender than a gamedev question. OBJ supports both normals and UV maps, which are exported by default in the OBJ exporter.

Blender will auto-calculate the normals. UV maps are edited by Unwrapping the Mesh.

For example, from an empty Scene, I can:

1) Add [Shift-A] -> Mesh -> Monkey
2) Edit Mode [Tab]
3) Menu [Space] -> type "Unwrap", [Enter]
4) File -> Export -> OBJ, (check "only selected item")

and I get a monkey.obj with UVs and Normals

\$\endgroup\$
3
  • \$\begingroup\$ Ok, but what If I add some materials to the scene or textures? How can I generate the texture files to be sampled with the texture coords? \$\endgroup\$
    – Luca
    Commented May 15, 2018 at 15:27
  • \$\begingroup\$ The OBJ format goes hand-in-hand with the MTL material format, which will also be exported if you have a material mapped. \$\endgroup\$
    – Jimmy
    Commented May 15, 2018 at 15:42
  • \$\begingroup\$ I think the standard specular/diffuse colors from the materials are exported correctly to the MTL, but I don't remember \$\endgroup\$
    – Jimmy
    Commented May 15, 2018 at 15:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .