Results 1 to 7 of 7

Thread: NURBS Surface as "psurface" element

  1. #1
    Vermeer
    Guest

    NURBS Surface as "psurface" element

    OK,

    So I'm writing this COLLADA importer using COLLADA DOM. I'm using Feeling Software's ColladaMaya to generate a simple NURBS taurus as a test case.

    When I look at the DAE code, the surface is encoded as a <psurface> element instead of a <spline> as it does for NURBS curves.

    <geometry id="nurbsTorusShape1-lib" name="nurbsTorusShape1">
    <psurface name="nurbsTorusShape1" udegree="3" vdegree="3" closed_u="0" closed_v="0">
    <source id="nurbsTorusShape1-lib-0-cvs">
    ...
    </source>

    ...

    </psurface>
    </geometry>
    What are <psurfaces>? Where can they be found in the COLLADA documentation? Does COLLADA DOM parse them?

    Also, can someone explain the current state of support for NURBS surfaces in COLLADA?

    Thanks.

  2. #2
    Vermeer
    Guest

    ColladMaya Jan 2007 Version - No NURBS Surfaces

    OK, This is weird...I just downloaded the new ColladaMaya, and it doesn't export NURBS surfaces anymore.

    To be more precise, I get the local transform (under <library_visual_scene> ), but curiously, the geometry library is missing.

    Is it a bug or I forgot something?

    <?xml version="1.0" encoding="utf-8"?>
    <COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
    <asset>
    <contributor>
    <author>vermeer</author>
    <authoring_tool>Maya 7.0.1 | ColladaMaya v3.00 | FCollada v3.0</authoring_tool>
    <comments>Collada Maya Export Options: bakeTransforms=0;exportPolygonMeshes=1;bakeLightin g=0;isSampling=0; curveConstrainSampling=0;exportCameraAsLookat=0; exportLights=1;exportCameras=1;exportJointsAndSkin =1; exportAnimations=1;exportTriangles=0;exportInvisib leNodes=1; exportNormals=1;exportTexCoords=1;exportVertexColo rs=1;exportTangents=0; exportTexTangents=0;exportConstraints=1;exportPhys ics=1;exportXRefs=1; dereferenceXRefs=0;cameraXFov=0;cameraYFov=1</comments>
    <source_data>file:///C:/Documents%20and%20Settings/nick/My%20Documents/maya/projects/default/untitled</source_data>
    </contributor>
    <created>2007-01-16T20:30:07Z</created>
    <modified>2007-01-16T20:30:07Z</modified>
    <unit meter="0.010000" name="centimeter"/>
    <up_axis>Y_UP</up_axis>
    </asset>
    <library_physics_scenes>
    <physics_scene id="MayaNativePhysicsScene">
    <technique_common>
    <gravity>0 -980.000000 0</gravity>
    <time_step>0.083000</time_step>
    </technique_common>
    </physics_scene>
    </library_physics_scenes>
    <library_visual_scenes>
    <visual_scene id="VisualSceneNode" name="untitled">
    <node id="nurbsTorus1" name="nurbsTorus1" type="NODE">
    <rotate sid="rotateZ">0 0 1.000000 0</rotate>
    <rotate sid="rotateY">0 1.000000 0 0</rotate>
    <rotate sid="rotateX">1.000000 0 0 0</rotate>
    <scale sid="scale">4.970612 4.970612 4.970612</scale>
    </node>
    <extra>
    <technique profile="FCOLLADA">
    <start_time>0.041667</start_time>
    <end_time>2.000000</end_time>
    </technique>
    </extra>
    </visual_scene>
    </library_visual_scenes>
    <scene>
    <instance_physics_scene url="#MayaNativePhysicsScene"/>
    <instance_visual_scene url="#VisualSceneNode"/>
    </scene>
    </COLLADA>

  3. #3
    Vermeer
    Guest
    OK. Problem solved. There's no NURBS support in ColladaMaya. Anyway, NURBS are not explicitly part of the standard...yet.

  4. #4
    Senior Member
    Join Date
    Jul 2004
    Location
    Santa Clara
    Posts
    356
    There is nothing preventing the Maya exporter to export Nurb geometry as a Maya specific profile, such as it is the case with many other Maya specific extensions.
    You should ask Feeling Software about this, <psurface> (patch surface) could most probably be made available this way.

  5. #5
    Vermeer
    Guest
    You are right. Nothing prevents them, but in the end, I believe that NURBS should be explicitly included in the COLLADA standard, just like th e<mesh> element.

    The fact is that NURBS are a very good generalization for Bezier, B-Splines as well as other basis. The math is well known and they have been implemented in various systems since around 1983. So, this is not like too cutting-edge.

    Plus, they are super-easy and economical to parse - way more than polygons.

    Please add them to the standard: they are not just a Maya special case. Then, Feeling can put them back in their plugins and everyone will be the happier

    Thanks.

  6. #6
    Senior Member
    Join Date
    Jul 2004
    Location
    Santa Clara
    Posts
    356
    Quote Originally Posted by Vermeer
    Please add them to the standard: they are not just a Maya special case. Then, Feeling can put them back in their plugins and everyone will be the happier
    Sure, this will make it way to the standard one of those days. I was just saying that if you are in a hurry you can get it sooner as a valid extension to the current specification (That's why COLLADA is designed extensible)

    And if you do so, then you can provide feedback to how this new feature should best be implemented in COLLADA.

    ... or, you can stay passive and wait.

    Regards

  7. #7
    Vermeer
    Guest
    Good point Indeed, I should just get the FCollada source and add what I need.

    I think a good place to start is to match the NURBS implementation that currently exist in the Wavefront OBJ format - which includes trimming curves.

    The big danger in exporting NURBS surfaces from Maya is to handle the trim curves properly.

    I'll see if & when I can get started on this...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •