With the exciting non commercial release of the all new Renderman 21 I am sure you are all as keen as I to update all the Renderman BxDF plugins you have made! Well if this is true then you should be aware of a couple of changes in the way plugins are handled in with the new release.
1. Librix and Examples
So as of the Renderman 21 librix and all Pixars helpful example files are no longer default download to your RMANTREE location. In fact they download to your systems default download file as two separate tar files. I simply extracted these out back into my RMANTREE location but ultimately of course where you put them is up to you.
2. RixRNG.h
RixRNG.h is no longer included in RixBxDF.h and therefore you must include it yourself within your BxDF plugin as demonstrated below. I have added a RENDERMAN21 define to my build so I can easily revert back if I need to build for previous Rendermans again.
#include "RixBxdf.h" #ifdef RENDERMAN21 #include "RixRNG.h" #endif
3. RixBXEvaluateDomain
The RixBXEvaluateDomain enumerators have changed slightly with,
k_RixBXFront = k_RixBXReflect
k_RixBXBack = k_RixBXTransmit
4. Function Parameter Changes
As of this version the functions GenerateSample, EvaluateSample and EvaluateSamplesAtIndex have some extra parameters.
GenerateSample:
#ifdef RENDERMAN21 virtual void GenerateSample(RixBXTransportTrait transportTrait, RixBXLobeTraits const *lobesWanted, RixRNG *rng, RixBXLobeSampled *lobeSampled, RtVector3 *Ln, RixBXLobeWeights &W, RtFloat *FPdf, RtFloat *RPdf, RtColorRGB* compTrans) #else virtual void GenerateSample(RixBXTransportTrait transportTrait, RixBXLobeTraits const *lobesWanted, RixRNG *rng, RixBXLobeSampled *lobeSampled, RtVector3 *Ln, RixBXLobeWeights &W, RtFloat *FPdf, RtFloat *RPdf) #endif
EvaluateSample:
#ifdef RENDERMAN21 virtual void EvaluateSample(RixBXTransportTrait transportTrait, RixBXLobeTraits const *lobesWanted, RixRNG *rng, RixBXLobeTraits *lobesEvaluated, RtVector3 const *Ln, RixBXLobeWeights &W, RtFloat *FPdf, RtFloat *RPdf) #else virtual void EvaluateSample(RixBXTransportTrait transportTrait, RixBXLobeTraits const *lobesWanted, RixBXLobeTraits *lobesEvaluated, RtVector3 const *Ln, RixBXLobeWeights &W, RtFloat *FPdf, RtFloat *RPdf) #endif
EvaluateSamplesAtIndex:
#ifdef RENDERMAN21 virtual void EvaluateSamplesAtIndex(RixBXTransportTrait transportTrait, RixBXLobeTraits const &lobesWanted, RixRNG *rng, RtInt index, RtInt nsamps, RixBXLobeTraits *lobesEvaluated, RtVector3 const *Ln, RixBXLobeWeights &W, RtFloat *FPdf, RtFloat *RPdf) #else virtual void EvaluateSamplesAtIndex(RixBXTransportTrait transportTrait, RixBXLobeTraits const &lobesWanted, RtInt index, RtInt nsamps, RixBXLobeTraits *lobesEvaluated, RtVector3 const *Ln, RixBXLobeWeights &W, RtFloat *FPdf, RtFloat *RPdf) #endif
5. Install location
As of Renderman 21 you no longer install your BxDF plugins in %RMANTREE%/lib/RIS/bxdf/ as the RIS file no longer exists. This is presumably due to the fact that Renderman 21 has now removed REYES with the replacement of the new RIS framework. Therefore the distinction in the file management is no longer necessary.
You will now install your BxDF .args files in %RMANTREE%/lib/plugins/Args and your .dll files in %RMANTREE%/lib/plugins.
Hope this is post finds itself helpful to someone. You can see a demonstration of all these changes in my previously made BxDF plugins here https://declanrussell.com/portfolio/microfacet-models-for-refraction-through-rough-surfaces-in-renderman/