XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : Burn Propagation

04-25-2010, 08:57 PM
Iíve been playing with the new emission maps and found that I canít convince any of my object emitters to emit properly from a 2dFluid texture into a 3d container. The connection looks like fluidTexture.outColorR to fluidEmitter.densityEmissionMap. The 2d fluid is something akin to the "burning paper" example shipped with maya and the texture is just applied to a polySphere. I also cached the 2d fluid.

Am I missing something?

To bugtest I also applied a "checker" to the temperature grid and it works just fine. I did notice that it uses outAlpha instead of any of the color channels but should this matter?

04-28-2010, 10:18 PM
The connections to the density emission will use outAlpha regardless the actual attribute you connect. Just have your burn 2d fluid texture work on the opacity, not color. In a similar fashion mapping the emitter fluid color will always use outColor from the map.


04-28-2010, 11:07 PM
Here is a simple scene showing a 2d fluid texture burn simulation used as a 3d fluid emitter on a mesh. On the 2d fluid texture I made opacity a function of temperature, thus it emits where it is hot and burning.

Also to keep the files small I didn't set initial state on the 2d fluid textures, instead using animated emitters. (one to fill the fluid with fuel the other emitting a little heat a point to get things going) I used the same texture for the shader color basing color on the fuel grid, so as it burns the sphere becomes grey.


04-28-2010, 11:11 PM
awesome, thanks for the example file!

04-29-2010, 02:27 AM
Thanks for the response and example! It completely works as expected now that I use outAlpha. I thought I was losing it for a while as I expected it to use any single channel.

I'll go drop a ticket for this tidbit to be stuck in the docs somewhere, it's terribly useful.

12-10-2010, 12:42 PM
thanks to everyone ,i have doubt ...

keep in mind im burning cloth in random place ....
if im burning cloth with using ncloth method i.e. animated ramp attaching to transparency of shader and then applying shader to ncloth surface material , then emit particle from animated ramp texture which is also applied to transparency so we will get burning effect with particles or we can emit fluid from those particle.

then how to achieve some pieces of cloth falling down while burning ? is that possible with help of procedural texture map(animated ramp which is also applied to transparency ) which can be apply to glue strength or something so some cloth pieces will fall down ???

12-10-2010, 04:33 PM
If you're emitting particles from the cloth then you just need to tweak the particles until it looks like the desired effect of fire.

Emitting it back into a fluid is a bit tricky. I've had limited success using the auto-resize feature in 2011 to have the fluid box follow around moving smoke (should work the same for fire...). The main problems were if the fluid emitter moved too fast from frame to frame and exited the fluid volume it would completely miss it and not resize outward unless you gave the resizable fluid VERY generous resize boundaries.

12-15-2010, 02:56 AM
If you use the textured emission into the fluid then auto resize should always follow the mesh no matter how fast it moves as long as resize to emitter is on. It also helps to enable motion streak on the fluid emitter. If you want the fluid to only resize to the burning region on the cloth, then you could emit short lived particles that emit into the fluid and die. With resize to emitter the fluid auto resize will always track the particle positions, nomatter how fast they move.

To get the burned fragments to fall apart you could connect the same texture used for opacity( a 2dFluid burn simulation) to the stretch and collide strength maps on the nCloth. If the bend is non-zero then you would also need to map that. It is simplest to make other effects like drag and damp zero to eliminate the effect of transparent triangles on the simulation.

I've not tried this, however. One might get unacceptable stretching along triangles that have one vertex transparent but the others visible (along the burn boundary). Perhaps instead creating a tearable surface constraint then mapping the glueStrength would work better... although you might still want to map collide strength so that the transparent triangles no longer collide.


12-16-2010, 01:55 PM
look duncan this is what i come up with


I still don't have control over shape of teared surfaces, looks too edgy and not shrunk.

while pieces falling down i need some of them carry fire along with them but as i followed 2dfluidtexture to emit density on cloth using 3dfluid container ,falling pieces not taking fire along with them while going down,they just following path as I given to 2dfluidtexture .

