Problem loading texture on obj

17 views
Skip to first unread message

marco....@elmansrl.eu

unread,
Apr 18, 2024, 3:40:34 AMApr 18
to OpenSceneGraph Users
Greetings,
I'm writing because I'm facing the following problem:

in my application I need to use different .obj models at runtime, so I pre-load them as static variables:

static osg::ref_ptr<osg::Node> model = osgDB::readNodeFile(containerResourcesUrl + "/ModelResized/CargoShip/cargoMin.osgb");

the model needs to be georeferenced in osgEarth, so I put it in a tree logic like

ModeNode -> PositionAttitudeTransform->osg::Node

The problem lies in the fact that, sometimes (on some models and not always the same ones) the vertices and materials are loaded, while the textures are not loaded.

The curious aspect is that, for debugging, I loaded a test model with the same logic and at the same position as the model, but moved along the z axis and after several tests I noticed that in this case the texture problem does not occur. It seems to me as if in this way the "transverse" is forced on the model...

Can you help me?

Reply all
Reply to author
Forward
0 new messages