renderman rsl


#21

not sure what you mean by “my folder archive called RIB_Archive”. the parameter for RiReadArchive is the name of the archive you want to read so for example:


 RiReadArchive "E:/CLASS/VSFX319/maya/projects/vsfx319_projects/palmetto/RIB_archive/spikes.099.rib";
 

if you don’t want to use absolute paths you can also specify your archive searchpath but for now lets use absolute paths.

so if you have rib archives spikes.001.rib to spikes.099.rib you would copy this script to your script editor and run it:


 global proc string getFormatTime() {
  	$t = int(`currentTime -q`);
  	if($t>=100)
  		return $t;
  	if($t>=10)
  		return "0"+$t;
  	if($t<10)
  		return "00"+$t;
 };
 

then go to your preShapeMEL and enter this:


 RiReadArchive ("E:/CLASS/VSFX319/maya/projects/vsfx319_projects/palmetto/RIB_archive/spikes."+getFormatTime()+".rib");
 

#22

Much much better. I did a test of 100 frames using the mel below and everything went smoothly since my padding is 4. I wonder if there is a bug with Add Archive?
Nevertheless, I appreciate you taking the time to show me your workflow.

global proc string getFormatTime() {
$t = int(currentTime -q);
if($t>=1000)
return $t;
if($t>=100)
return “0”+$t;
if($t>=10)
return “00”+$t;
return “000”+$t;
};

-J


#23

glad to hear its working!

keep in mind that RiReadArchive really is kind of copy pasting the content of the rib archive to your main rib so this does work for rendering but a well setup RiProcedural “DelayedReadArchive” call with correct bounding boxes will be much more efficient in more complex scenes

grs
Patrik


#24

So, for DelayedReadArchive I would replace RiReadArchive?
This is a dumb question but how would I set a relative there, I can’t get it to work just typing it in.


#25

yeah instead of readarchive you would use:
RiProcedural “DelayedReadArchive” “archive.rib” minx maxx miny maxy minz maxz;

what do you mean by relative? do you mean a relative path?
in maya you can go to your render globals. then in the advanced tab go to injection points. in the RiOption line type:


RiOption "searchpath" "string archive" "E:/CLASS/VSFX319/maya/projects/vsfx319_projects/palmetto/RIB_archive";

this tells renderman that it searches this directory when it searches for a rib archive file. so you could now write:


RiReadArchive "spikes.099.rib";

is this what you meant?

grs
Patrik


#26

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.