however there are many other shading network problm while doing this.....

i.e. ncloth tearable strength texture attr. not taking 2dfluidtexture ....................

guys please help or do add comment ........

thank you so muchhhhhhhh.

12-16-2010, 10:42 PM
Texturing the glue strength with a 2d fluid texture works OK for me( see attached scene ). (note this did not work prior to Maya2011) One textures the glueStrengthMap attribute on the nComponent for the tearable constraint. You can connect the outAlpha from your fluid, if doing it manually. Note that the outAlpha of the fluid texture is based on the opacity value. You can reverse this if need be by editing the opacity ramp on the fluid. Also one can't do any abitrary shading network connections for non-render uses of textures... it will always evaluate outAlpha for a single channel value and outColor for a color value.

Note that for the auto resize to follow the fragments down they must be emitting some density(other emitted attributes like heat and fuel do not trigger the autoresize). As well the density should be over the autoResizeThreshold value (or just set the threshold to a very low value). Perhaps by the time the fragments fall they have fully burned and thus are no longer emitting?


12-17-2010, 12:21 AM
Awesome example Duncan, cheers!

Had a quick play with your scene, fun fun fun ;)

and hehe, very nice diplomatic final sentence there about the fragments ;)

12-17-2010, 12:00 PM
hehehe , fragments are not only which turned into ashes but also pieces which is unburned and separated because of tear .....

Yes duncan , 2dfluidTexture is now working properly once it is set to initial state ,jus like u did.
great info. you provided on fluid resize ,thank you for your demonstration file too.

@HowardM , looks like u emitting non-fluid particle and working gr8 for you , Exactly same thing I was looking for but emitting fluid ,nice quick test .
actually I expected duncan to explain on this part but anyway thank you so much both.

12-17-2010, 02:09 PM
another quick test -

fluid fire emission based on image sequence (from fluids)... so there ya go mate, it all works in one form or another ;)

get cracking!

12-17-2010, 04:05 PM
http://vimeo.com/17924766 - got the alpha working... fire direct from the 2d fluid.. :)

12-17-2010, 06:03 PM
do u have control over fire emission ? like some fragments has to stop burning and some needs to keep burning ,whatever way? ur emission look its pretty decent .......

aggggrhhhhhhhhhhhh!I'm jealous :wip: :p

share share share...........plzzz

12-17-2010, 07:39 PM
http://vimeo.com/17924766 - got the alpha working... fire direct from the 2d fluid.. :)
very nice. would love to try it on more rigid simulations for dynamic destruction effects... coupled with extrude nodes.

12-18-2010, 12:34 AM
Awesome thanks Duncan, and everyone sharing.

12-18-2010, 02:47 AM
another - http://vimeo.com/17943206 and http://vimeo.com/17943577
this uses a pre torn object for better shapes, and the outColor to shade the burning...

Moreffect - you can control EVERYTHING with ramps/textures, etc, but as I mentioned, this is a complex effect and wont be 'push of the button' ... it would take some wit, planning and luck to control everything with the standard tools.... its easy to make pieces burn, but to shrink, control each individual piece etc will take alot of work...

the easiest way would be to render all maps to image sequences, tweak in Shake or AE, each layer and how you want it to react...

stooch, ill do some other tests, try some ncloth 'hard bodies'... im imagining a lot of cool fx with this method... skin burning, tearing, melting.... plane fuselage bending, burning, breaking... anything on fire burning ;)

12-18-2010, 09:12 AM
another - http://vimeo.com/17943206 and http://vimeo.com/17943577
this uses a pre torn object for better shapes, and the outColor to shade the burning...

very realistic, nice work!

12-19-2010, 08:42 AM
Hey guys I had a play myself, heres my results what do you think?


Everything is running at medium res. Im running the same 2DFluidTexure for nComponents, fluid emission and texture . I think the method could be improved if SouP's pointCloudFluidEmitter could be plugged into 2DFluidTexture.

