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 23 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

 

NameTypeMinMaxDefaultDescription
Materialchar*------Material name
Densityunsigned int11e82000Blades density (blades/m2)
Density MapCmap------Blades density texture map
Lengthfloat0.01e510.0Blade length
Length MapCmap------Blade length map
Length Variationfloat0.0100.020.0Length random variation (%)
Root Widthfloat0.11e55.0Root width in milimeters
Tip Widthfloat0.11e51.0Tip width in milimeters
Width Variationfloat0.0100.020.0Width random variation (%)
Initial Anglefloat0.090.080.0Initial blade-ground angle (in degrees)
Initial Angle MapCmap------Initial angle texture map
Initial Angle Variationfloat0.0100.025.0Initial angle variation (%)
Start Bendfloat0.0100.040.0Start bend point (in % of blade length)
Start Bend MapCmap------Start bend texture map
Start Bend Variationfloat0.0100.025.0Start bend variation (%)
      
      
      
      
  • No labels