PDA

View Full Version : renderman occlusion cache


psdr16
04-12-2005, 09:40 PM
Hi,

I have an object that moves in my scene, however the occlusion does not change too much and therefore i want to reuse the occlusion cache that i generated in the first frame. The documentation describes a technique of reading cached data at referenced points using a shader called irradcachereadPref. However i'm unsure of how to pass Pref to this shader. Where is Pref stored? I'm generally a bit confused about referencing P, any help would be much appreciated!

Thanks

Pete

playmesumch00ns
04-13-2005, 08:38 AM
__Pref is a "standard" non-standard input variable. If you're using MToR, you can attach it to your geometry using the __Pref::freeze menu command. Basically it just attaches the position of each vertex on the frame you freeze it to itself. Therefore you know where the geometry was on the reference frame. This is useful for lots of reasons, for example having 3D noise textures stick to your object as it deforms.

psdr16
04-14-2005, 05:35 PM
Thanks thats exactly what I was after!

Bitterpea
05-13-2005, 04:25 AM
Since it took me so long to figure out Pref, I thought I'd do a little more explaining:

There are two types of transform to consider: point transform and object transform. To cause occlusion (or any 3d information) to stick on an animated object (transform, scale, rotate), this deals with the CoordinateSystem. Donít ask me how to do that.
To cause occlusion to stick to point deformations, we deal with __Pref. This includes all skeletal deformations, including translating the entire skeleton.
Iíve programmed the read_occ_Pref shader:

There is a parameter: varying point __Pref = 0



In Maya, when you do the __Pref: freeze

Each point now has a __Pref variable associated with it. When you call the surface shader with varying point __Pref in the parameters, the point passes in its __Pref information to that parameter.



Import the read_occ_Pref shader.



After baking the occlusion and converting it to a brickmap, attach the read_occ_Pref shader to the object.



You canít do object transformations, but you can do skeletal and other deformations. The occlusion sticks.

CGTalk Moderation
05-13-2005, 04:25 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.