mmp / pbrt-v4

Source code to pbrt, the ray tracer described in the forthcoming 4th edition of the "Physically Based Rendering: From Theory to Implementation" book.
https://pbrt.org
Apache License 2.0
2.89k stars 457 forks source link

.obj to pbrt conversion #360

Closed parishamaheshj18 closed 1 year ago

parishamaheshj18 commented 1 year ago

It's not actually an issue but could someone please comment on how I can convert my .obj file to .pbrt in version 4? I used to use obj2pbrt in pbrt-V3. but I can't seem to find that implementation in V4. I do see a whole folder of wavefront in V4.

I am currently trying to use pbrt v3 to convert .obj to pbrt with "obj2pbrt" and then upgrading from v3 to v4 with "pbrt --upgrade scene.pbrt > scene-v4.pbrt". But I just wanted to know if there is another way currently?

mmp commented 1 year ago

obj2pbrt was retired since it wasn't super robust and didn't handle every detail of the OBJ format. The better option now is to use assimp, which now has support for pbrt-v4 export. Or your current approach is perfectly reasonable, if a little indirect.