Fluids Smoke


#21

awe dude…
what am I missing here… fluid shader? what the hell is that… the only “fluid shader” i see is ocean shader, I see a 2D and 3D fluid texture… but which do I use? i’m still confused, maybe you dont understand; i know NOTHING about fluids and next to nothing about particles…

edit: im experimenting, trying to figure it out… i think you meant “fluid shape” (under volumetric materials) and I’m seeing if that can get me anything…


#22

uhh…
after the method i tried… it took 30 minutes, and I wasnt even 10% done…
right, is this how you did it? with the fluid shape?


#23

The shader is called “fluidShape”. One thing to be aware of is that the fluidShape node is both a shader and a shape. When you create it off of the fluids menu it gets assigned to its self and thus appears as a rendered box. When you create it off of the shader menu it is assigned to whatever is selected. The box shown in the UI will then not render as it is not assigned any shader.

Note that you probably will want to use fewer, larger particles for the best effect. Currently the fluid, when assigned to particles can have each particle cast raytrace shadows and shadow its self. However note that currently you cannot have fluid shaded particles shadow other particles(a bug). Thus one needs to rely on the internal self shadowing of the particle, so larger(and fewer) is better. One can get around this problem by instancing a fluidShape (created through the fluids menu) using particle instancer, but this restricts how one can give individual particles varying transparency, etc.

As a starting point create some particles with cloud render attribute and assign a fluidShape shader to them. On the fluid shape select the thick cloud puff preset in the attribute editor. Note that this preset uses a sphere dropoff shape, which is important when shading particles, as the particles are spherical, not cubes.

In terms of render speed make sure with your particles are large, but do not overlap more than required. In some cases you may be able to lower the texture frequency along with the shading quality to speed things up a bit.

The fun part is using the particleSamplerInfo node to drive attributes on the fluidShape. One can control any shading or texturing attribute… for example opacityInputBias could be linked to particle age somehow to make particles pluff up when they are born. The texture offset could be driven by location of particle creation such that the particles are initially all cut out of the same large block of noise. Note that if you wish to affect the color, you can define a color range in the ramp then drive colorInputBias. Another technique is to directly set the color indice values on the fluid color ramp using runtime particle expressions.

Note that any attributes in the Surface, Shading, ShadingQuality, Textures and Lighting blocks can be set per particle using particleSamplerInfo. Attributes in contentsDetails, however, like densityScale are computed once per frame, not per pixel and thus cannot be set per particle.

Duncan


#24

Ahh yeah I noticed that at some stage. I’m glad it’s known to Alias as a bug. Hehe you guys are making me want to do this stuff too, so I think I will!


#25

Hmm, this is what I got…
not sure exactly how to use the particlesamplerinfo though…
but this seems just as slow as fluids (which is okay) but runs like particles in the perspective, exactly what I wanted; now its just perfecting the look so I know it’ll look right when I render


#26

Thanks Duncan for more detail’s input…I do learn something too.
I too use the puffsmoke preset as start to tune the “smokeBall” I call…
But about the “texture offset”, you mean it is connected from particle’s “birth position”?

and you remind me one thing about “ShadingQuality” canbe use as perparticle too…
Which I don’t even think about it!:slight_smile: Thanks!

Gremlin: sorry for my short explaination… , but I see you’ve get your smoke now…


#27

I’m sorry BillSpradlin, it is now a bit off topic here…

But What you want to make a big black smoke type, I would suggest to use “container”…
“container” is more suitable for your case…Which the smoke motion, swirl…etc, can be achieve more easy and nicely with original “container”.

My approah is suitable for missile smoke…which if you use container as it’s size will be huge big and cannot acceptable the forever render time…

I’ve found this method in the help menu somewhere…But don’t know why…They don’t give any good tutorial about it…


#28

kind of… could you send me that scene file for the imag above? your amoke seems so much better than mine :sad:


#29

