Fluids Smoke


#61

it is a solid render instead a volume render. i had to take higher samples for that to look clean.

maybe that is the only possibility to render such high tesselated surfaces with the maya renderer :slight_smile:

cheers

alexx


#62

Share the .ma and i ll make the test with a head !!!
nice work Alexx !!


#63

Thanks for the extremely helpful info alexx, I had never thought to use a fluid shape on particles before. This thread saved me lots of time and headaches.

scott
Greystone Television and Film


#64

thanx for the flowers - but they belong to duncan and the other thread starters…
i only took their idea and rendered it :slight_smile:

cheers

alexx


#65

looks like rock… somehow I think just working with normal fluids would be better than this method; it seems like a shortcut for us fluid noobs :wise:


#66

in my little test i have rapid changing smoke shape… any ideas?
It is a rocket launching sequence, takes ages to see if the look is okay cos i need like 100 frames at least to see if it works(long render times eventually)

i have this emitter bursting out particles spreading over the floor, still render looks reasonable but the shape of the clouds are changing too fast,

i rendered hardware buffer of the fluid shader only to see if i keyed the texture time more than enough but it was changing real slow which didnt seem to be my problem… any ideas?


#67

Thanks for that enlightening information Duncan and Aelxx! I have been using Houdini for a year now (doing my MA in Digital Effects) - and I am astonished by the amount of goodwill and friendliness that exist here! I guess using fluids connected to particles is quite similar to using image3d-textures based on metballs attached to particles in Houdini, but this method is sure fast and easy to understand!

Keep up the great work!

Cheers, Jostein!
Bournemouth, UK


#68

I am really glad I caught this thread, oh man am I glad. I have been trying to figure out how to get particles to be shaded with the fluid shader for quite some time, without having each particle look exactly the same. What I have been trying to do is make a dragon cloud, and to get the movement I want for the particles I need to use goals and of course for the shading of the clouds i have wanted to use the fluid shader, haven’t had very good results with the pCloud…anyways.

I have been spending this afternoon playing with this new technique and have a few questions, more like problems. First off I tried using the expression that Duncan gave to us in this thread;

“fluidShape1.textureTime = particleSampleInfo1.ageNormalized * 0.1”

by selecting the “Texture Time attribute” of the fluid shader in the attribute editor and creating the expression

but maya gave this error,

// Error: Attribute not found or variable missing ‘$’: particleSampleInfo1.ageNormalized //

I was able to connect these two attributes using the connecting editor in the Hypershade but how can I add the offset " * 0.1" part to the equation if I can’t create an expression, hope that makes sense.

Also I am a bit foggy on how the particle sampler info node gets its information to pass to a shader, let me explain. The examples I have seen that use the particle sampler, the Particle sampler isn’t directly connected to a particle system only to a specific shader, so how does the particle sampler know which particle system to be associated with to send out information like colorPP, OpacityPP ect, or is there a single particle sampler created for each scene.

Like in these fluid examples where you connect ageNormalized from the particle sampler to the texture time of the fluid shader where is the ageNormalized value coming from, is the shader itself, the go between for the particle shape node and the particle sampler info node, this is how a connection is made between the two nodes, don’t know if this makes any sense, let me simplify. The values that a particle sampler info node sends out to a shader, where do these values come from.

Looking at Alexx’s example scene file, btw thanks for that, I still see to much repitition in the nosie pattern, is there a way to have the the fluid shader see the entire particle system as a bounding box and apply a single pattern to the whole thing, just like with 3d fluid containers. If not how can we get a varied texture thoughout, I know Duncan gave some insight into doing this but I can’t figure it out and don’t really understand the particle sampler info node to well

Sorry for the long post, any help is much appreciated

Ben


#69

hi thrasher

well about the connections: are you sure your particle sampler info is called that way?
no idea why the connection via mel does not work. just create it in hypershade and check the script editor output. then simply use that one in your expression.
if you dont want to use mel at all, you can use a multiplyDivide node in hypershade to get the *0.1 in there.

about the particleSamplerInfo not being directly connected to the particle shape: it is connected, because the texture it is connected to is assigned to the particle system. it is like the regular sampler info: you just can get additional parameters to your shader network which are generated during rendertime and not before. you just tell maya: before you create the rendered pixel, give me some information about what you are doing and use that information to change the shading… hmm. sounds a bit noobish but i think that is the best way to explain.

i dont think connecting the age normalized to the particle system is a good way of getting good variance in your shading. this depends a lot on the particle emission rate and speed. in some occasions it can look good, and in others very uniform (e.g. when you emit a lot particles in very short time and have them all about the same lifespan.) but with most other ways of doing this it will end up with some test renders as well i guess :slight_smile:

about seing repetitions in my sample scene… not really that i see them, but that is what i mean: i guess you have to adjust the expression/network for the noise generation to suite your needs everytime… just change it until you are happy.

your bounding box idea: as mentioned before the texture is in local space… like having a 2d texture on them all instead a 3d texture that they can move through.
but you still can assign the particles new textures according to their world position using a runtime expression (just pipe their pos to the noise origin).
but if you do that you dont have control over the look anymore…
as an example imagine the cloud of a volcano eruption that lasted for some time. the cloud in itself barely moves and changes the noise pattern, but the smoke itself still rises. when you assign the pattern as you want to do it, the pattern will always change as the particles move. the only way of changing that behaviour is creating the noise speed yourself.

hope i sorted some out :slight_smile:

cheers

alexx


#70

Hi alexx, yes that explainition helped alot thanks

