PDA

View Full Version : Emission based on polygon angle?


jussing
11-21-2006, 02:13 PM
Hello all,

a quick question here.

I have a large, deforming poly mesh, where I want to spawn particles from the polys that have a certain angle.

How to do that?

------
An apparent solution is to scatter non-renderable particles all over the surface with a "speed based on surface" or something, and then check those particles for their direction, and have them spawn the renderable particles.

Problem with that approach is, the spawning mesh is huge, and I need very dense clusters of particles to spawn only in a few places (where the polys have a certain angle), so I'd need millions and millions of particles to do it that way....
------

Thanks in advance for any reply!

Cheers,
- Jonas

grury
11-21-2006, 02:54 PM
You could select the vertices/polygons you want the particles to spawn from, although if the mesh is too complex this would be a tedious job. Other alternative would be to use a greyscale map to control the placement of the particles.

jussing
11-23-2006, 07:37 AM
Hi grury, thanks for your reply!

Manual selection is not an option, because the mesh is animated.

You're right, I might have to control it with a map.

Thanks,
- Jonas

Glacierise
11-23-2006, 11:41 AM
Use a drag warp, with high drag in a single axis. Then spawn particles from all faces. The drag will make the ones travelling in certain direction(s) slow down. Then use a speed test to find the slowed ones and send them to a delete operator.

jussing
11-23-2006, 11:51 AM
Thanks, that's a clever idea!

But again, it's pretty similar to the approach that I mentioned (the speed test), which is not working, because anything involving covering the mesh 100% in particles, and testing those to spawn the real particles, requires too many particles.

I have tried approaches like this, and even when I increase the particle count to the level where my comp can barely keep up, there are too few particles to cover the surface properly, and the new particles will be spawned in "spots", with visible space between them.

:shrug:

But thanks,
- Jonas

jussing
11-23-2006, 12:03 PM
For clarification, I'm creating an ocean surface, and I want to spawn the spray from the top of the waves. The whole issue is how to make the particles spawn from the wave crests.

I'm not very fond of the solution with a volume select modifier selects the top parts of the waves - it spawns a lot of particles in wrong places, and not in all the right places either.

But if you add a "push" modifier to the wave mesh, you can actually flip the polygons at the wave crests. Hence, if you can have Particle Flow use only the downfacing polys to spawn from, you have a perfect wave crest selection.

But, like I said, covering the whole ocean surface in particles, and testing on them, isn't good enough, because even with more particles than I can realistically use, too few particles will be at a wave top at a certain time, and the spray will be released in random puffs.

In other words, only about 1% of the surface at any time should release spray particles, and they need to be very, very dense. Multiply that up to the whole 100%, and you get enough particles to make Max crash before it even starts rendering. So, I need to find a way that doesn't require particles on the 99% of the surface that won't release renderable spray anyway.

Cheers,
- Jonas

jussing
11-23-2006, 12:08 PM
I've also tried a solution where I create a falloff map that is white when the polys face downwards, and black otherwise.

This actually creates a map that indicates precisely where the particles should be released.

Unfortunately, this kind of calculated map doesn't work with Particle Flow's "based on material greyscale" spawning option.

So, for now, I'm stuck with rendering a map as a .MOV, and use that as greyscale emission. It'll work I'm sure, but it's not very nice. :) Also, I'd like to be able to change the wave animation without having to re-render a map animation.

Cheers,
- Jonas

Glacierise
11-23-2006, 12:21 PM
Hmm, I think you're missing something. You don't need a million particles for seeds. You only need a few to a moderate amount of seeds (the particles that sit on the surface), which then spawn a lot, and an area gets covered by wind spreading the particles.

jussing
11-23-2006, 12:52 PM
Hmm, I think you're missing something. You don't need a million particles for seeds. You only need a few to a moderate amount of seeds (the particles that sit on the surface), which then spawn a lot, and an area gets covered by wind spreading the particles.Thanks for helping, but you're right, I don't quite follow. ;)

I'm thinking the area of a wave that needs to spawn the spray is a very narrow stripe on the water. So I'd need a high density of seeds in that area in order to "catch" the whole stripe with seeds, to spawn spray.

If I have a low seed count, maybe only two or three seeds will "catch" the wave crest, where I will need 50-100 spray particles.

Of course, one seed might spawn multiple spray particles, dispersed by wind, but they will still be spawned in "chunks", and not on the exact shape of the crest. Dispersing them through wind might help the "chunk" look, but it will also further remove the "crest" look. (Like blurring a blown up low-res image to hide pixelization - you may remove the stairstepping, but you also lose the detail)

Thanks again for helping.

Cheers,
- Jonas

Glacierise
11-23-2006, 01:16 PM
Yeah, I get your idea. There is yet anothr way, I think. Making an animated boolean with the wave and the crest threshold, with ProBooleans. Then using the resulting object as a position object?

jussing
11-23-2006, 01:26 PM
Oooh, ProBoolean can do animated booleans? That would work. (Max could do it, in R4 or so, but apparently they thought it wasn't necessary. :) )

Thanks,
- Jonas

Glacierise
11-23-2006, 01:35 PM
Yes, it can - I tried it and it's very cool! Not too fast though :D

grury
11-23-2006, 11:50 PM
Yeah, I get your idea. There is yet anothr way, I think. Making an animated boolean with the wave and the crest threshold, with ProBooleans. Then using the resulting object as a position object?

Hum. Wouldnt you need a mesh as big as the ocean mesh, to detect intersection with PBooleans. That would mean have the same huge amount of particles on the resulting mesh, as there would b on the ocean mesh itself. Unless I'm not quite undestanding what you mean.

jussing: cant you just animate a long plane, just above the surfice of the water, n just move it where the waves are apearing, make the ocean a deflector and once the ocean surface touches the floating plane, u get the particles to "stick" to the ocean mesh, and then do your spawn from there on.
Dunno if I'm making myself clear. Sorry.

Glacierise
11-24-2006, 08:40 AM
Hum. Wouldnt you need a mesh as big as the ocean mesh, to detect intersection with PBooleans. That would mean have the same huge amount of particles on the resulting mesh, as there would b on the ocean mesh itself.

No, the collision mesh would be a simple plane or a box, and there would be a 'position object' pointing to the result object. So, no huge particle amount.

jussing
11-24-2006, 10:07 AM
jussing: cant you just animate a long plane, just above the surfice of the water, n just move it where the waves are apearing, make the ocean a deflector and once the ocean surface touches the floating plane, u get the particles to "stick" to the ocean mesh, and then do your spawn from there on.
Dunno if I'm making myself clear. Sorry.Hm, as far as I can tell that would give the same result as using a volume select modifier on the top part of the waves?

Thanks for the suggestion! :)

- Jonas

SoLiTuDe
12-01-2006, 10:52 AM
Unfortunately, this kind of calculated map doesn't work with Particle Flow's "based on material greyscale" spawning option.

So, for now, I'm stuck with rendering a map as a .MOV, and use that as greyscale emission. It'll work I'm sure, but it's not very nice. :) Also, I'd like to be able to change the wave animation without having to re-render a map animation.


- Jonas

I think there's a tool in Pftools Box #1 that solves this... called Birth Texture, basically it will do what you want I believe... you can hit the calculate button, and viola you have particles birthed where you need them when you need them based on a map... it doesn't have to calculate it per frame either i'm pretty sure, you can hit calculate once, and then it will store the position. You'd have to recalc when you change the ocean of course...

CGTalk Moderation
12-01-2006, 10:52 AM
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.