12-19-2010, 12:32 PM
hehe nice one!

i can see this scene/effect becoming the new LENS FLARE ;) , on everyones reels

still havent had time to play with SOuP... but does it have an easy way to Invert the out.Alpha from the 2D Fluid?
Or am I missing something in native Maya? (swore Duncan has mentioned that you cant because of a 'bug' or design in Maya...ie. Layered Texture wont work)
I cant for life of me Invert it with either a Ramp (Invert) or a Reverse Node, etc, (am i missing a node that will?) to use one Alpha to break the cloth, and an inverted Alpha to emit the fire... (at moment I needed to cache out the cloth, then manually invert the 2D fluid opacity in the fluid, and then sim the fire, otherwise I get emission all over...)

Shame you need to use out.Alpha and cant use Color to control the glue strength or the fire emission,would make life alot easier...

12-19-2010, 12:39 PM
Thanks all guys who is contributing to this thread ,I appreciate your comments.....

I was struggling with texture issue which is kinda pain ,but finally got cracked ,though its not straight ways of deal with it. I think playing on texture is more challenging here while making this effect.

On curling of fragments I think pre-tear work best, at least for me.
if u do tearing using animated maps chances of getting large amount of small pieces on which one wont get curling.

here is my some fixes over previous render, with curling & fire emission on fragments ,I added little carbon smoke on fire .

Link : http://vimeo.com/17976617

my purpose of begin here is if you know something and you share here with people, people will learn from that and put more challenges to take it to the next level.

P.S. any point of time if anybody feeling im talking rude or disrespecting forum ,kindly do me notice .

12-19-2010, 08:14 PM
nice one!

can we see a closeup of the curling? cant really see it on vimeo...

12-19-2010, 08:35 PM
@Howard, yeah Ive been toying with this idea for a while and didnt realise how easy it was in 2011, I think I just dropped the idea and didnt pick it up again until this thread, so thanks to everyone for that.
I also cached out my nCloth but Im logging a bug with Peter because I think that the pointCloudFluid node in SOuP should be able to help us here. The way it works is you would still create a 2D container for each - nComponents, fluid emission and texture but the emitter sucks values from the voxels in the first container and emits whatever attributes you like into the second and third. So essentially you have one sim but 3 outputs to plug into 2D map inputs.

This would be better than using a straight invert because you can still have unique control over each container, especially on the texturing one. Currently the node does not connect to this type of container.

12-19-2010, 08:43 PM
Sounds like just what we need!


I'm sadly amazed this is not possible in native maya...

12-19-2010, 08:47 PM
Actually its achievable but its a matter of writing some code which is not a bad idea since these are only 2D containers but I think Id still rather cache out the nCloth and butcher the fluid, Im lazy like that sometimes ;)

12-20-2010, 08:00 PM
http://vimeo.com/18010666 - quick ncloth "rigid" test

12-21-2010, 12:56 PM
cant stop playing with this stuff ;)

quick test, movement is an error caused I guess by the shrinking rest scale making the cloth jump around...

12-22-2010, 03:18 AM

2d Fluid emission driving the tear and release of field magnitude on the cloth as well as fire emission...

12-22-2010, 06:19 AM
hi howard,

Its looking good and interesting stuff.

Regarding teared cloth - what technique you used to tear the cloth,any procedural approach.

thanks in advance

12-22-2010, 01:01 PM
you mean pre tear? nothing special, just smoothing, triangulation, and a simple surface shatter....

04-07-2011, 02:48 PM
Friends i want to shatter poly Objects like Nanomites in G.I.Joe.And i think this GlueStrengthMap techniques will be good to start,But don't know how to pull down so can i get help plz.
Plz chck my SceneStartup in attachments.

04-07-2011, 04:57 PM
use the same ramp for your input mesh (set to 1) - to hold the object until it is released and just add some forces like gravity...

