Obj2mesh material

Hi, I would like to import an obj file without any texture. What I do is:

obj2mesh myObj.obj > myRtm.rtm

then in myRad.rad:

void metal myModel_m
5 0.4 0.367 0.116 0.85 0

myModel_m mesh myModel
1 myRtm.rtm

when I try to visualize the object e.g. with objectview I can’t see anything. I have imported obj with texture in the past and they worked fine. I was wondering if you could help. Thank you in advance!

I don’t see anything obviously wrong with your “myRad.rad” file. You have specified a very shiny material, but it should still show up with objview. Are you certain there is something in your .OBJ file? What prints out if you run “obj2mesh -v”?

For small or medium-sized .OBJ models with no texture, using obj2rad or “robjutil +r” are good alternatives that export directly to Radiance scene files.

Hi Greg, thank you for your reply. This is what I get:

obj2mesh: warning - 619 of 15279 statements unrecognized
Mesh statistics:
	0 materials
	22 patches (0.15 MBytes)
	5451 vertices (97.5% w/ normals, 100.0% w/ uv)
	6108 triangles (77.3% local, 22.0% joiner)
	27567 leaves in octree (41.7% empty, 4.58 avg. set size)

Could that ‘0 materials’ be the culprit?

The 0 materials isn’t really an issue. Any chance you could post your model somewhere to take a look at?

Thank you Greg. I think I found the problem(s).
First: The name of the material in Radiance, myModel_m in my example, should be the same (?) for the material I assign to the object in my modeling software before exporting it as obj.

Second: my model included three different lampstands placed at some distance one from the other so the objectview had some difficulties in showing very thin and tall objects, distant one from the other.

The modifier given for the “mesh” primitive should override anything in the .OBJ file, so I don’t think that was the issue. The sampling in objview can be an issue, though. You can override it with “set ps 1” inside rvu in future.