Menu

Simple Mesh and Vertex / Face Order

2010-08-03
2013-05-28
  • Pat Stevenson

    Pat Stevenson - 2010-08-03

    I have an existing program that outputs VRML of an elevation grid and simple polygons that form a radial fan.  I've been converting this to output U3D and have been using the HelloWorld sample.  My problem is that HelloWorld is too complicated.  After leaving out the modifiers of animation, CLOD, etc it seems that I can't just make a simple AuthorMesh with diffuse shading on the vertices.  With the generator palette, CLOD resources, and GeomCompiler, it seems overkill just to do a simple tmesh with diffuse colors.  The main problem is that when I look at the model in Deep Exploration and view the properties of the mesh, it seems the library is reordering the vertices, eliminating whole faces, etc.  I can't debug my code this way.

    After looking through the forum, I tried to set the GeomCompiler params so that it doesn't generate CLOD, doesn't scrub, etc but I still am getting a reordering of things around.  I also looked at just the IFXMesh class instead of the IFXAuthorMesh and it seems the documentation is really lacking in using that class.

    Any ideas?
    Thanks

     
  • Patrik Mueller

    Patrik Mueller - 2010-08-03

    Hi,

    take a look to the SceneUtilities class inside IDTFGen. It makes the output generation easier. IDTFGen is also a very good sample to study U3D.

    Best regards.

    Patrik

     
  • Pat Stevenson

    Pat Stevenson - 2010-08-04

    I've been able to solve this problem.  The combination of GeomCompiler params (i.e. setting all to FALSE) and a more rigorous definition of vertices/faces seems to have fixed this problem.  After examining the properties of these meshes in Deep Exploration, everything seems to be in the right place.  I realize that file sizes will be big now because no CLOD and no compression, but when you try to debug a binary file output like u3d, I'll take any file size that turns out the right numbers.

    BTW, the final output of all this used to be VRML, and now I'm supporting U3D and also now a 3D PDF.  On the PDF side, you have to double the faces and specify them on reverse winding order.  Deep Exploration has options to turn backfaces on, but within the Adobe Viewer, you have to have both faces or the polygons disappear.

     
  • Michail Vidiassov

    > you have to have both faces or the polygons disappear.
    No you do not.
    There is a 3D preferences setting to turn rendering of both sides on globally in Adobe Reader.
    On the other hand there is a setting to turn on rendering of front/back/both sides per object in IDTF,
    you can search what its equivalent is in U3D.

     

Log in to post a comment.