BTW when i said your example was to repetitious I tried your shader with a different particle system not the one in your scene, so this is why it looked to repetitous. So I guess each particle simulation needs to have a different expression and use different attributes from the Particle Sampler info, that sort of sucks, but makes sense.

So i am trying here to think of the best overall attribute to use consistently for my fluid shaders or ones that will give the best bang for the buck. Just thinking out loud here but what do you think about particel velocity as a controller with an offset value. If you take the dynamics of an explosion for example the particles first start out moving fast and look like fire and then they turn into smoky plumes and slow down abit, so using velocity per particle connected to texture time and texture scale of the fluid shader would mimick this behavoir, what do you think. The problem i see is with the offset. What attribute could we use to really mix things up for the look of each particles noise pattern or texture. Would you just use a number for offset or is there another attribute from the particle sampler info node that would be better, like age perhaps, if the particles age is randomized that is. Using age instead of a number would give a new value per frame per particle instead of just per frame, meaning alot more variation, am i thinking of this right?

I have to be honest I still don’t understand the need for the particle sampler info node. I mean why can’t one just plugin values from a particle system directly to a fluid shader, like opacityPP or colorPP, or agePP from the particle system. These values change per frame per particle right and in the end connections made with the particle sampler info node just turn into numbers, so what is the need for it, i know i an missing something about this node.

Thanks


#71

Thrasher… you want particleSamplerInfo1, not particleSampleInfo1 in that expression:
“fluidShape1.textureTime = particleSampleInfo1.ageNormalized * 0.1”
(I’m also assuming you created a particleSamplerInfo node in your scene)
ParticleSamplerInfo has special attributes that are initialized per pixel by the maya shading engine. The key with this node is that it provides the values from the particle currently being rendered to the shading nodes.

By way of contrast the particle system node is independant of the maya rendering engine. If you were to plug particle system values directly into the shader they would evaluate to a constant value across all pixels… as if a single particle covered the screen.

Duncan


#72

thanks Duncan

yah i finally got the expressions working and yes it was the typo, but thanks anyways. I think i got the jist of the particleSamplerInfo node now so thank you guys.

Duncan just wondering if you have maybe some more secrets to unlocking particles shaded with fluids, like attribiutes you would use or tricks that give you a good starting point. Or is each particle simulation going to take different approaches. Would you happen to have any scene files with good examples of this.

BTW does Alias have any plans for making a cross breed between fluid dynamics and particle dynamics, what I mean is a system that uses the Navier-Stokes equation to get fluid motion but can be influenced also by fields like particles can. Think of like goal weight with goals if you didn’t want your simulation to be completly controlled by fluid dynamics you could turn down the “fluid weight” so the simulation would behave more like unto particles. If not do you think the fluid shader might get an upgrade so it shades particles more like Afterburn does where it looks at the whole particle system and applies a single noise texture to it, that would be really nice.

thanks


#73

Key fluid attributes that you may wish to affect are textureTime, transparency and opacityInputBias, however you can affect any of the attributes in the shading and texturing blocks.

Currently you can use fluids as a field affecting particles… if “conserve” on the particleShape is set to 0 then the particles will exactly follow the fluid flow. Also you can apply fields to fluids, although it is more dicey as the fluid is incompressible, so you can’t have convergent or divergent flow. Also the fluid node transfers densities on a grid, which has problems resulting from the low grid resolutions currently achievable, so it will generally behave differently from particles.

Duncan


#74

Nearly every time I go to use a particleSamplerInfo node, I think “now how do I connect it to my particles again?” before remembering that it just works. Now that you’ve said that I might finally remember once and for all.

It’s a really great node! It would be even more fantastic if you could do something like pass the per particle colour info into a shading node that could be applied to instanced particles, allowing colour variation etc. I’m assuming that isn’t currently possible.

Hah, well I suppose you could do something crazy like emit solid fluid from your object to be instanced, then apply that fluid shader to your particles instead of actually instancing the geometry. That way you could use the per particle shading to affect each ‘instance’?

:thumbsup:


#75

Hi,

would somebody perhaps be willing to make a tutorial out of this thread ? I think it would be such a shame if all this valuable information would be lost and I’m sure there are lot’s who don’t know of this technique.
I learned a lot in this thread, I’m sure that if there was a tutorial that many more would try-out this interesting technique.

ciao


#76

Any tips on getting the nice wispy look? All my particles look like cotton balls. Very definite shapes.


#77

hey alexx,

while I was checking out your scene, I noticed that the expression you used:
“particleShape1.userScalar1PP = particleShape1.particleId * time; " is working except for the first particle.
it’s a small change but because the particle Id of the first particle equals to 0, there is no change in time being passed down to the noise pattern for the first particle.
If you change this to:
" particleShape1.userScalar1PP = (1 + particleShape1.particleId) * time;” it works also on the first particle.
implementing the velocity looks like a good idea.

cheers.

*edit: particleShape1.userScalar1PP = particleShape1.particleId + time; works just fine, my bad, sorry


#78

Increase your particle size by 10x.


#79

hehe… you got me :slight_smile: did not care about that one indeed.

cheers

alexx


#80

hi everyone. great thread. im learning all this stuff at the mo so am resurecting it. i’m using your scene file alex to get started its great thanks for sharing, im disecting it as we speak.

i have to ceate some storm shots which require lightning, rain and… yep, you guessed it. CLOUDS! i have a predicament tho. i really want the lightning in my scene to illuminate the surrounding clouds when it strikes as they do in real life. only way i can get this is with voxel type particles i think. i want to try this fluid shape method but desperatly need to reduce render times. its a painstaking process. rendering, re-rendering!

i need to cover a large expanse with these clouds so if anyone has any good tips now we are all fluid pros :wink: please share…