No need to appologize for getting off topic. There is some great information being discussed here. I am wrapping up several projects right now and should be finished with them towards the end of the week so I will have more time to study this subject in depth. I haven’t had any spare time to fiddle with this, but from the looks of several of your examples that’s very close to what I’m looking to do. Thank you all for the information and if there’s anything else to add, by all means, please feel free to add anything you would like.


#30

hi there,

i’ve been trying to do similar effects for a long time now… i’ve realised that mental ray renders fluids much quicker then the default renderer… sadly when using the technique mentioned by 3don, the world position to texture origin connection is no supported by mental ray, thus making the render time much greater.

would anyone have any suggestions on a work around to getting mental ray to render these ‘random’ particles?

if its not much of a hassle could someone also explain more in detail how one would attach the per particle attributes to the fluid shader?

thanks for your time.


#31

Driving the fluid textureTime with the particle age is quite useful. Also a
random offset applied to textureTime(perhaps using the particle id value ) can
help keep all the particles from looking the same.

Duncan


#32

To drive the fluid shader using the particle attributes create a particleSamplerInfo( in the render utilities ) and connect the desired values off of this to the attributes on the fluidShape.
One can do this with direct connections (frequently using additional utility nodes to get the
values into the desired ranges) OR with expressions, for example:
fluidShape1.textureTime = particleSampleInfo1.ageNormalized * 0.1;
(for good render speeds do NOT use get and setAttr calls in these expressions)

Make sure that any attributes from the particleSamplerInfo you are using exist on the
particleSystem. If not you need to create them.

Duncan


#33

sorry to jump in here, but is there a specific section of the manual that talks about the fluidshape presets? I keep looking in the manual but don’t find anything. I’m not sure what replace or blend xx…etc does. Just want to read up on all the cloud types.

thanks for this info, this thread is helping me a lot with my smoke trails!


#34

The presets in the attribute editor is a general mechanism that works with most maya nodetypes. Nodetypes for which presets exist will show a “*” in the preset button.
We ship presets for some maya nodes, like fluids and the ramp shader, although you can
create your own.

I simply searched the doc and it took me about 5 seconds to find the following, which also points you to the general section on attribute presets.
Duncan

Use fluid attribute presets
A fluid attribute preset is a saved collection of fluid node attribute settings that you can apply to other fluid nodes at any time.

Maya ships with a set of fluid attribute presets which you can use as a starting point for various fluid types. You can also create your own attribute presets. You can replace the attribute settings in a fluid container with preset attributes settings, and blend presets with current attribute settings to get new variations.

Select the fluid container, then click and hold the Presets button at the top the fluidShape Attribute Editor to view a list of available presets.

For information on creating and applying presets, see “Attribute Presets” in the “Using Maya Editors” chapter of the Basics guide.

Note

If you apply an attribute preset created with a 2D fluid to a 3D fluid, the fluid becomes a 2D fluid. Similarly a 2D fluid becomes a 3D fluid when you apply a 3D fluid preset to it.

[right]Home Previous Page | Next Page
[/right]


#35

Thanks very much for the info Duncan!

I did find that information in the manual…I knew what presets were, just not the blending part. I apologize because I apparently skipped over the part about the replacing/blending :sad:
Thanks for pointing it out!


#36

hmmm…is it correct that the particleSamplerInfo doesn’t work with mentalray? And, if so, is there any way around it?


#37

Currently not all particleSamplerInfo fields are supported in MentalRay.
The supported ones are:

  • outUvCoord

  • outColor

  • outTransparency

  • outIncandescence

  • particleId

  • age

    Duncan


#38

Thanks Duncan.

-z


#39

a big thanx to all of you and especially duncan…
i was looking for something like this a long time and never came to the idea to connect the particles to the fluidShape shaders…

cool :slight_smile:

cheers

alexx


#40

just one question: the way it looks is that the texture space is local to each particle right?
meaning if i have different sized particles i have the texture fit to the expansion of the particles?
but i guess that can be solved by putting the radius in the calculation of the texture size… gonna check that

cheers

alexx

and i like it: