Hi,
i try to load a obj file, then i get a node object. But i need a mesh or geometry object. in a test case it is possible to cast this, but not in my case. maybe i export the obj file wrong? can i get a geometry oder mesh from a node? are there some utility or builder classes which provide such a feature?
in jme3 testcase (TestobjLoading):
Geometry teaGeom = (Geometry) assetManager.loadModel(“Models/Teapot/Teapot.obj”);
why that doesn’t work with my obj file?
best regards nice2k
[snippet id=“13”]
What Normen said 100%. When I first found this I got a little giddy because I realized how easy it would be to build a custom level/environment loader with this ability.
~FlaH
Ok now i got the geometries, but now i get the next problem. The loaded geometries aren’t merged any longer by the GeometryBatchFactory. Is my way the right way to load many objects from a obj file? The exported file only contains two geometries with different textures. When i replace the “obj geometries” with a simple box all runs fine.
Best regards
Nice2000
They cant be merged when they have differing materials.
Ah thx, now i cached the material and all is fine.
Best Regards Nice2000