Scale by density

48 views
Skip to first unread message

Anthony Martin

unread,
Jun 3, 2012, 9:12:42 AM6/3/12
to soft...@listproc.autodesk.com
Hi there,

I want to scale/change the size of a particle based on how many nearby particles there are. In my mind it feels like it should be very easy (I'm sure it is): for each particle check how many particles there are in a certain radius - use the number of particles to rescale them. So in other words if a particle is on it's lonesome it gets scaled quite small but if there are a fair few around it then leave it at about the initial particle size.

I've got mind block and can't figure this simple thing out.

Help?

Cheers,

Anthony

Rob Chapman

unread,
Jun 3, 2012, 9:16:42 AM6/3/12
to soft...@listproc.autodesk.com
get neighbours > amount > rescale > size ? :)

Anthony Martin

unread,
Jun 3, 2012, 9:55:28 AM6/3/12
to soft...@listproc.autodesk.com
Cheers Rob, that's quite similar to what I'm trying now. Although I'm trying it with get distance to neighbours that outputs an average distance.

Fabricio Chamon

unread,
Jun 3, 2012, 3:33:33 PM6/3/12
to soft...@listproc.autodesk.com
like this? playing with cutoff distance also produces different results..
icetree.jpg

Rob Chapman

unread,
Jun 3, 2012, 4:04:45 PM6/3/12
to soft...@listproc.autodesk.com
heh, I was thinking more like this
scale_by_density.jpg

Anthony Martin

unread,
Jun 4, 2012, 11:25:46 AM6/4/12
to soft...@listproc.autodesk.com
You guys are stars! Thanks Rob and thanks Fabricio.
Reply all
Reply to author
Forward
0 new messages