WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-30-2014, 02:01 PM
shivanangel shivanangel is offline
Member
 
Join Date: Feb 2006
Location: New Jersey
Posts: 180
Question Complex Hierarchical Structures

Hi,

I'm creating a series of canned animations in Vizard using your vizacts class to control mechanical equipment.

I'm getting a bit confused when it comes to what is shown me in the vizard inspector vs. what I am actually altering in my vizard code.

For instance, take the image attached ( yes I am using Vizard 5 but I assume nothign changes with how scene graphs hierarchies function I felt it more pertinent to throw this in Vizard 4's forum).

I have watched your video tutorial, however it does not cover hierarchies with more than 1 parented object, which is what I am dealing with.

I have a blue box with a door, latch and handle, each parented (linked) in Max with their pivots placed where I want their rotations to be performed. And I have reset the xForm many times.

When I view this in the inspector, I can see the transform node labeled 'BlueMLabOven_LabHandle' and when I select the transform I am able to pivot about the expected location and the child comes along for the ride as I'd expect.

Same thing with the door labeled 'BlueMLabOven_Door', when I rotate about the transform in the inspector all the child components come along and the pivot is about the correct location.

When I move into Vizard... things don't act as friendly as in the inspector.
I load my model and extract the child objects I want to modify:

Code:
self.oven = vizfx.addChild('BlueMLabOven.OSGB')
self.door = self.oven.getChild('BlueMLabOven_Door')
self.latch = self.oven.getChild('BlueMLabOven_DoorHandle')
I define a series of sequences ... but here is the issue.
I don't want to rotate the geode, since the hierarchy doesn't work if I do that.
I want to rotate using the transform so that all the child objects come along for the ride.

How do I do this in Vizard? So far all of my transforms seem to only rotate around the parent system when I set up the following:

Code:
open_door = vizact.spinTo( euler = [ door_angle, 0, 0], time = rotate_door_time, interpolate = vizact.easeInOutCubic ,mode = viz.ABS_LOCAL )
close_door = vizact.spinTo( euler = [ -door_angle, 0, 0], time = rotate_door_time, interpolate = vizact.easeInOutCubic ,mode = viz.ABS_LOCAL )
		
open_latch = vizact.spinTo( euler = [latch_angle, 0,  0], time = unlatch_time, interpolate = vizact.easeInOut, mode = viz.ABS_LOCAL )
close_latch = vizact.spinTo( euler = [-latch_angle, 0, 0], time = unlatch_time, interpolate = vizact.easeInOut, mode = viz.ABS_LOCAL )
Thank you,
George
Attached Thumbnails
Click image for larger version

Name:	InspectorHelp.png
Views:	553
Size:	153.8 KB
ID:	642  
Reply With Quote
  #2  
Old 05-30-2014, 03:04 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Calling node.getChild() will insert a transform above the specified sub-node. From the documentation:
Quote:
This command will slightly modify the underlying scene graph of the node by inserting a transform above the specified child node.
So all transformation will then be applied to the newly inserted transform.

In Vizard 5 you can use the node.getTransform() command to get a handle to the specified sub-transform node. Transforming this object should provide similar behavior to transforming the node in Inspector.
Reply With Quote
  #3  
Old 05-31-2014, 10:46 AM
shivanangel shivanangel is offline
Member
 
Join Date: Feb 2006
Location: New Jersey
Posts: 180
Great, thank you.
Just for kicks, I'm guessing there is no easy way to do this in Vizard 4?
I seem to remember at one point many years ago putting the parent's pivot where I wanted the child to pivot from to get this to work... but it only works when you have one child per object.
Reply With Quote
Reply

Tags
3dsmax, hierarchy

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
hierarchical models / physic shapes problem in Viz4 Andy Vizard 2 11-22-2011 01:56 AM
Performance issue in complex scenes Feuereissen Vizard 1 08-12-2011 01:47 PM
Getting Complex Character Rigs in Vizard shivanangel Vizard 2 01-04-2007 07:57 PM
hierarchical structure Zafer Vizard 5 05-10-2004 02:05 PM


All times are GMT -7. The time now is 06:32 AM.


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