Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

st facevarying?

Help
2007-09-12
2013-04-25
  • WHiTeRaBBiT
    WHiTeRaBBiT
    2007-09-12

    Greetings,
    Can Pixie do per vertex uv mapping?
    The following simple rib works correctly with paintedplastic on 3Delight and Aqsis.

    ##RenderMan RIB-Structure 1.1 Entity
    version 3.03
    Declare "Cs" "facevarying color"
    Declare "N" "facevarying normal"
    Declare "st" "facevarying float[2]"
    PointsPolygons
        [ 4 ]
        [ 0 3 2 1 ]
        "P" [ 1.0 1.0 0.0 1.0 -1.0 0.0 -1.0 -1.0 0.0 -1.0 1.0 0.0 ]
        "st" [ 0.0 1.0 1.0 1.0 1.0 0.0 0.0 1.0 ]

    Of course I have a much more complex scene and geometry but this shows the syntax I'm using.
    Am I doing something wrong or does Pixie not support this?

    Thanks in advance!

     
    • George Harker
      George Harker
      2007-09-12

      facevarying is supported and should work fine.

      I think there is a bug in the RIB fragment (the last st is wrong),  Should be

      ##RenderMan RIB-Structure 1.1 Entity
      version 3.03

      Projection "orthographic"
      WorldBegin

      Declare "Cs" "facevarying color"
      Declare "N" "facevarying normal"
      Declare "st" "facevarying float[2]"

      LightSource "ambientlight" 1

      Surface "paintedplastic" "texturename" "TexTest.tex"

      Translate 0 0 1
      PointsPolygons
             [ 4 ]
             [ 0 3 2 1 ]
             "P" [ 1.0 1.0 0.0
                     1.0 -1.0 0.0
                     -1.0 -1.0 0.0
                     -1.0 1.0 0.0 ]
             "st" [ 0.0 1.0
                       1.0 1.0
                       1.0 0.0
                       0.0 0.0 ]
            
      WorldEnd

      or similar.  You mentioned it occurs in a bigger example - what is the issue you see?

      Cheers

      George

       
    • WHiTeRaBBiT
      WHiTeRaBBiT
      2007-09-28

      Hello,

      Just wondering if anythings been discovered.
      Did I code the SDS uv correctly?
      You mention that theres several different ways to do
      this, Is there a better way for me to code this?

      Many thanks!

       
      • George Harker
        George Harker
        2007-09-29

        Hi there,

        I think the handling we currently have in Pixie is incorrect.  I am working on a fix - though subdv code is always a bit hairy and I've been rather busy.

        I'll post back when I have something.

        Cheers

        George

         
        • WHiTeRaBBiT
          WHiTeRaBBiT
          2007-09-29

          No rush.
          I'm about a week or so from going public with a Blender exporter and
          wanted to be sure I wasn't doing something really stupid with the SDS uv ;)
          Anyway I appreciate you guys and think Pixie is the best thing going in
          opensource RenderMan. In my opinion Pixie is even better than several
          commercial renderers I've been testing on, raytracing runs circles around
          3Delight's and I just don't like RenderDotC or Air (at least not on Linux).
          Overall performance seems as good as theres to me (just lacking a few features).
          And the only opensource renderer that comes close is Aqsis, and its VERY slooow.
          I really look forward to doing some cool things with Pixie!!

           
    • peter kostov
      peter kostov
      2009-05-27

      Hi,

      sorry for reopening this old thread, but the problem described by WHiTeRaBBiT still persists :(
      I am exporting with MOSAIC a mesh with the subsurf modifier from Blender:
      Catmull-Clark, levels 2, subsurf UV-checked, but no matter if subsurf UV is pressed or not the texture is distorted.

      Is it possible to fix this without messing with the Pixie's source code (unfortunately I am by no means a programmer) and how?

      Thanks in advance,

      Peter

       
      • subsurf UV is only blender feature.
        As I know neither pixie nor aqsis doesn't have such feature.

         
        • peter kostov
          peter kostov
          2009-05-27

          O.K. and subsurf UV has actually nothing to do with the problem (tested - it doesn't cause it, nor resolves it). I mentioned it only for completeness.

          The problem is the distortion of the texture, that I can't get rid of when using SDS mesh.

          Peter

           
          • WHiTeRaBBiT
            WHiTeRaBBiT
            2009-05-27

            Hey zmurdz,

            This was a fairly old post that I have since learned more about, there are three common ways to reference st data in geometry "vertex", "facevarying" and "facevertex". Facevarying and facevertex RIB look the same except how the st data is mapped to the geometry by the renderer, generally facevertex produces better results (closer to Blender SDS UV feature) but is not supported by Pixie. MOSAIC chooses facevarying as default since it is universally supported. If your running the CVS version of MOSAIC and experimenting with 3Delight, Air, Aqsis or PrMan you can set this by going to the "Geometry Setup" tab and selecting "facevertex" in the "para class" menu ;-)

            Eric Back (WHiTeRaBBiT)

             
    • peter kostov
      peter kostov
      2009-05-27

      To complement my own post - I am using the folowing versions:
      Blender 2.48-1
      MOSAIC - beta 0.3.0
      Pixie 2.2.6

      Peter

       
    • peter kostov
      peter kostov
      2009-05-27

      Hi WHiTeRaBBiT,

      Thanks for your answer and MOSAIC, it is a great tool!!! I have learned great deal from your blog posts too. And just when I finally grasped the things and started to produce decent renders it turns out that UV texturing on a SDS mesh doesn't work. It was too frustrating :(

      Yes, I use the cvs version of MOSAIC and latest version of Pixie. And through trial and error I just figured out that facevertex is not supported by Pixie, and facevarying doesn't work :(
      From the renderers you have mentioned I have access only to Aqsis, but it has another problems, that I cant resolve - my mesh cracks (part of it dissapears, ugly creases appear on the edges of the mesh, part of it seems as it is solid shaded and part - smooth shaded). Aqsis is slower and besides I liked Pixie more, because in general it produces more crisp and clean and so to say "beautiful" images (maybe these last arguments sound stupid, but that are my impressions). On the other hand I would use the blender internal renderer, but no matter how I set up my lighting and materials the renders come out a little bit grayish, dull and not so vivid as rendered with Pixie.

      So please advise, what should I do?
      The bad thing is that I have a project that I had to finish already...

      Thanks again,

      Peter

       
    • WHiTeRaBBiT
      WHiTeRaBBiT
      2009-05-27

      Thanks for the kind words :)

      Someone else may have a slicker solution that I'm unaware of, but for me I usually try manually tweaking the UV for better alignment or subdivide the problem faces to add more st data. I also agree Pixie produces some very clean, fast and beautiful reanders... although if I had the money I'm afraid to say I'd use PrMan in a heartbeat (sorry open source) :p
      As far as Aqsis goes they have really picked up development over this year and I'm seeing big progress but these things just take time :s I'm not really for or against any one renderer I just want to see the OS RenderMan community stay healthy and competitive!

      Anyway sorry I couldn't help more with this,

      Eric

       
    • peter kostov
      peter kostov
      2009-05-27

      WHiTeRaBBiT,

      I already have tried tweaking UVs, subdividing the mesh, applying  the subsurf modifier, removing it and using smooth modifier instead, but nothing really helps :(
      In this process I had actually learned some new things that I can apply to Blender internal renderer, so maybe I will stick with it for this project. And I am an open source fan too ;)

      Anyway I thank you for being so kind to answer!

      Greetings,

      Peter