Hello , everyone.
I have some problem here.
When I create an animation in 3DsMax.
I have 5 models , body , hair , shoes , sword and eyes.
And I already merge them together (not group them) before create animation.
When I run an application. I just notice that which model isn’t render on the screen at the first frame of an animation.
It will not be render until this animation is finnish ( even through it become on the screen ).
For example :
I play animation ‘attack’ and at the first frame my shoes are out of screen. when my actor is jump (one part of ‘attack’ animation)
I see the shoes disappear…
(This case will happen if I didn’t move the camera during animation is play)
It must be like this one :
from pandac.PandaModules import Point3
from direct.actor.Actor import Actor
For explanation, read David’s post here :
All you need to do is use setFinal=1, it’s 0 by default.
From Actor.py :
# If setFinal is true, the Actor will set its top bounding
# volume to be the "final" bounding volume: the bounding
# volumes below the top volume will not be tested. If a
# cull test passes the top bounding volume, the whole
# Actor is rendered.
# We do this partly because an Actor is likely to be a
# fairly small object relative to the scene, and is pretty
# much going to be all onscreen or all offscreen anyway;
# and partly because of the Character bug that doesn't
# update the bounding volume for pieces that animate away
# from their original position. It's disturbing to see
# someone's hands disappear; better to cull the whole
# object or none of it.
Sorry, panda actor is not enough for example. A better example is the Tron actor (glow filter sample), he really gets out of his bounding volume 100+ units towards Y-.
If you only use setFinal=1, that won’t help, since Tron moves quite far away from his origin. But using infinite bounding volume sounds too expensive if you implement it to most actors. It means you render them all, even when they’re not visible to the camera. That wastes too much precious frametime foolishly.
An easy trick is to create 1 vertex and parent it to your actor. Put that vertex on top of the actor’s head level when he is at the highest jump. That way you’ll get a finite bounds but still wraps the actor efficiently.
I tried that with Tron, here is my mod :
in toggleDisplay :
and add setFinal=1 to Actor constructor.
You need to import LineSegs, and on runtime, press ENTER to see how it works.
For yours, you should do it in Max. I don’t know Max much, I hate Max.
Thank you very much Ynjh_jo!!
It’s works very well.