| Previous Topic (Save Particles Rollout) | Up (Contents) | Next Topic (Particle Partitioning) |
Particle Channels Rollout
Particle Channels To Load Into Memory
Available in: Krakatoa v1.1.0 and higher.
- Prior to version 1.1.0, Krakatoa used a fixed set of channels when rendering particles: Position, Velocity, Color, Density, Normal and Lighting. The total number of bytes a particle would require when loaded into memory was thus fixed at 38.
- Starting with version 1.1.0, the internal memory organization has been enhanced to take advantage of the named channels system already used for saving particles to disk. Most channels can now be allocated only when required by a specific feature of Krakatoa and the precision (number of bytes per component) can be customized by the user.
- The following channels can be used by Krakatoa:
- Position Channel - this channel is always allocated and has a fixed float32[3] type. It is used to store the particle positions in world space.
- Density Channel - this channel is always allocated and can have a user-defined precision. It is used to store the particle density. If a particle source does not provide an explicit density value, the value of 1.0 is used as default.
- Color Channel - this channel is usually allocated and stores the particle color taken either from the source's wireframe color, the shading color evaluated from the source's material or an explicit value taken from a particle sequence file. When the >Override Particle Colors option is checked and the drop-down list is set to Custom Particle Color, the color is constant for all particles in memory, thus allocating a channel would mean wasting at least 6 bytes per particle. Instead of storing the same color in the Color channel, it will be taken from the Custom Particle Color swatch directly.
- Velocity Channel - this channel is only needed to interpolate particle positions for motion blur, so it will be allocated only if the >Enable Motion Blur option is checked.
- Lighting Channel - this channel is allocated when the >USE LIGHTING option is checked. It stores the color value of the particle after the lighting calculations. The content of this channel can be frozen and reused by enabling the LCache (Lighting Cache) option.
- Normal Channel - this channel is allocated when the >Use Normals option is checked together with the >USE LIGHTING option. It will contain the particle's normal vector used for calculating specular highlights. The normal is taken from the surface normal when rendering geometry vertices as particles, from the X axis of the particle's transformation matrix in the case of 3ds Max particle systems or from the Normals channel when loading a particle sequence from disk. If a file sequence does not provide a Normals channel, the default value will be [0,0,0] causing particles to render black.
- MBlurTime Channel - this channel is used to store the particle's motion blur time when performing Jittered Motion Blur. While it adds 2 or 4 bytes per particle, it allows the rendering pass to use the same faster sorting and particle access methods as the lighting pass and thus speeds up rendering significantly. In Krakatoa v1.0.1 and earlier, the render pass always used Indexed Sort and thus Indexed data access which is inherently slower.
The following table gives a quick overview of the Memory Channels:
| Channel Name | Notes | Formats | Default=Bytes |
| Position Channel | Always allocated | float32[3] | float32[3]=12 |
| Density Channel | Always allocated | float16|float32 | float16=2 |
| Color Channel | Allocated if >Override Particle Colors is not set to Custom Particle Color mode | float16[3]|float32[3] | float16[3]=6 |
| Velocity Channel | Allocated only if >Enable Motion Blur is on | float16[3]|float32[3] | float16[3]=6 |
| Lighting Channel | Allocated only if >Use Lighting is on | float16[3]|float32[3] | float16[3]=6 |
| Normal Channel | Allocated only if both >Use Lighting and >Use Normals are on | float16[3]|float32[3] | float16[3]=6 |
| MBlurTime Channel | Allocated only if both >Use Motion Blur and >Jittered Motion Blur are on | float16|float32 | float16=2 |
- With defaults settings (No Lighting, Motion Blur or Color Override), each particle will now use 20 bytes instead of the 38 bytes in Krakatoa v1.0.x.
- If Particle Color Override is enabled and set to Custom Color, the memory usage will be at its lowest point - only 14 bytes per particle with Position and Density channels only.
- With all features enabled (Lighting, Normals and Motion Blur on, no Custom Color Override), the memory usage will be back to the v1.0.x level of 38 bytes per particle.
- With all features enabled and Jittered Motion Blur on, the Memory Usage will be 40 bytes.
- The buttons between the two list boxes can be used to change the depth of one or more channels (except for the Position channel which is currently hard-coded to 32 bits per component) in either list to the given number of bits per component:
- 16 - sets each component of the selected channels to 16 bits (2 bytes), thus a Velocity, Normal, Lighting or Color channel would store 3*2 = 6 bytes and the Density channel would store 2 bytes.
- 32 - sets each component of the selected channels to 32 bits (4 bytes), thus a Velocity, Normal, Lighting or Color channel would store 3*4 = 12 bytes and the Density channel would store 4 bytes.
- The + and -- signs in front of the Channels represent their state in the Particle Cache.
- When a particle channel has been allocated and the data has been cached, the channel will show a plus sign.
- When a particle channel has not been loaded yet, it will have the minus sign.
- If all channels on the right list have their status set to +, the cache is valid and will be used if the Particle Cache is engaged. (the cache indicator will be green)
- If at least one channel on the right list has its status set to --, the cache will require rebuilding (the cache indicator will be yellow)
The line underneath the channel lists will display the number of particles (in Millions) currently loaded in the cache and the amount of memory (in Megabytes) they occupy.
TIP: To get the exact particle count, you can *right-click the PCache button, *select the cache count/memory entry to copy its content to the Log *open the Krakatoa Log window and select the cache report *go to Edit>Copy to copy the line *press Ctrl+V in any text editor or other Windows application to paste the values
Particle Count / Memory Calculator
Available in: Krakatoa v1.1.0 and higher.
The Calculator provides two value fields which are interconnected two-ways using the Bytes/Particle value displayed in the Particle Channels To Load Into Memory group of controls. It can be used to determine how much RAM would be required to load a specific number of particles or how many particles would fit in a given amount of memory.
- The Particle Count value is in Million particles, thus entering 1.2345 will be interpreted as 1,234,500 particles. Entering a value or spinning the arrows will automatically update the Memory value to show the Megabytes required by this number of particles using the current active memory channels.
- The Memory value is in Megabytes (1024*1024 bytes), thus entering 2048 will be interpreted as 2GB of RAM. Entering a value or spinning the arrows will automatically update the Particle Count value to show how many particles would fit in this amount of memory using the current active memory channels.
- Changing settings that affect the active channels including toggling Motion Blur, Use Lighting and Use Normals options on and off or changing the channel depth of one or more channels between 16,32 and 64 bits will update the Memory value while keeping the Particle Count constant.
- Left-clicking or right-clicking the [>>] buttons next to the value fields will open context menus providing a range of useful presets.
- Select a value from the presets list to load into the corresponding value field.
- Enter a value not on the presets list and select Add from the context menu to add to the list.
- Enter a value that is already on the list and select Remove to remove from the list.
Particle Channels To Save To Disk
Available in: Krakatoa v1.0.1 and higher.
Krakatoa can save to disk most particle channels provided by Particle Flow and other particle sources, thus allowing the use of particle files in place of the actual particle systems. This rollout provides control over which channels will be saved to disk and with what precision.
- The Do Not Save Channels multilistbox shows all channels currently available but not set to save to disk, including their name and data format.
- The Save Channels multilistbox shows all channels currently specified to be saved to disk, including their name and data format.
- To move a channel from the one list to the other, double-click it or press the corresponding arrow button between the two list.
- To move multiple channels, select them using the usual Ctrl+Click and Shift+Click or use the All and Invert buttons to change the selection, then use the arrow buttons between the two lists.
- To set the data format of one or more channels on the Save Channels list, select the channel or channels and press the 16, 32 or 64 button - the data format of all selected channels will be switched to the given number of bytes per component. The arity of the channel will remain the same.
NOTE: The Position channel is currently fixed to float32[3] and cannot be changed.
- The label in the upper right corner of the rollout displays the total number of bytes per particle.
- The left list will contain the typical particle channels. This list is currently hard-coded in the Krakatoa GUI.
- By default, Mapping Channels above 1 (2-99) will not be displayed. To show all Mapping Channels, check the >All Mapping Channels option. Once a Mapping Channel is moved to the right list, it will remain there even if the option is unchecked. Note that Mapping Channel 1 is named TextureCoord. The Vertex Color channel is not directly exposed, but if available and if no material is assigned, its content will be copied directly into the Color channel.