Results 1 to 4 of 4

Thread: reference shader

  1. #1
    Join Date
    Jan 2010
    Posts
    4

    Default reference shader

    Hello,

    first post, difficult question (for me). I got a copy of Andy's great shader book, which works fine for me (examples...). I would like to write a shader, which takes the world position of each vertex and saves that one as a color (edges and polys get interpolated colors). Until here this is actually nothing else than a world space shader (which I could get working). BUT the color of each vertex should only be taken at the first frame of an animation, so the vertex world colors would move with the mesh - not change (like baking the vertex position as colors into a map). Is it possible to look back in time with a state stuct?

    I have seen this working in RenderMan and thought this could be an interesting thing to implement.

    Thanks for helping

    Sebastian

  2. #2
    Join Date
    Nov 2009
    Posts
    12

    Default

    In RenderMan, they pass the per point color information along to the resulting points per frame. A list of the original object's (reference object) points are passed to the surface shader as a seperate REFERENCE POINT or Pt in the code.

    In that way, the original point position is passed to each subsequent object per frame, thereby "freezing" the original information's projection or mapping of whatever texture was on the surface. Damned useful for a wide variety of visual effects.

    I've not seen a "Point Referencing" mention in MR yet. Let me know if you find one.

    Cheers.
    - Jimbo

  3. #3
    Join Date
    Dec 2004
    Location
    Marina Del Rey, California
    Posts
    2,916

    Default

    Are you saying that you want to bake the world coordinate positions of frame 1 into a uvw texture space mapping?

    And there isn't a way to do this in the 3D app that you use?

    Is this going to be for skeletal skinning or something? I'm trying to figure out the motivation to provide perhaps a work around.
    Barton Gawboy
    Training and Special Projects, NVIDIA ARC
    LAmrUG Forum Originator

  4. #4
    Join Date
    Jan 2010
    Posts
    4

    Default

    Hey,

    thank you for your replies. Interesting how this works whith Renderman!

    And yes bart, you are right. Baking world position to uvs would be the way to do it manually. But no artist would do it this way, just too much work.

    Actually this is for compositing purposes. It would be used as an additional pass to have the possibility to stick mattes onto any moving character.

    Cheers

    Sebastian

Posting Permissions

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