...
This extension is a geometry modifier. It loads a particle file, or reads particles stored internally and creates instances of the selected geometry at the particles positions.
Example of how to create a MaxwellCloner object, add a uv channel, set its custom type to "Density" and enable loading the particle densities arraymodifier, and apply it to an already existing object in the scene.
Code Block | ||||
---|---|---|---|---|
| ||||
CextensionManager* extensionManager = CextensionManager::instance(); CgeometryModifierExtension* geomModifExtension = extensionManager->createGeometryModifierExtension( "MaxwellCloner" ); //Get the extension container. When using this method of getting the container, //nearly all parameters have default values, and there is no need to explicitly set them. MXparamList* clonerParams = geomModifExtension->getExtensionData(); //Fill the required data char* filename = "/home/rocco/Emitter01_00023.bin"; clonerParams->setString( "FileName", filename ); //Get the object we want to clone Cmaxwell::Cobject mxObject = scene->getObject( "MyGeometry" ); isOk = mxObject.applyGeometryModifierExtension( clonerParams ); |
...
Name | Type | Description |
---|---|---|
char* | Particles filename | |
float | Particle radius multiplier | |
float | Motion blur multiplier | |
float | Camera shutterspeed | |
"Load particles %" | float | Percentage of particles to load |
" Start offset" | unsigned int | Skip some particles before loading |
"Create N particles per particle" | unsigned int | Enables Multipoint feature if N > 0 |
"Extra particles dispersion" | float | Dispersion of the extra particles cloud |
"Extra particles deformation" | float | Deformation of the extra particles cloud |
"Load particle ForceUse velocity" | byte | Load or not array of Force vectors |
"Min Force" | float | Minimum force modulus value |
"Max Force" | float | Maximum force modulus value |
"Load particle Vorticity" | byte | Load or not array of Vorticity vectors |
"Min Vorticity" | float | Minimum vorticity modulus value |
"Max Vorticity" | float | Maximum vorticity modulus value |
"Load particle Normal" | byte | Load or not array of Normal vectors |
"Load particle neighbors no." | byte | Load or not array of particle neighbors# |
"Min Nneighbors" | unsigned int | Minimum number of neighbors value |
"Max Nneighbors" | unsigned int | Maximum number of neighbors value"Max Nneighbors" |
"Load particle UV" | byte | Load or not array of particle UV |
"Load particle Age" | byte | Load or not array of particle Age |
"Min Age" | float | Minimum age value |
"Max Age" | float | Maximum age value |
"Load particle Isolation Time" | byte | Load or not array of particle isolation time |
"Min Isolation Time" | float | Minimum isolation time value |
"Max Isolation Time" | float | Maximum isolation time value |
"Load particle Viscosity" | byte | Load or not array of particle viscosity |
"Min Viscosity" | float | Minimum viscosity value |
"Max Viscosity" | float | Maximum viscosity value |
"Load particle Density" | byte | Load or not array of particle density |
"Min Density" | float | Minimum density value |
"Max Density" | float | Maximum density value |
"Load particle Pressure" | byte | Load or not array of particle pressure |
"Min Pressure" | float | Minimum pressure value |
"Max Pressure" | float | Maximum pressure value |
"Load particle Mass" | byte | Load or not array of particle mass |
"Min Mass" | float | Minimum mass value |
"Max Mass" | float | Maximum mass value |
"Load particle Temperature" | byte | Load or not array of particle temperature |
"Min Temperature" | float | Minimum temperature value |
"Max Temperature" | float | Maximum temperature value |
"Load particle ID" | byte | Load or not array of particle IDUse the velocity vector to as Y axis of the instance |
"Scale with particle radius" | byte | Scale instances with particle radius |
"PARTICLE_POSITIONS" | float* | Array of particle positions |
"PARTICLE_SPEEDS" | float* | Array of particle speeds |
"PARTICLE_RADII" | float* | Array of particle radii |
"PARTICLE_IDS" | int* | Array of particleID's |
UV Generators
Name | Index |
---|---|
"Particle UV" | 0 |
"Particle UW" | 1 |
"Particle VW" | 2 |
"Velocity Modulus" | 3 |
"Velocity Vx" | 4 |
"Velocity Vy" | 5 |
"Velocity Vz" | 6 |
"Velocity Vx Vy" | 7 |
"Velocity Vx Vz" | 8 |
"Velocity Vy Vz" | 9 |
"Force Modulus" | 10 |
"Force Fx" | 11 |
"Force Fy" | 12 |
"Force Fz" | 13 |
"Force Fx Fy" | 14 |
"Force Fx Fz" | 15 |
"Force Fy Fz" | 16 |
"Vorticity Modulus" | 17 |
"Vorticity wx" | 18 |
"Vorticity wy" | 19 |
"Vorticity wz" | 20 |
"Vorticity wx wy" | 21 |
"Vorticity wx wz" | 22 |
"Vorticity wy wz" | 23 |
"Normal Nx" | 24 |
"Normal Ny" | 25 |
"Normal Nz" | 26 |
"Normal Nx Ny" | 27 |
"Normal Nx Nz" | 28 |
"Normal Ny Nz" | 29 |
"No. neighbors" | 30 |
"Age" | 31 |
"Isolation Time" | 32 |
"Viscosity" | 33 |
"Density" | 34 |
"Pressure" | 35 |
"Mass" | 36 |
"Temperature" | 37 |
"ID" | 38 |
"FileName"
Name of the file that contains particles data. It is a NULL terminated string.
...
Code Block | ||
---|---|---|
| ||
float percent = 75.f;
extParam->setFloat( "Load particles %", percent ); |
"Start offset"
Skip N particles when loading.
Example:
Code Block | ||
---|---|---|
| ||
unsigned int nOff = 10;
extParam->setUInt( "Start offset", nOff ); |
"Create N particles per particle"
...
Code Block | ||
---|---|---|
| ||
float deformation = 1.1f; extParam->setFloat( "Extra particles deformation", deformation ); |
"
...
Use velocity"
Use the particle velocity vector as the Y (up) axis of the instanced geometry.
Example:
Code Block | ||
---|---|---|
| ||
byte useVel = 1;
extParam->setByte( "Use velocity", useVel ); |
"Scale with particle radius"
Scale the instanced geometry with the particle radius.
Example:
Code Block | ||
---|---|---|
| ||
byte loadArrayuseRad = 1; extParam->setByte( "LoadScale with particle Viscosityradius", loadArrayuseRad ); |
"Min Force" "Max Force" "Min Vorticity" "Max Vorticity" "Min Nneighbors" "Max Nneighbors" "Min Age" "Max Age" "Min Isolation Time" "Max Isolation Time" "Min Viscosity" "Max Viscosity" "Min Density" "Max Density" "Min Pressure" "Max Pressure" "Min Mass" "Max Mass" "Min Temperature" "Max Temperature"
...
"PARTICLE_POSITIONS"
Particle data can come whether in a file or internally stored in the .mxs file. If a filename is not supplied, the extension checks for internal data, and if successful, loads it. This parameter is a linear array of floats x0 y0 z0 x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 ...., its length is 3*numberOfParticles.
...