Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > RenderMan interface > Re: Texture Coo...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 747 of 788
Post > Topic >>

Re: Texture Coordinate struct

by Rick LaMont <lamont@[EMAIL PROTECTED] > Sep 28, 2007 at 04:54 PM

Nicholas  <Yue.Nicholas@[EMAIL PROTECTED]
> wrote:
> Component wise, I will have 4 components so I can represent s,t,r
> and q for OpenGL.

I recommend using only 2 components for your TextureCoordinate class.
Then your geometry can have two (or more) members:

    TextureCoordinate st;    // RenderMan texture coordinates
    TextureCoordinate rq;    // OpenGL texture coordinates

Inside RenderDotC we find it convenient to keep coordinates over
many domains:

    ugrid/vgrid go from 0 to 1 over a single Reyes grid
    upatch/vpatch for individual patches within meshes
    u/v are the natural parametric coordinates defined by RenderMan
    s/t for user-defined texture coordinates

You may someday find that you need more than two.  It will be easier
to add another TextureCoordinate than to extend the definition of it.

> can't think of operations (methods) which are unique to texture
> coordinate which are not handle by vector.

The most im****tant operation on texture coordinate is bilinear
interpolation.  That's how you map coordinates from one domain
to another:

    s = bilerp(u, v, s0, s1, s2, s3);
    t = bilerp(u, v, t0, t1, t2, t3);

For an in-depth look at RiTextureCoordinates() see this article:

   
http://groups.google.com/group/comp.graphics.rendering.renderman/msg/a0408e89e030e07e


Rick LaMont
Dot C Software, Inc.
http://www.dotcsw.com/
 




 2 Posts in Topic:
Texture Coordinate struct
Nicholas <Yue.Nicholas  2007-09-25 10:16:03 
Re: Texture Coordinate struct
Rick LaMont <lamont@[E  2007-09-28 16:54:41 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 11:39:02 CST 2008.