On 23/10/09 10:58 AM, Ulrich Hertlein wrote:
On 22/10/09 9:40 PM, tien dat wrote:
I have a model in obj format and want to load the model into
OpenSceneGraph. When there is no texture, OpenSceneGraph can load the
model fine. But when I use the model with texture, OpenSceneGraph
allocates a huge amount of memory and crashes. I think it's a runtime
bug and would like to know how to fix it. Please find some pictures

Not really a bug, I'd say you're running out of memory.

- try to reduce the image sizes.
- a lot of materials reference the same image. I don't think the obj
loader caches this which means you're loading that image over and over
again. Use osgDB::Options to specify caching of images.

Oh, and you seem to have pretty much one material per drawable. This will absolutely kill your performance. Have a look at the .mtl file, you'll notice that there are heaps of materials that have identical properties.

/ulrich
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to