[Radiance-general] OBJ2MESH - Phong smooth shading and texture mapping

Thomas Bleicher tbleicher at arcor.de
Wed Feb 15 13:57:52 CET 2006


On 15.02.2006, at 13:26, Nicolas Roy wrote:

> Hi all,
>
>
> I recently tried using OBJ2MESH for applying smooth shading to  
> models, made
> using a 3rd party CAD software, and also to map textures. None of it
> worked.

Sorry to hear that. I tested obj2mesh recently and it work for my
file (tested smooth shading only).

Does your CAD app provide vertex normals and uv texture coords?
obj2mesh does not generate it's own coordinates but only translates
those found in the file.

I don't know much about the *obj file format so the following
instructions may not be correct:

To check vertex normals open your *.obj file with a text editor.
For every line starting with "v " there should be a "vn "
line for the vertex normal direction. This alone is no
prove but it shows the normals are exported. I don't know
if *.obj _requires_ normals for each vertex. They still could
be face normals which would show no smoothing effect.

To check UV-coordinates check the lines starting with "f ".
The three or four sets of numbers have the form

<vertex index>/<uv-coord>/<vertex normal>

If no uv-coord is present the field will be empty (like "1//1").


If your app does not provide uv-coords and normals you could
use a 3D modeler with DXF import to convert your geometry to
*.obj files. For simple DXF files Blender (www.blender.org)
can do that.


Thomas




More information about the Radiance-general mailing list