WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Scaling Portions of a CAL3D Model (https://forum.worldviz.com/showthread.php?t=3990)

shivanangel 11-06-2011 04:03 PM

Scaling Portions of a CAL3D Model
 
3 Attachment(s)
Hello Vizard Support Staff,

I had a quick question.

I am attempting to induce a non-uniform scale on an Avatar I created in 3D Studio Max inside of Vizard.

I attempted to do the scaling as part of the animation in max, however I noticed that while the 'bones' appeared to shrink in size, the actual vertices had no scaling applied to them. The vertices simply bunch up in groups based on what bone they were apart of and moved on top of one another.
I am guessing the bones are remembering the translation they undergo due to scaling in max but not the true underlying scaling.

Is is possible to scale per bone to distort proportions via Max or in Vizard? I noticed there are no available methods for scaling a bone natively in Vizard 3.0 in the help file.

I have included an image of the desired effect in max, the initial start in Vizard and the the near end of the animation in Vizard.

Thank you,
George

Adam.Grey 07-25-2012 06:44 AM

I also want to do exactly this. I was unable to figure it out, but here's what I tried:

(assuming "male" is a cal3d avatar with a bone called "Bip01 Head")
Code:

import viz
import vizmat
viz.go()

viz.MainView.setPosition(0, 1.8, 1.0)
viz.MainView.setEuler(180, 0, 0)

headbone = male.getBone("Bip01 Head")
trans = vizmat.Transform()
trans.setScale(0, 0, 0)
headbone.unlock()
headbone.setMatrix(trans)

The head doesn't change at all.

my guess (and this is a wild guess) is that at some point in vizard's code they normalize the matrix.

sleiN13 07-26-2012 12:17 AM

You have to lock the bone before the transform is added, unlocking the bone will also force the avatar into the original position/size.

headbone = male.getBone("Bip01 Head")
headbone.lock()
trans = vizmat.Transform()
trans.setScale(0, 0, 0)
headbone.setMatrix(trans)

will probably do what you want, you do lose all animations on the headbone.


All times are GMT -7. The time now is 12:45 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC