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

Ian Tester ian at testers.homelinux.net
Wed Feb 15 15:44:24 CET 2006


On Wed, 15 Feb 2006 13:57:52 +0100
Thomas Bleicher <tbleicher at arcor.de> wrote:

	[snip]

> 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").

Almost. Sorry to nitpick, but all of the numbers in the face 'f' lines are
indexes. The preceding 'v' lines define vertex coordinates (x,y,z), the
'vt' lines defined texture coordinates (u,v), and 'vn' lines defined
normals (x,y,z).

e.g
v 0.485127 -1.896 1.33107
...
vt 4.03466 -0.392051
...
vn -0.0165774 -0.999061 0.0400231
...
f  352/1/1 358/2/1 364/3/1

All indexes start from 1. If there are no texture coordinates or a surface
normal for a face, those fields are left blank like you showed.

e.g
f 352// 358// 364//

Is this what you're seeing, Nicholas? If it is, you have to find a way to
produce a .obj file with this information. I can't be of much help
there. Otherwise obj2mesh and Radiance have nothing to work on. Then your
only option is to write your own functions for texture mapping and normal
smoothing.

bye



More information about the Radiance-general mailing list