Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / maths for bezier-like ease in/out
  RSS 2.0 ATOM  

maths for bezier-like ease in/out
Rate this thread
 
42256
 
Permlink of this thread  
avatar
  • digikoku
  • Posted: 21 April 2010 01:54 AM
  • Total Posts: 159
  • Joined: 23 August 2006 03:47 AM

Hi
I’m trying to scale a Particle Flow system using a script operator. The particles scale depending on the camera z position. I haven’t a clue when it comes to the maths. What I’d like is a bezier-like transition, but my script is linear. How can I give it an ease out and ease in close to the two values?

Thanks
Mark

on ChannelsUsed pCont do
(
  pCont
.useScale true

)

on Init pCont 
do 
(
 
)

on Proceed pCont 
do 
(
 scaleMultiplier 
0.0
 count 
pCont.NumParticles()
 
for i in 1 to count do
 
(
 pCont
.particleIndex i
 
if $camDummy.pos.50 then
 ( 
 
if $camDummy.pos.30 then
 ( 
 scaleMultiplier 
0.6
 pCont
.particleScale scaleMultiplier
 )
 
else
 
scaleMultiplier 1*($camDummy.pos.z/50)
 pCont
.particleScale scaleMultiplier
 )
 
else pCont.particleScale 1
 )
)

on Release pCont 
do 
(
 
)


Replies: 0
avatar

Yahoo UI API has some well-commented JavaScript code that does easing math. That should be easy enough to translate to MS.

It was near the top of a Google search for “animation mathematics ease"…

-Jeff



Max/Composite 2012 (subscription)
Win7-64pro, Intel i7-hex on SuperMicro mobo, 12 GB RAM
nVidia Quadro 5000, render farmette on BB2012

Replies: 1
/userdata/avatar/avatar_14884.gif

Some maxscript ready ease functions can be found at CGTalk, here.

-Eric

Author: PiXeL_MoNKeY

Replied: 26 April 2010 06:18 AM  
avatar
  • digikoku
  • Posted: 22 April 2010 02:27 AM

Thanks. That looks very useful.

Mark



Replies: 0