Jump to content
terencemace

Particle size based on color from texture

Recommended Posts

Hi all.

I'm having good results using the flip solver and particles, using density to drive them mainly.

Now I can't seem to figure out how to vary the size of the particles based on a colored texture. So all the particles have a unique size based on the colors in the texture. And the colors from the texture would be represented in the particles.

As always, thank you for your advice. Such a great community.

T

Edited by terencemace
Spelling

Share this post


Link to post
Share on other sites

Hey, 

I included a .hip. Hopefully you can find this useful. If you have any questions (or improvements) about it lmk.

pcolor.hip

Edited by ejr32123

Share this post


Link to post
Share on other sites

Evan, it works great from the grid. Thank you.

But, I'm trying to make it work on a box geo that I made into a flip solver. That's how I'm generating my particles. Inside of the box, so they just flow over a surface. The particles stay inside the very very thin box.

Maybe there is a way to make the particles you sent just stick to the grid and swirl around on it?

Tricky, eh?

Thanks!

Share this post


Link to post
Share on other sites

could you post a photo or the .hip? I think I understand what you are saying but a photo would help. Are you saying the particles come from a box, then flow over a grid with the colors you want?

Share this post


Link to post
Share on other sites

Hey Evan. Attached are a few shots of the setup. And the image file I want the points to be generated from.

Thanks!

DOP.jpg

Image.jpg

Nodes.JPG

TextureOnPoints.jpg

Share this post


Link to post
Share on other sites

And this one shows how one of the point wrangles generates the density. After the Points From Volume node.

PointWrangle.thumb.JPG.03ce5a8225b86327667f5bc7c6e7c00e.JPGPointWrangle.thumb.JPG.03ce5a8225b86327667f5bc7c6e7c00e.JPG

Share this post


Link to post
Share on other sites

Is this what you want? You can mix this with the pscale trick from the other file. This time I am just using attribute transfer to get the color from the grid to the particles. Or are you trying to do something with uv's on a flip sim like this?

Also there is a example file on mixing flip colors.

https://vimeo.com/178384597

pcolor2.hiplc

pscale.PNG

Edited by ejr32123

Share this post


Link to post
Share on other sites

Hello all.

I've managed to get much further, and am able to vary to point size of my particles. Thanks Evan for your help!

BUT, I still cannot get the texture to properly line up with the fluid. Instead of seeing the Mandril in this example, the UVs are wrong. And I have tried every combination of UV nodes, to no avail.

Frame 01 of the simulation should be the image of the Mandril, and the fluid particles emit from that and swirl around.

Any ideas?

Attached screenshot and project file.

Thanks! T

FluidParticlesTEST.hiplc

Mandril.JPG

Share this post


Link to post
Share on other sites

Fixed! That's what I was missing. Thank you so much Evan. I knew that Attribute Transfer was going to come in.

Well done.

Terence

*What a great community of people we have here.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×