Show
Ignore:
Timestamp:
03/10/10 17:05:52 (3 years ago)
Author:
robert
Message:

From Sukender, "I've fixed positions for 3DS writer. Points in 3DS must be in world coordinates and I added what was missing.
And by refactoring a bit of code, I may have fixed some StateSets? related bugs (was ignoring StateSets? for osg::Groups).
I also added support for Billboard's points, so now "osgconv lz.osg lz.3ds" has an acceptable output. However, there is no rotation depending on billboards' axis, hence the notice "Warning: 3DS writer is incomplete for Billboards (rotation not implemented).". You may want to remove this notice (or lower the notify severity) if you feel 3DS doesn't have to handle such rotations.
The attached archive contains 3 files from 3DS plugin, against rev. 11162.

Please note there is still the textures issue for cow.osg. I guess it's because it's not a "flat, dummy and standard" texture in slot 0... That is to say the only thing the writer can handle at the moment. I guess I won't address this soon.
"
and

"I've detected and fixed another bug in 3DS writer: support for automatic splitting of meshes having >65k faces/points was buggy (was deleting faces).
Here is my four 3DS modified files (in a ZIP), against rev. 11193, including previous fixes AND Stephan's fix about relative filenames."

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/3ds/WriterCompareTriangle.cpp

    r11056 r11194  
    4949    unsigned int nbVerticesZ = static_cast<unsigned int>( (nbVertices * k) / (length.x() * length.y()) ); 
    5050 
    51     setMaxMin (nbVerticesX, nbVerticesY, nbVerticesZ); // This function prevent from cut scene in too many blocs 
     51    setMaxMin (nbVerticesX, nbVerticesY, nbVerticesZ); // This function prevent from cutting the scene in too many blocs 
    5252 
    53     osg::notify(osg::ALWAYS) << "Cutting x by " << nbVerticesX << std::endl 
     53    osg::notify(osg::INFO) 
     54        << "Cutting x by " << nbVerticesX << std::endl 
    5455        << "Cutting y by " << nbVerticesY << std::endl 
    5556        << "Cutting z by " << nbVerticesZ << std::endl; 
    5657 
    57     osg::BoundingBox::value_type blocX = length.x() / nbVerticesX; //This 3 lines set the size of a bloc in x, y and z 
     58    osg::BoundingBox::value_type blocX = length.x() / nbVerticesX;    // These 3 lines set the size of a bloc in x, y and z 
    5859    osg::BoundingBox::value_type blocY = length.y() / nbVerticesY; 
    5960    osg::BoundingBox::value_type blocZ = length.z() / nbVerticesZ;