Community
3ds Max Forum
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Pflow / data operator / Logarithmic math help

1 REPLY 1
Reply
Message 1 of 2
remainz
147 Views, 1 Reply

Pflow / data operator / Logarithmic math help

HI

Not sure where this should go on the forum.

 

I need to scale particles logarithmically . So that the small  particles stay small but the large ones increase more based on an object material .

 

I expect this is super basic but whats the best way to use logarithmic scale in a Pflow / data operator ? 

I would have thought it could be done in the function node but I cant see how

 

thanks

remi

1 REPLY 1
Message 2 of 2
remainz
in reply to: remainz

Answer myself.

This cannot be done in the data operator, even though its the obvious place for it.

But it can be done in a script operator after the data operator

 using this script

 

Pflow really needs updating!!!

 

on ChannelsUsed pCont do
(
--pCont.useTime = true
--pCont.useSpeed = true
pCont.useScale = true
)

on Init pCont do
(

)

on Proceed pCont do
(
count = pCont.NumParticles()

for i in 1 to count do
(
pCont.particleIndex = i
myz = pCont.particleScaleXYZ[3]
pCont.particleScaleXYZ = pCont.particleScaleXYZ * [1,1,ceil(pow 2 ((log10 (myz))/(log10 2)))/40 ]
--[1,1,ceil(pow 2 ((log10 (10-1))/(log10 2))) ]
)
)

on Release pCont do
(

)

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report