Hi Carsten,
On 30.01.2013 16:45, Carsten Neumann wrote:
> Hello Christoph,
>
> On 01/30/2013 07:37 AM, "Christoph Fünfzig" wrote:
>> connected to the instanced geometry discussion,
>> I have to generate single-indexed triangle_strip geometry
>> or single-indexed triangles geometry. And I chose to use OBJ fileformat.
>>
>> Single-indexed triangle_strip geometry, I generate with
>> "
>> // load weed node
>> OSG::GraphOpSeq* dGraphOp =
>> OSG::SceneFileHandler::the()->getDefaultGraphOp();
>> OSG::GraphOpSeqRefPtr graphOp =
>> OSG::GraphOpSeq::create("GeometryMerge() MaterialGroupPushGraphOp()
>> Stripe(stitch=true force=false singleIndex=true)");
>> OSG::SceneFileHandler::the()->setDefaultGraphOp(graphOp);
>> OSG::NodeUnrecPtr model =
>> OSG::SceneFileHandler::the()->read("test.obj");
>> OSG::SceneFileHandler::the()->setDefaultGraphOp(dGraphOp);
>> "
>> What is the recommended way to get single-indexed triangles geometry
>> from OBJ?
> you could try the functions in
> Source/System/NodeCores/Drawables/Geometry/Util/OSGGeoOptimization.{h,cpp},
> specifically makeSingleIndexed() and makeIndexedTriangles{,Concave}().
>
great, single-indexed triangles work too :)
OBJSceneFileType loader creates a GL_POLYGON primitive per face of the
OBJ file.
Then
OSG::GraphOpSeqRefPtr graphOp = OSG::GraphOpSeq::create("GeometryMerge()
MaterialGroupPushGraphOp()");
merges into one geometry node (with directly attached material) and
makeSingleIndexed (geom);
makeIndexedTriangles(geom);
creates single-indexed triangles, which is ready for input to (my)
instancing.
Thanks a lot,
Christoph
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users