Message 1 of 2
smooth out the scaling of particles
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a bunch of particles and the camera moves towards them and through them. I'm scaling them down depending on the distance to the camera. What I'd like to do is have them scale down more once they come within a certain distance. I can do it, but the transition is abrupt. How would I make the transition from one state to the other smooth? Or, is there a better way I could script a controllable curve? Apologies - I'm not a programmer.
Here's the code and I'll attach the file ..
on ChannelsUsed pCont do
(
pCont.usePosition = true
pCont.useScale = true
)
on Init pCont do
(
)
on Proceed pCont do
(
count = pCont.NumParticles()
factor = 10 for i in 1 to count do
(
pCont.particleIndex = i
dist = length(pCont.particlePosition-$Point001.pos)
if dist > 250 then
scaleMultiplier = dist/20
else
scaleMultiplier = dist/30
pCont.particleScale = scaleMultiplier
)
)
on Release pCont do
(
)