Switching between morph targets w/slider

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  01 January 2013
Question Switching between morph targets w/slider

Example file: http://www.speedyshare.com/sgQmC/morph-slider.max (3ds max 2012)

I'm not sure what I'm asking is possible, but if it is, I would be happy if someone could guide me.

I have an object (Box001) with a morpher on it. This morpher has 5 morph targets. I also have a slider that goes from value 0 to 5.

I would like to be able to use the slider to switch between morph targets for Box001.

For instance, when the slider is set to:
0.0 - all morph targets should be set to 0.
1.0 - the 1st morph target should be set to 100, while the rest should be set to 0.
2.0 - the 2nd morph target should be set to 100, while the rest should be set to 0.
3.0 - the 3rd morph target should be set to 100, while the rest should be set to 0.
4.0 - the 4th morph target should be set to 100, while the rest should be set to 0.
5.0 - the 5th morph target should be set to 100, while the rest should be set to 0.

If this is possible, how could I execute this?
 
  01 January 2013
Use reaction manager.
The value of the slider is the master and the morphs the slaves.Then you can create states.
Go to animation tab and open reaction manager.
Attached Files
File Type: zip Box_morph.zip (17.6 KB, 6 views)
 
  01 January 2013
You could also just wire each target to the slider and the expression would look something like..

If theSlider==3 then 100 else 0

That line would work for the third target. This would be faster an less error probe then reaction manager.
__________________
Paul Neale
http://paulneale.com
 
  01 January 2013
Thank you both for replying!

chris_lwgr, I wasn unable to load your file. Is it possible that that you made it with Max 2013? I'm on 2012.

PEN, I entered the expression exactly as you wrote it. I'm not getting any errors, but they object isn't morph. Am I doing something wrong? I do not have much experience with expressions. Here is my latest file: http://www.speedyshare.com/v5MYB/morph-slider2.zip
 
  01 January 2013
Try this.It's for 2012
Attached Files
File Type: zip Box_morph.zip (19.4 KB, 3 views)
 
  01 January 2013
And your scene ready to test.
Attached Files
File Type: zip morph_slider2.zip (31.2 KB, 3 views)
 
  01 January 2013
For the wiring try to change theSlider to If value==1 then 100 else 0
 
  01 January 2013
Hey chris_lwgr, that works! Both solutions work, but I've decided to go with the wiring, since its easier to set up.

One more question if I may, would you know how I could hide/unhide an object using a slider value? I'm not talking about just animating the visibility track, I mean hide it in the viewport as well.

For example:
If the value is 1, only object one is visible
If the value is 2, only object two is visible
etc.

Either way, thanks a bunch!!
 
  01 January 2013
Originally Posted by AdamGreiskle: Thank you both for replying!

chris_lwgr, I wasn unable to load your file. Is it possible that that you made it with Max 2013? I'm on 2012.

PEN, I entered the expression exactly as you wrote it. I'm not getting any errors, but they object isn't morph. Am I doing something wrong? I do not have much experience with expressions. Here is my latest file: http://www.speedyshare.com/v5MYB/morph-slider2.zip


Where it says "theSlider" that will have to be the name of the slider that you have wired to.
__________________
Paul Neale
http://paulneale.com
 
  01 January 2013
Originally Posted by AdamGreiskle: Hey chris_lwgr, that works! Both solutions work, but I've decided to go with the wiring, since its easier to set up.

One more question if I may, would you know how I could hide/unhide an object using a slider value? I'm not talking about just animating the visibility track, I mean hide it in the viewport as well.

For example:
If the value is 1, only object one is visible
If the value is 2, only object two is visible
etc.

Either way, thanks a bunch!!


This would really need to be done with a custom written custom attribute so that you can call the hide unhide commands as the slider changes values. Probably other hacks but that is the one that I would use.
__________________
Paul Neale
http://paulneale.com
 
  01 January 2013
Thumbs up

Awesome! Thank you for the replies fellas'.

I experimented with both reaction manager and the wire editor and ended up going with the wire editor.

Much appreciated!
 
  01 January 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share 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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 03:30 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.