Jump to content

Transform VOP


Guest Swann

Recommended Posts

Guest Swann

Hello,

Why there is so many spaces (shader,NDC, Texture,Object ...) in transformVOP ?

Why we need so many different spaces ?

Why we have to transform diferent functions of the shader fom one space to another ?

Edited by SWANN
Link to comment
Share on other sites

Why we need so many different spaces ?

The different spaces are shortcuts.

Programmers are lazy and it is much easier to convert some matrixes into another space. Keeping the transforms in worldspace all the time would result in much more complicated expressions.

For a short introduction I and probably everybody else recommends the Advanced Renderman book. Honestly I never read it past page 114. But the first chapters explain the basics.

Georg

Link to comment
Share on other sites

I don't know about lazy but more about efficiency and keeping yourself sane in complicated shaders managing multiple shading spaces. Plus there are just some spaces that you can't recreate from world space.

Georg is correct in that it would result in much more complicated shaders though.

I also second the read through Advanced RenderMan book to see what uses the different shader spaces have. The techniques apply to Mantra/VEX but the shading language is a bit different.

For example, toon shading and NPR (Non-Photoreal Rendering) shaders take advantage of NDC (Normalized Device Coordinate space) where x is 0- 1 left to right wrt the Camera, y is 0-1 top to bottom wrt the Camera and Z is 0 (film back?). This allows you to work with geometry as though it was lying on the actual film plate. Again this is all covered in great detail in one of the last chapters in the Advanced RenderMan book. Plus there have been some very nice NPR threads in the OdForce forums. That's just one space. All the others have their uses. H9.5 will see yet another useful space introduced (as I just found out the other day)...

Now some spaces can't be easily recreated from world space (camera space) and would require a ton of work to pass in and manage. This is greatly simplified with the space change related VOPs plus the Null Object.

You can reference your own user-defined transform spaces. Look at the Null Object and it's ability to inject a transform space in to the rib/ifd file with the "Output transform as render space (RIB/IFD) toggle. Prior to H9, you needed to use Nulls to inject some object spaces to make some techniques work.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...