We could use some rudimentary tests for the OBJ loader to test correctness.
Most likely this can be as simple as creating a visual test that loads a number of OBJ assets of varying complexity into a single scene.
@bghgary , @deltakosh , @PatrickRyanMS , @brianzinn
I'm interested in getting your perspectives, are there any usecases or frequent issues we may want to make sure we're covering?
Visual tests like those for glTF would be a great addition. I have suggested that for the new feature request for "smoothing groups" (it's not a GH issue, but in forum). I have permission to use that asset that was shared - it has multiple smoothing groups, so was already going to add that as a visual integration test:
https://forum.babylonjs.com/t/box-with-3-mirrors-tracing-each-other/2277/3
My perspective is that it would be good to get OBJ files with different materials - many options are not implemented as you are discovering. Most issues in forum are related to wrong parameters/order and not rendering/materials.
Also, I added some actual rudimentary tests on scene loader recently as well for ObjFileLoader. ie:
https://github.com/BabylonJS/Babylon.js/commit/a8c0be2086634f52a670afc92a855a4327f61671
I'm willing to add visual unit tests, but where to get some free for use .obj files?
Is there a tool that could be used to convert an existing asset we already use (gltf for eg) to .obj?
File linked by @brianzinn can't be used as it is using smoothing groups that are not supported by the current loader (or it can be used but we should remove the smoothing group definitions).
I guess we should only add the one we already have in either playgrounds/scenes or on the web site. This already be a nice safe guard against regression ?
Ok. I could find:
I think a single unit test with the 3 meshes is ok, no need for 3 tests?
yup perfect !!!
Most helpful comment
Visual tests like those for glTF would be a great addition. I have suggested that for the new feature request for "smoothing groups" (it's not a GH issue, but in forum). I have permission to use that asset that was shared - it has multiple smoothing groups, so was already going to add that as a visual integration test:
https://forum.babylonjs.com/t/box-with-3-mirrors-tracing-each-other/2277/3
My perspective is that it would be good to get OBJ files with different materials - many options are not implemented as you are discovering. Most issues in forum are related to wrong parameters/order and not rendering/materials.
Also, I added some actual rudimentary tests on scene loader recently as well for ObjFileLoader. ie:
https://github.com/BabylonJS/Babylon.js/commit/a8c0be2086634f52a670afc92a855a4327f61671