S-S
06-24-2007, 02:34 PM
Hi!
I created simple eye pupil rig. Eye pupil reacts to open / closed state of the eyelid. When eyelid is closed, or nearly closed, iris starts to open, and when eyelid opens, iris starts to close, until it is in it's neutral size. (it doesn't react to light yet...).
Iris size is not directly linked to lid position, since i want to have certain rate of opening / closing of iris. I don't want blink to create faster iris shape change and so on.
That's why i stored the "open" into custom attribute, and i read and write this value to / from this location in my script controller script.
Everything works just fine, but if i leave the viewport alone, and let the animation play for 10 minutes or so, 3ds max crashes and says "out of memory". I'm in max 9.
Seems like writing / reading causes this, since direct "wiring" without storing anything works just fine.
I also tried similar setup with appdata stored to object, and it causes the same crash. Any ideas? It's not a total disaster, but it would be nice to know if there is a better way to do this.
You can also check the video i made:
Eye pupil animation (http://www.cgmill.com/gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=3210)
code:
theVal = (getAppData $eye_ball 1) as float
(
-- Do something to values.... then put it back to appData
setAppData $eye_ball 1 (theVal as string)
)
I created simple eye pupil rig. Eye pupil reacts to open / closed state of the eyelid. When eyelid is closed, or nearly closed, iris starts to open, and when eyelid opens, iris starts to close, until it is in it's neutral size. (it doesn't react to light yet...).
Iris size is not directly linked to lid position, since i want to have certain rate of opening / closing of iris. I don't want blink to create faster iris shape change and so on.
That's why i stored the "open" into custom attribute, and i read and write this value to / from this location in my script controller script.
Everything works just fine, but if i leave the viewport alone, and let the animation play for 10 minutes or so, 3ds max crashes and says "out of memory". I'm in max 9.
Seems like writing / reading causes this, since direct "wiring" without storing anything works just fine.
I also tried similar setup with appdata stored to object, and it causes the same crash. Any ideas? It's not a total disaster, but it would be nice to know if there is a better way to do this.
You can also check the video i made:
Eye pupil animation (http://www.cgmill.com/gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=3210)
code:
theVal = (getAppData $eye_ball 1) as float
(
-- Do something to values.... then put it back to appData
setAppData $eye_ball 1 (theVal as string)
)
