| Previous Topic (BIN File Format) | Up (Contents) | Next Topic (None) |
Krakatoa Particle Channels
Krakatoa uses particle file formats which support arbitrary channels. The file formats allow for completely arbitrary channel names, but Krakatoa follows some conventions for channel names. This affects the usage of both PRT Files and CSV Files. BIN Files use a predefined mapping between Krakatoa conventions and the channels provided within that file format. Channel names are treated as case sensitive within Krakatoa.
Channel Data Type
An individual particle channel can be any data type from the following types
- float16, float32, float64
- int8, int16, int32, int64
- uint8, uint16, uint32, uint64
Each channel also has an arity, which is how many of the above types it has in a row. Krakatoa uses 3 floats, or a float32[3] channel for Position, and in most cases a float16[3] channel for color types.
Channel Naming Conventions
Krakatoa uses a camel case convention, starting with a capital letter, for channel names. A channel name must start with a letter or '_' character, and must be made up entirely of numbers, letters, and '_' characters. Here are some channel conventions which Krakatoa uses.
Most channels which are indicated as float32 could also be stored in memory or on disk as float16 to save space. This depends on whether the quantization of fitting it into a 16 bit floating point is acceptable. For colors, velocities, and densities, this is usually acceptable, but for position this generally is not.
- Position
- float32[3] - Particle Position.
- Velocity
- float32[3] - Particle Velocity.
- Acceleration
- float32[3] - Particle Acceleration.
- Normal
- float32[3] - Particle Normal.
- Density
- float32 - Particle Density.
- Color
- float32[3] - Particle Color. This is converted to/from 3ds Max map channel 0 (vertex color) where appropriate.
- TextureCoord
- float32[3] - Texture Coordinates. This is converted to/from 3ds Max map channel 1 (UVW) where appropriate.
- Mapping2, Mapping3, etc.
- float32[3] - Coordinate Mappings. These are converted to/from 3ds Max map channels where appropriate.
- Orientation
- float32[4] - Particle Orientation. This is a quaternion representing the orientation of the particle.
- Spin
- float32[4] - Particle Spin. This is an angle/axis value, representing the axis and angular velocity of the particle.
- MXSFloat
- float32 - Particle Flow MAXScript Float.
- MXSVector
- float32[3] - Particle Flow MAXScript Vector.