Texture mapped particles/voxels in Krakatoa?


Basically, I have a tunnel (that a camera passes through) with particles emitting off it (using lock/bond) and I want to render them out as voxels via Krakatoa with the bitmapped texture of the tunnel mapped to the particles.

Basically, a camera flyby down a tunnel of particles/voxels.

I’ve been told MagmaFlow is a way to go (to apply the texture), but I’m a little lost. Also, I’ve seen the Box#3/Camera Mapping tut for Krakatoa, but again, Box#3 is a little over my head. I wasn’t sure if the tut applied since the camera would be moving through the “tunnel” and it looked like the camera mapping tut relies on a static camera and its distance to the particles.

I’m certainly willing to dig in to both Magma and Box#3, but is there anyone who can help me figure this out?


When a particle is emitted from the wall, it should acquire the UV coordinates of the emitter.

The Particle Flow extension to Max 2009 which is an integral part of 2010 (and was previously available as Orbaz Particle Flow Tools Box #1) has an operator called Mapping Object that can be used to steal texture coordinates from the closest point of a mesh.

Alternatively, Krakatoa provides a Particle Flow operator called Krakatoa Geometry Lookup, but it is not enabled in Evaluation mode. If you have a commercial version of Krakatoa, then it would work. It could be used to steal surface properties like Normals, UVs etc. from a selected mesh.

Once you have your UVs, send out the particles to another event to avoid continuously sampling the wall as the particle is moving.

Apply a material with the same map as the emitter mesh, make sure the texture map uses the UVs you acquired and render in Krakatoa…


Sweet, thanks Bobo, I was hoping you’d reply. I do have access to Krakatoa at work and am learning it a bit at a time. I did end up using mapping object and it worked pretty well, but I’ll also try the Geometry Lookup and your other tips, too.

Thanks again!


OK, i’ve read through this and am having a hard time with the details, I understand the general idea, just don’t know how to go about doing it.

I’m using the Mapping Object method. The type is set to “Once on Event Entry”. I’m not sure of all the other options in there and what they should be set to. From there I have the particles being sent out to another event. I don’t know what Material node to use, so that it will use the UV’s from the previous event. The material is being projected, and I can see that in the particle cloud, so I guess that part is working, the problem is the material doesn’t stick to the particles. Can someone walk me through this? Thanks.


I recorded a video tutorial about mapping object’s UVs on particles with and without the help of any toolboxes (if you run max2010):


Not sure if you watched this one yet. But it might be what you’re looking for?

kind regards,


Allan McKay’s Website

Allan also has a similar tutorial on his site - but looks like PsychoSilence has it covered too :slight_smile:

Good luck :slight_smile:


Except that Allan’s tutorial is wrong :wink:
He forgot to switch the map to UV coordinates, so it ended up using Object space mapping.


oops :slight_smile:

(I hadn’t used the tutorial, but I just remembered seeing the topic covered on his site…)

cheers Bobo :slight_smile:


Sorry to jump in, but it seems like you guys have this issue covered, so I figured I’d ask a similar question. How about particles acquiring MultiSubObject IDs?

For example, you have a teapot as an emitter. You have a couple of materials on the teapot via MultiSubObject. You want the particles emitting from the teapot to have the appropriate materials based on the polys they’re being emitted from…

How does one go about doing that?


There are two sides to this - the PFlow side and the Krakatoa side.
*The Mapping Object operator in PFlow of Max 2010 (and 2009 with extension or Box #1) that can steal UVs can also steal Material IDs (see checkbox “Acquire Sub-Material Index”). If you assign a Multi-Sub Material to the PFlow using a Material Static or Dynamic operator, the particles will be assigned the Material ID of the closest point of the mesh selected in the Mapping Object. If you use the same mesh for Position Object, the emission point’s Material ID will be acquired.

*Krakatoa on the other hand does not support the Material ID right now. While the MtlIndex channel is available on the list of channels to save, right now it defaults to 0 and does not save the actual value (I think this is a bug). Even if it were saved, a Multi-Sub material assigned to a PRT Loader for example would always show the first sub-material since it is not supported at this point. (I am quite sure this is on the wish list though).

Because of the above limitation, your only chance to do something about it until these bugs are fixed is to copy the Material ID channel to some other channel (like the particleInteger script channel) either using a Script Operator or a Box #3 DataOp, then use MagmaFlow to affect the channels of the particle if the ID matches (e.g. assign a color or texture to the Color channel)

If you really want one material by ID, you could also create multiple PRT Loaders, select all particles without the desired ID using a KCM and delete them using a Krakatoa Delete modifier, then assign a Standard Material to the Loader and repeat for the next ID in the next loader… Of course, this would mean that you would have to load the particles N times, so it might be an overkill, but it is a workaround.


In both the Mapping Object and the Box3 solution you can set the Material ID it should read the mapping from. You should be able to find that in the help :slight_smile:

EDIT: What Bobo said :smiley:



Thanks a lot, Bobo! We have Krakatoa here at the studio, but I’m not familiar with it. So, I think I’ll try to go about it using the Box#1 (we’re still on Max 2008, for now). I’ll report back, in a bit. Thanks again.


S-weet! Thanks a bunch, Bobo (and PsychoSilence)! I used the PFlow Tools Box1. Works like a charm. :buttrock:


how do i get the materials back after switching from scanline to krakatoa? i searched the forums but the link of the macro script is obsolete… please help!


What do you mean? What MacroScript? What materials?
Scanline and Krakatoa can use the same materials (as long as you use Standard materials).


When i switch from scanline to krakatoa renderer in production tab, all my material slots go black what do i do to fix this? some other thread had a macroscript or something to solve it but the link doesnt work anymore… :frowning: pls help me… i have 3ds max 2011 on 32bit…


This was the link i found from your post in the main krakatoa thread…

“For that reason, we ship an additional icon/macro in the Krakatoa category which can be placed on the Krakatoa toolbar and can be used to quickly unlock the Material Editor so it would render in Scanline instead.
http://www.franticfilms.com/softwar…acroscripts.php” (sorry for double posts)


Or you could just open the Render Setup dialog and unlock the Material Editor from the Production renderer, thus rendering the Spheres with Scanline instead.
In the upcoming v1.6.0, we will be forcing that lock to off automatically when switching back to Krakatoa.


This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.