...
This extension enables maxwell to render particles as spheres. These particles can be stored in a several file formats, such as .bin or .pxy file, abc, pxy, rpc, typically saved from realflow, or passed as internal data which is stored in the .mxs file.
...
Code Block | ||||
---|---|---|---|---|
| ||||
CextensionManager* extensionManager = CextensionManager::instance(); CgeometryProceduralExtension* geomProcExtension = extensionManager->createGeometryProceduralExtension( "MaxwellParticles" ); //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* particlesParams = geomProcExtension->getExtensionData(); //Fill the required data char* filename = "/home/rocco/Emitter01_00023.bin"; particlesParams->setString( "FileName", filename ); //Enable loading particle vorticity data byte load = 1; particlesParams->setByte( "Load particle Vorticity", load ); //These two numbers can be obtained parsing the particles file or all the particles sequence //They're needed to map the values of vorticities from 0.0 to 1.0 to access the texture. float minV = 0.0; float maxV = 23.67; particlesParams->setFloat( "Min Vorticity", minV ); particlesParams->setFloat( "Max Vorticity", maxV ); //Add the procedural object to the scene Cmaxwell::Cobject obj = scene->createGeometryProceduralObject( "My Particles", particlesParams ); //Let´s add a uv channel... dword uvIndex; //returned uv channel index. Use this index in the texture map properties to access its uvs byte isOk = obj.addChannelUVW( uvIndex ); // uvIndex will be set to the actual uv channel number of the object. //...and set it to a custom UV generator, 17, in this case, vorticity modulus obj.generateCustomUVW( uvIndex, 17 ); //Now assign a material and set the first BSDF reflectance0º color a texture driven by uv channel 'uvIndex' //This uv channel, since it is a scalar one-valued channel, stores its value in the U coordinate. |
...
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 |
"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 Force" | 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 ID |
"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 |
"PARTICLE_FORCE" | float* | Array of particle force |
"PARTICLE_VORTICITY" | float* | Array of particle vorticity |
"PARTICLE_NORMALS" | float* | Array of particle normals |
"PARTICLE_NNEIGHBORS" | int* | Array of particle's number of neighbors |
"PARTICLE_UVW" | float* | Array of particle native texture coordinates |
"PARTICLE_AGE" | float* | Array of particle age |
"PARTICLE_ISOL_TIME" | float* | Array of particle isolation time |
"PARTICLE_VISCOSITY" | float* | Array of particle viscosity |
"PARTICLE_DENSITY" | float* | Array of particle density |
"PARTICLE_PRESSURE" | float* | Array of particle pressure |
"PARTICLE_MASS" | float* | Array of particle mass |
"PARTICLE_TEMPERATURE" | float* | Array of particle temperature |
"PARTICLE_FLAG_COLORS" | byte | Indicates whether particle colors are available or not |
"PARTICLE_COLORS" | float* | Array of per particle color |
...
Code Block | ||
---|---|---|
| ||
byte flag = 1; extParam->setByteArray( "PARTICLE_FLAG_TEMPERATURECOLORS", &flag, 1 ); |
"PARTICLE_COLORS"
...