• Forum
  • Education
  • Rendering Software
  • Renderman
  • facevarying class?
  • Coolthreads cool cool
    Adversitment
    + Reply to Thread
    Results 1 to 5 of 5

    1. Kungfu_Hampser's Avatar

      United States

      Kungfu_Hampser is on a distinguished road

      Join Date:

      Jul 2005

      Posts:

      3

      Rep Power:

      0

      July 15, 2005

      # 1
      Can someone please explain to me what the facevarying class does in renderman and where to find more info about it in the docs? I seem to be having trouble finding out more info about this new class...

    2. titus's Avatar

      Mexico

      titus is on a distinguished road

      Join Date:

      Jan 2002

      Posts:

      1,651

      Rep Power:

      14

      July 15, 2005

      # 2
      I'm guessing here, but following the logic behind RenderMan variables I think this has something to do with having more than value per every vertex, just like having multiple UV sets. This is from the RIBBit documentation:

      "Without facevarying UVs you can only get a one to one correspondece of vertex coordinates to UV coordinates. This makes any type of useful UV mapping pretty much impossible... Not all renderers support facevarying"




      AttributeBegin

      Attribute "identifier" "name" ["Plane1"]


      PointsGeneralPolygons [1 1 1 1 1 1 1 1 ...



      "facevarying float s" [0 0.1 0.1 0 ...


      "facevarying float t" [0.9 0.9 1 1 ...


      "facevarying float u_uv2" [0.444444 0.455556 0.455556 0.444444 ...


      "facevarying float v_uv2" [0.9 0.9 1 1 ...


      AttributeEnd

    3. July 15, 2005

      # 3
      So, is it jsut a more complicated form of an array? An array that focuses on geometric information?

    4. July 16, 2005

      # 4
      Not exactly, is the way the variable will be used by the renderer. Facevarying is really new for me but I'm friend of the older types . To understand the scope of a variable here's a snippet of the RiSpec:

      "11.7 Uniform and Varying Variables

      A renderer implementation may choose to shade many points, or even large regions of a
      surface, at once. How large a such a region may be is implementation-dependent.
      Shaders contain two classes of variables: uniform variables are those whose values are constant
      over whatever portion of the surface is being shaded, while varying variables are
      those that may take on different values at different locations on the surface being shaded.
      For example, shaders inherit a color and a transparency from the graphics state. These
      values do not change from point to point on the surface and are thus uniform variables.
      Color and opacity can also be specified at the vertices of geometric primitives (see Section
      5, Geometric Primitives). In this case they are bilinearly interpolated across the surface,
      and therefore are varying variables.

      Local variables and arguments to shaders are declared to be either uniform or varying by
      specifying a storage modifier:

      varying point p;
      uniform point q;

      Variables declared in the argument list of a shader are assumed to be uniform variables by
      default. These are sometimes referred to as instance variables. If a variable is provided
      only when a shader is instanced, or if it is attached to the geometric primitive as a whole,
      it should be declared a uniform variable. However, if a variable is to be attached to the
      vertices of geometric primitive, it should be declared as a varying variable in the shader
      argument list.

      Variables declared locally in the body of a shader, as arguments to a function, or as local
      variables are assumed to be varying. Declaring a variable to be uniform inside a shader
      or function definition is never necessary, but may allow the compiler to generate more
      efficient code, particularly for renderer implementations that can shade large regions of a
      surface at once.

      If a uniform value (or a constant) is assigned to a varying variable or is used in a varying
      expression, it will be promoted to varying by duplication. It is an error to assign a varying
      value to a uniform variable or to use a varying value in a uniform expression."

    5. July 16, 2005

      # 5
      Here's more (human readable) information:

      Class specifiers identify how a primitive variable will be interpolated over the uv parameter space of a surface primitive. The set of class specifiers for Photorealistic RenderMan is:

      Constant: One value remains constant over the entire surface primitive.

      Uniform: One value remains constant for each uv patch segment of the surface primitive.

      Varying: Four values are interpolated over each uv patch segment of the surface. Bilinear interpolation is used for interpolation between the four values.

      Vertex: Values are interpolated between each vertex in the surface primitive. The basis function of the surface is used for interpolation between vertices.

      Facevarying: For polygons and subdivision surfaces, four values are interpolated over each face of the mesh.

      Bilinear interpolation is used for interpolation between the four values.

    Similar Threads

    1. CLASS
      By isma in forum WIP (Work in Progress)
      Replies: 4
      Last Post: 03-20-05, 04:17 AM
    2. Mercedes Benz C-Class 190 AMG DTM 1995
      By Dieguito in forum 3D Artwork
      Replies: 5
      Last Post: 11-23-04, 02:02 PM

    Posting Permissions

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