Turn_To_gPoly : modifier
Turn_To_gPoly - superclass: modifier; super-superclass:MAXWrapper - 0:0 - classID: #(103372589, 1504512992)
This modifier converts a geometry object to gPoly class on the modifier stack.
Available in 3ds Max 2013 and higher.
Constructors:
Turn_To_gPoly...
TurnTogPoly...
Properties:
No Properties exposed.
The following script creates a simple scene with a moving and deforming teapot primitive.
The playback time is measured without a gPoly conversion, then a Turn_To_gPoly Modifier
is inserted between the base object and the Bend modifier and the playback time is
measured again. The script prints the time and FPS of both runs and the speed up ratio
to the Listener.
GPOLY BENCHMARK
|
(
resetMaxFile #noprompt
theObj = teapot segs:64
theBend = bend()
addModifier theObj theBend
with animate on (
at time 50 theObj.pos = [50,0,10]
at time 100 (
theObj.pos = [100,0,0]
theObj.rotation = eulerangles 90 0 0
theBend.angle = 90
)
)
theStart = animationrange.start
theEnd = animationrange.end
theLength = theEnd - theStart + 1
st = timestamp()
for i = theStart to theEnd do sliderTime = i
theTime = ((timestamp()-st)/1000.0)
format "Teapot Primitive: % seconds (% FPS).\n" theTime (theLength/theTime)
addModifier theObj (turnTogPoly()) before:1
st = timestamp()
for i = animationrange.start to animationrange.end do sliderTime = i
theTime2 = ((timestamp()-st)/1000.0)
format "Teapot gPoly: % seconds (% FPS).\n" theTime2 (theLength/theTime2)
format "gPoly Speed Up: %x\n" (theTime/theTime2)
)
|
RESULTS
|
Teapot Primitive: 29.074 seconds (3.4375f FPS).
Teapot gPoly: 12.769 seconds (7.83125f FPS).
gPoly Speed Up: 2.27692x
OK
|