Jump to content

"ri_worldpreinclude" usage


Recommended Posts

i want to declare (DisplayChannel "color _radiance_t") and ("DisplayChannel "float _area") in an RIB file generated from Houdini. for this i m applying "ri_wirldpreinclude" property so that it can add (DisplayChannel "color _radiance_t") just before the worldbegins in RIB file..... and it works also....the only problem is i can only declare one variable like this....i wonder how to declare more variables using "ri_worldpreinclude".....i m using houdini 10.0

here is the part of RIB FILE

Declare "s" "varying float"

Declare "t" "varying float"

ObjectEnd # /obj/geo1 }

FrameBegin 1 # {

Display "../images/chapter14/sss_baking.tif" "framebuffer" "rgba" "integer houdiniportnum" [12797]

Format 500 500 1

Exposure 1 1

PixelSamples 3 3

ShadingRate 1

Hider "hidden" "jitter" [1]

ScreenWindow -1.0255 1.0255 -1.0255 1.0255

Projection "perspective" "fov" [45]

Clipping 0.001 6239.11

# Inline include - no file specified

DisplayChannel "float _area"

DisplayChannel "color _radiance_t"

Attribute "cull" "hidden" 0 # don't cull hidden surfaces

Attribute "cull" "backfacing" 0 # don't cull backfacing surfaces

Attribute "dice" "rasterorient" 0 # turn viewdependent gridding off

# End of include

Transform [0.909798726403 -0.00585981757843493 -0.415008361329535 0 -0.00466145948471454 0.999693005058061 -0.0243344700672937 0

-0.415023551417207 -0.0240740145370711 -0.909492107493583 0 -0.0593314269656283 -0.94648882683778 2.8247301913143 1]

WorldBegin # {

TransformBegin # {

CoordinateSystem "worldspace"

TransformEnd # }

#

# Light: /obj/light2

Attribute "identifier" "string name" ["/obj/light2"]

Transform [-0.0898258938023286 -0.0950566613190681 0.9914108835097 0 0.828240960670534 0.545706158106156 0.127364438021646 0

0.553125862593826 -0.832567727061223 -0.0297112770837182 0 -4.81929016113281 8.39525985717773 0.292333006858826 1]

LightSource "l_RP_transmissionSpot" "/obj/light2" "doShadows" [1] "intensity" [100] "lightcolor" [.8 .7 .7] "coneangle" [65] "__instanceid" "/obj/light2:light" #

# Light: /obj/light1

Attribute "identifier" "string name" ["/obj/light1"]

Transform [1 0 0 0 0 1 0 0

0 0 -1 0 0.899999976158142 1.69156002998352 1.30631995201111 1]

LightSource "pointlight" "/obj/light1" "intensity" 0.15 "__instanceid" "/obj/light1:light"

Identity # Make sure space is well defined

#

# Object: /obj/geo1

AttributeBegin # {

Attribute "identifier" "string name" ["/obj/geo1"]

Attribute "trace" "integer maxspeculardepth" [2]

Attribute "visibility" "integer transmission" [1]

Attribute "shade" "string transmissionhitmode" ["primitive"]

Color [1 1 1]

Opacity [1 1 1]

Attribute "displacementbound" "coordinatesystem" ["shader"] "sphere" [0]

TransformBegin # {

Transform [1 0 0 0 0 1 0 0

0 0 1 0 0 0 0 1]

Surface "s_RP_sss" "bake" [1] "filename" ["C:\sss.ptc"] "displaychannels" ["_area,_radiance_t"] "__instanceid" "/obj/geo1:surf"

TransformEnd # }

Transform [1 0 0 0 0 1 0 0

0 0 1 0 0 0 0 1]

Sides 1

ObjectInstance 1

Sides 2

AttributeEnd # }

#

# EndObject: /obj/geo1

WorldEnd # }

FrameEnd # }

Link to comment
Share on other sites

i want to declare (DisplayChannel "color _radiance_t") and ("DisplayChannel "float _area") in an RIB file generated from Houdini.

If this is all you want to do you can just use the RI_AOV tab on the renderman rop and save yourself the hassle of using ri_worldpreinclude.

In the ri_AOV tab just hit the plus sign next Number of AOVs twice and type color _radiance_t and float _area for variable 1 and variable 2. Since I'm guessing your using this to write point clouds and not an extra image you can leave the rest of the parameters blank.

Edited by DanBode
Link to comment
Share on other sites

thanks dan that worked :)

actually you are right i m trying to generate pointcloud and use it for sss.

i have managed to generate a point cloud.

now m facing problem with reading it to render ssdiffusion.

i have got success up to generating brick map.

but reading the brick map through s_RP_sss.sl shader which i downloaded from RSL Programming site is a prob.

its showing errors like " cant read .bkm file etc....

i think there is a problem with setting up correct directory and paths....

will be glad if you could tell me how to set costom paths for using PRMAN with houdini.

shader paths are still understandable....but for example how to set path for .bkm file etc...

anyways thanks a lot

Link to comment
Share on other sites

Hi!!

Yes it works also for rendering sequences. Sorry for no explain how to use the otl's.

For the otl's to work properly, first you have to create the basic parameters for your material, these are (bakesssrop, bake, write point clouds, read brick map)img#1, for the bakesssrop string parameter you have to choose in the string options the correct type of string, is "a list of objects" and "then any rop".(you don't have to use the bake parameter, is for the bake rop, but that parameter need to be expose); promote your parameters at material level and then create the prman sss rop and put the material direction in the sss material parameter of the bake rop; put the bake sss direction in the bake sss rop parameter of the material, put the corresponding direction of the point cloud and brick maps in the material; put the out point cloud direction in the ptfilter tab of the bake rop only, and finally create a standard renderman rop and connect them below the sss bake rop and hit render from the renderman rop. img#2

Edited by Pazuzu
  • Downvote 1
Link to comment
Share on other sites

hey pazuzu....thanks a lot for your efforts.... hope i m not wasting your time.....i did exactly as you explained but still could not succeed.... m still getting some "set_channel_reference_script" error on the node.... may be i m skipping a step or two.... if you could send me a simple scene file showing the workflow... it will be wonderful.... again hope i m not bothering you too much..... sorry m kind of newbee.... so my questions might frustrate you a little

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...