04-07-2011, 05:27 PM
I made this connection
ramp1.outColorR -> nClothShape1.inputMeshAttract
But still shape is deforming....Wht is missing????
Below is test scene.

04-08-2011, 12:14 AM
no no just open the Dyanmic Properties Maps and add the ramp there.
and set the input mesh attract to 1.
you set the color red to the input mesh attract (notice its yellow in the attr editor), not the input mesh attract map...
..or just attach the red channel to the map ( not the attribute) manually in hypergraph..

confusing aint it ;)

04-08-2011, 02:54 AM
Thanx very much Bro.Now it's working like charm

04-13-2011, 09:36 PM
...I cant for life of me Invert it with either a Ramp (Invert) or a Reverse Node, etc, (am i missing a node that will?) to use one Alpha to break the cloth, and an inverted Alpha to emit the fire... (at moment I needed to cache out the cloth, then manually invert the 2D fluid opacity in the fluid, and then sim the fire, otherwise I get emission all over...)

Shame you need to use out.Alpha and cant use Color to control the glue strength or the fire emission,would make life alot easier...

Yes it would be nice if one could connect using the different fluid outputs (outAlpha,Color, UV) but the evaluation of fluid textures in non-shading contexts all assume either outAlpha or outColor(depending on the attribute connected), regardless of the actual connection.

A workaround that can avoid needing to cache is to create a second fluid texture that is non-dynamic that has only a static density grid and no velocity grids. Create a volume emitter for this static fluid and map the density emission with the original(dynamic) fluid texture. Make the dropoff zero, densityMethod = replace, and turn off jitter. If it is a 2D fluid rotate the emitter -90 in X. Then scale the emitter to fit the fluid bounds. The second fluid should now match the first (note that it may have half the density due to the default density scale of 0.5... if you make it 1 on each fluid they should then fully match).

You can then modify the opacity ramp on the new fluid to make it the inverse of the first, or adjust as desired. This new fluid can be used to texture cloth attributes.

(kinda overkill for something that should be simpler, I know)

04-13-2011, 11:51 PM
Thanks for the reply and tip! :)

So, honestly, Im no programmer, but why is it so hard to tweak a little code so Maya can use something other than out.Alpha? Would changing or adding this really put a spanner in the works? Just seems like it should already be a feature but was overlooked.


04-14-2011, 07:49 PM
The problem is that that the current mechanism used for non-shading network evaluation of textures is basically a hack that does not use the dataflow of the dependancy graph.

If you are texturing a fluid texture in shading network you can use any outputs desired and it will work. In that context the evaluation is a true data flow... the shading engine stuff the current uv values on any nodes with input uv attributes then pulls on the output evaluating everything for the current shading sample.

However the notion of texture uv as an input is not defined when evaluating something like fluid emission. If the fluid emitter has an input connection to certain "textureable" attributes it finds the node that is connected and calls a special method on it with the list of uvs it internally defines, rather than pulling on its dependancy graph connection multiple times. We could potentially analyze the graph connections and attempt to apply this to the function, but it could get complex and messy.

Another way of handling might be for the emitter to repeatedly stuff texture input uv values upstream in the network then pull on the texture connection for the value( similiar to the shading network ) however this would likely evaluate slowly and could cause graph evaluation problems, especially with regards to threading.

At any rate this is all probably more info than you want to know. Basically it was one of those corners in the code that was awkward and for which no good solutions presented themselves.

Many of the recurring bugs that are annoying yet look simple to fix tend to have complex issues when one examines them, or we would have fixed them by now.


04-14-2011, 08:50 PM
The "Even more messy for now but potentially better in the long run" solution would be to implement something akin to houdini's subnets. At least that way we could still have a single expected output to outalpha but do any kind of texturing ops and channel shuffling we could ever want.

Then again, giving maya a concept of subnets looks expensive... Maya just wasn't designed with that kind of procedural workflow in mind.

CGTalk Moderation
04-14-2011, 08:50 PM
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.