Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

Description

This extension allows to generate grass on the top of meshes. It works as a object modifier plugin. Internally it creates blades and converts them to different grass primitives depending on the user parameters.

 

Example of how to create a MaxwellGrass object:

// If we don't need to call functions such as CgeometryModifierExtension::getProxyDisplayPoints() 
// (i.e for display purposes) 
// then it is possible to define procedural geometries or object modifiers 
// without loading extension dynamic libraries (.mxx files) 
// but a MXparamList object can be created and filled with the desired parameters.

Cmaxwell::Cobject mesh = pMaxwell->createMesh( ... );

// ...fill mesh parameters
MXparamList* grassParams = new MXparamList( "MaxwellGrass" );


float bladesDensity = 500.0; 
grassParams->setFloat( "Density", bladesDensity ); 

float length = 0.25; 
grassParams->setFloat( "Length ", length ); 

grassParams->setString( "Material", materialName );

//...etc..


object.applyGeometryModifierExtension( grassParams );


 

 

 

Parameters

 

Name

Type

MinMaxDefault

Description

"Material"

char*

------

Material name

"Density"

unsigned int

11e82000

Blades density (blades/m2)

"Density Map"

Cmap

------

Blades density map

"Length"

float

0.01e510.0

Blade length

"Length Map"Cmap------Length density map
"Length Variation"float0.0100.020.0Length random variation (%)
 float    
 float    
 byte    
 float    
 float    
 byte    
 byte    
 unsigned int    
 unsigned int    
 float    
 stesttes   
 asdasdfasfdfdfl kaldfla df;l af;la dfa;lkj
      

asdga

asdf adf

 

"FileName"

Name of the file that contains particles data. It is a NULL terminated string.

Example:

char* file = "/home/paco/Emitter01_00049.bin"; 
extParam->setString( "FileName", file ); 

 

"Radius Factor"

Multiplier for the particle radius that is read from the file. Can go from 0.00001 to 1000000 and the default value is 1.

Example:

float rFactor = 0.3f; 
extParam->setFloat( "Radius Factor", rFactor );

 

"MB Factor"

Multiplier to increase or decrease the amount of motion blur of the particles. Can go from 0.0 to 1000000.0. Default is 1.0.

Example:

float factor = 0.3f; 
extParam->setFloat( "MB Factor", factor );


"Shutter 1/"

Shutterspeed of the active camera. Affects the amount of motion of the particles. It is the inverse of the time the shutter is open.

Example:

float shutter = 125.f;
extParam->setFloat( "Shutter 1/", shutter );
 
  • No labels