RixPatterns
Stocastic Culling


return to main index

Code:
    CutrCullByThreshold.args
    CutrCullByThreshold.cpp

Download:
CutrCullByThreshold.zip



Introduction

The pattern node presented here can be used to "cull" objects by connecting it's resultMask output to the presence input of a material such as PxrDiffuse or PxrDisney. The node reads the value of a user (float) attribute associated with each object (gprim). For example.

    Attribute "user" "float probability" [0.8444]

It is assumed the attribute values are random and are in the range 0 to 1. The value of the "Presence Threshold" determines when the attribute value will cause the plugin to output resultMask values of 0 or 1 for the geometry being shaded.



Figure 1


The rollover images of figure 2 show the effect of the culling when applied to 50 RiCurves. The curves were generated by scripts presented in the tutorial "RfM: RiMel - particleCurves"



Figure 2 - "Presence Threshold" 1.0 and 0.1


Instructions on compiling the plugin can be found here,
    "RixPattern Plugins: Step 6".
Information about registering the plugin can be found here,
    "Args nodeid Registration".







© 2002- Malcolm Kesson. All rights reserved.