NuPatch Algorithm

Prashant
2007-10-24
2013-04-25
  • Prashant
    Prashant
    2007-10-24

    Hi,

    When exporting NURBS from liquid, the code for exporting NuPatch for "vertex hpoint Pw" is:

    MItSurfaceCV cvs( surface, liquidRenderer.requires_SWAPPED_UVS == false );
    RtFloat* cvPtr = CVs;

    while( !cvs.isDone() ) {
    while( !cvs.isRowDone() ) {
    MPoint pt = cvs.position( MSpace::kObject );
    *cvPtr = ( RtFloat )pt.x; cvPtr++;
    *cvPtr = ( RtFloat )pt.y; cvPtr++;
    *cvPtr = ( RtFloat )pt.z; cvPtr++;
    *cvPtr = ( RtFloat )pt.w; cvPtr++;
    cvs.next();
    }
    cvs.nextRow();
    }

    cvPtr stores point data for "vertex hpoint Pw". While writing in rib format the polarity of points changes in some order.

    I need to know the algorithm for doing this.

    Cheers

     
    • Okan Arikan
      Okan Arikan
      2007-10-24

         Hi,

         Are you using Pixie to generate the RIB? In other words, is this a Pixie question or a more general RenderMan question?

         Okan

       
    • Prashant
      Prashant
      2007-10-24

      Hi,

      This is general RenderMan question and a quick help will be greatly appreciated.

      Thanks

       
    • Okan Arikan
      Okan Arikan
      2007-10-24

         In that case, I do not understand what you mean by the "polarity of points". The documentation about the NuPatch in RenderMan is available at https://renderman.pixar.com/products/rispec/rispec_3_1/section5.html#Patches

         Okan

       
    • Prashant
      Prashant
      2007-10-25

      Hi,

      In the above mentioned code cvPtr is the array containing all the points. How do write this array in rib?

      1. Directly in a loop for number of elements

      2. some other method

      In case if we do have some other method then you can explain me by using RiNuPatch command's variables if required.

      RiNuPatch( nu, uorder, uknot, umin, umax,
          nv, vorder, vknot, vmin, vmax, parameterlist )

      Thanks

       
    • Hi,

      such questions should be asked in the Usenet group comp.graphics.rendering.renderman.
      Or, why not learn from others using RiNuPatch(). You can find their source easily
      using source code search engines like e.g. koders.com:
      http://www.koders.com/default.aspx?s=RiNupatch&btn=&la=C&li=\*

      best regards,
      Randolf,
      --
      http://www.ayam3d.org/    Ayam, where sweeps don't flip.

       
    • Moritz Moeller
      Moritz Moeller
      2007-11-26

      See these threads:
      https://sourceforge.net/forum/forum.php?thread_id=1858250&forum_id=214928
      http://www.3delight.com/en/modules/PunBB/viewtopic.php?id=465

      I can only stress again: if you can't solve this problem yourself and this is for a personal project, maybe you just have to chew on it a little bit more. If it is for a commercial project, consider paying someone to help you out.

      .mm