Monday, 30 December 2013
Often you need to 'weight' the items of an array so that you can achieve a certain ratio e.g for a particle cloud 25% red, 25% blue and 50% green. The archive below contains a couple of sample scenes that show one specific technique (borrowed from Greg Turk's Graphics Gems algorithm for weighting triangles by area) for weighting an array and a couple of compounds kindly made by Dan Yargici making it easy to set up the initial weighted array and then pull data from it. The weighting doesn't have to be normalised - any ratios will work. Download the compounds and scenes here.