NewTek Discussions

NewTek Discussions (http://vbulletin.newtek.com/index.php)
-   LW - General Techniques, Tips & Tricks (http://vbulletin.newtek.com/forumdisplay.php?f=28)
-   -   How to Create Sliders to Control Multiple Objects... (http://vbulletin.newtek.com/showthread.php?t=13160)

NanoGator 11-01-2003 02:42 AM

How to Create Sliders to Control Multiple Objects...
 
How to Create Sliders to Control Multiple Objects...

Hi All, I recently wrote a tutorial on using Sliders to create mutipass layers in Lightwave. Unfortunately, when I wrote that tut, I had difficulty finding a tutorial on how to set up Sliders to begin with. I use CGTalk's search engine a lot to find answers to Lightwave problems, so I thought I'd take what I have written here and supply it with the hopes of other people yearning to learn Sliders would find the information they need.

Enjoy :)
[list=1] [*] Start with a new scene, create a null object.
[*] Go to the properties panel on it.
[*] Go to 'Add Custom Object' and pull down 'Sliders'.
[*] Double Click on the Sliders plugin that just popped up, you'll see the interface for it.
[*] Where it says 'Null' on the left side, click it so that it unrolls the properties of Null. You should see 'Position.X, Position.Y', etc. These are envelopable objects. That means you can create an enveleope you can modify in graph editor and keyframe the number there. In this case, select Rotation.H. THat means we're going to alter the heading of Null.
[*] With Rotation.H selected, click on 'Add Channel in the mid-left part of the panel there. On the right, under Selected Channels, you should see "Null:Rotation.H".
[*] On the bottom, you'll see 'Range Min:' and "Range:Max'. It defaults to 0 and 360, presumably because the plugin knows that when you rotate an object, 0-360 is a typical range. Change Range Min to -45 and Range Max to 45. Can you imagine what'll happen here?
[*] Hit 'Continue', this'll take you back to layout. Close the properties Window.
[*] In all of your viewports, you should see a little panel floating in the middle that reads "Null", followed by "Null:Rotation.H". Try to grab it and slide it.
[*] Oops! Nothing happened! Newtek made this plugin so that you had to have sliders enabled in order to interact with them. Some people think this is a cruel speedbump to productivity, I personally think it's a safety feature. It's a perspective thing, mostly. You can undo an accidental move, but you cannot undo a Slider change. (Not that there isn't a good reason for that to be the case, but I'm not here to debate about Lightwave's API.)
[*] Select the items tab, on the left side you should see a button labeled "Sliders'. Click it, it'll turn it on, then grab the slider and move it left and right. Notice it starts at -45 and ends at 45? That's because we plugged in those values as the range. [/list=1]

Okay, so that's just the real basic setup. In the sample scene, I made it slightly more complex. I used a feature called "Master Channel'. Here's why: When you create a slider, you can only modify ONE channel with it. But I wanted that one slider to control a bunch of surfaces at one time. I didn't want to craete a slider for each surface, so instead I created one channel that the surfaces could be tied to. Confused? I was when I started doing this.
[list=1] [*] Go into Graph Editor. See where it says 'Channels' in the lower left? Scroll up and down there, and you can see all of the objects in the scene, plus their controllable properties.
[*] Close Graph Editor, then go into Scene/Master Plugins. Add a plugin called "Master Channel'.
[*] Double Click on 'Channel: (none)" and set the Channel name to Hamdingers. Change the type from Number to angle. (The reason I set it to angle is we'll be changing the rotation of NULL with it.)
[*] Leave the Master Plugins panel. Go back to Graph Editor. Scroll down in the lower left, and soon you'll spot MC (short for Master Channel), unroll it and you'll see Hamdingers.
[*] What comes next is a little tricky. Sorry. But trust me, it's easy to get used to. Click on Hamdingers in the lower left, and drag it up to the Channels window in the upper left. It'll materialize below the other channels you're viewing. So what is that window? Well, if you took any old scene and had every channel open, you'd have a mess of curves there. So to narrow the scope, you only see the channels you want to see in that window. In that case, we just want MC.Hamdingers. But if we wanted to see the rotation of a light, then we'd drag that channel up there too.
[*] Create a few keyframes there. I made mine look a little like a sine wave, but here just do whatever ya like. The point is just to prove that it works.
[*] Okay, now we're going to create an expression. This is *very* easy, but it is sensitive to typos. Don't worry, once you've learned that its case sensitive, you'll be okay. In the lower left window, select the Null object, and Rotation.P. Drag that up in to the upper left window. Then, click on it to highlight it.
[*] Click on the Expressions tab, and hit New. Important note: EVERY time you create a new expression, hit the new button first. If you have an existing expression and you type in a new name for it, what's really happening is you're just renaming the old one. I made this mistake a MILLION times before realizing that I was creating my own problem. I swear, I thought expressions were really buggy when I first used them.
[*] See where it says "Expr 2"? That's a default name. Change it to 'Rotation Expression Test'. (Make sure to hit enter.) Now we're setting the name of this expression so it can be used elsewhere. Wanna see? Click on the green Expressions tab kind of in the middle of the lower right Window. You'll see Rotation Expression Test. So what can you do with that? Well, when you create an expression, it remembers it, and you can select it from a list and apply it to any object quickly. That's one thing I really dig about Lightwave, it's easy to do batch operations like this.
[*] See where it says 'Value'? Value means "Whatever the number is that has been keyframed for this channel." The default expression it gave you says "do whatever it was doing already". So, if you had a keyframe that said "On frame 0 start at 0, and on frame 10 go to 180", then Null would rotate from 0 to 180 in 10 frames. If you were to set that expression to Value * 2 and repeat the experiment, then on frame 0 it'd be at 0, and on frame 10 it'd be on 360. However, that's not what we want this expression to do. What we want it to do is say "Whatever MC.Hamdingers is set to, I want to do that." Can you kind of see what's happening now? When MC.Hamdingers does something, any channel using this expression will mimick it. We could have 1,000 null objects rotating just because MC.Hamdingers is moving.
[*] Take that Value field and delete 'Value' from it. Then, right click on MC.Hamdingers in the upper left window and hit 'Append to expression'. See what it did to the Value field? It wrote [MC.Hamdingers] in it. Why are those brackets there? Those brackets tell Lightwave "This is a channel, not a variable or math equestion". No problemo. Get used to using that feature, it'll save you LOTS of headache. Lightwave expressions are VERY sensitive to both typos and case. If you use this feature, you avoid it completely. If you see >>> <<< in your expression, it means that Lightwave didnt' understand what you wrote.
[*] Okay, we've created an expression. Let's apply it! Click on Null.Rotation.P in the upper left window, that'll highlight it. Then, in the lower left window, click on Apply. Notice that Null.Rotation.P in the upper left window now has a little dot next to it. That means an expression has been applied.
[*] Just for fun, select the Camera in the lower left window, and pull 'rotation.p' up to the upper left window and apply the expression to it as well.
[*] Close Graph Editor, and make sure you're in perspective view with both the camera and the null object in view. Play the animation and you'll both of them are headbanging. Cool, eh? Whenever you modify MC.Hamdingers, it'll change BOTH of those items. Getting a little excited? I did when I first tried this. You can automate so much stuff now!
[*] Okay, so the final step is to tie a Slider to the MC.Hamdingers. Select the Null object in Layout, go to Item Properties, and double click the sliders plugin.
[*] Scroll down in the left window and you'll see MC. Unroll that and you'll see Hamdingers. Select it so it's highlighted and hit 'Add Channel'. From there, just go ahead and hit Continue and go back to Layout.
[*] Play the video again. You'll see the slider moving with the null and the camera! Now, while remembering that Sliders have to be on, grab the hamdingers slider and move it back and forth. Now both the camera and null are moving! The more items you add that expression to, the more are under control by that one slider.[/list=1]

I hope this helps. If you're looking for an interesting use for sliders, then please check out my multi-layered rendering tutorial here.

If any of you have tips and tricks for Sliders, please post them here!

A Mejias 12-20-2003 10:45 AM

Great tips!

Thanks!

Tom Wood 12-20-2003 11:44 AM

Hey thanks!

Quick question: I was using the Follower modifier in a similar way to how you set up that expression. But I'm also using MotionMixer to add several motions quickly to a simple character scene. What I found was that the Follower modifier over-rode motions even when it wasn't part of the motion itself.

For example, I used Follower to control two eyelids so they followed the motion of a null called EYELIDS. Rotate EYELIDS and both of the eyelids rotated. But if I made a motion with a wink in it, using one eyelid, that motion was erased by the Follower for EYELIDS. I could turn it off, but that meant I couldn't have both a blink and a wink in the same set of motions in MotionMixer.

At present I've -parented- the eyelids to BLINK for a simple blink, and also control each one with a seperate slider too and that works.

Whew, okay, not so quick question. So my question is, do you know if Expressions will circumvent this and let me use both types of motions in MotionMixer?

TW

NanoGator 12-22-2003 08:53 PM

Anybody know the answer? I haven't used Motion Mixer to speak of yet.

{G} 01-30-2005 05:06 AM

Ahhhh, thats how you enable the sliders. What a sweet tip Nano

Thanks v much :D

NanoGator 01-30-2005 04:40 PM

Quote:

Originally Posted by {G}
Ahhhh, thats how you enable the sliders. What a sweet tip Nano

Thanks v much :D

No prob. ;)

andromeda_girl 02-26-2005 06:01 PM

re: creating sliders
 
is this a LWv8 thing or can it be done in LWv7?

i do not get the slider option in the object properties/create custom object panel.

thanks,
~A.

Avebeno 03-15-2005 01:50 AM

Thanks! That's pretty cool.

Problem: I can't seem to make a keyframe, unless I have auto keyframe turned on.
:confused:

Rory_L 03-15-2005 07:46 AM

Quote:

Originally Posted by andromeda_girl
is this a LWv8 thing or can it be done in LWv7?

i do not get the slider option in the object properties/create custom object panel.

thanks,
~A.

Sliders are part of the free 7.5 update. You might have to add them to Layout manually after installation.

Cheers,

R

andromeda_girl 03-15-2005 12:19 PM

sliders
 
Quote:

Originally Posted by Rory_L
Sliders are part of the free 7.5 update. You might have to add them to Layout manually after installation.

Cheers,

R

is there any more information you could include on that?

if it is a possibility then there has to be a way to access it or activate it, right?
this is sort of the crux of my dilemma here.

DMarkwick 03-15-2005 02:37 PM

Excellent little write-up there, thanks for taking the time :)

Sliders is one of those things that I always think I should use, but just have never gotten around to actually hunting down how to put them to actual genuine good use. Now I have no excuse. :D

toby 03-15-2005 02:59 PM

Try this andromeda girl -

Go to Edit plug-ins and make sure you have Sliders, and put a button in your menu.

Add a null

in properties/geometry/add custom object add 'Sliders', then double click it

A panel opens, select a channel and hit 'add channel' -then 'Continue'

A Slider will show up in your viewport. To move the slider off to the side of the viewport you must have the 'Sliders' button on your menu enabled, then grab the little diamond to move it over. When you scrub the slider it will create a keyframe.

NanoGator 03-24-2005 11:28 AM

Quote:

Originally Posted by andromeda_girl
is there any more information you could include on that?

if it is a possibility then there has to be a way to access it or activate it, right?
this is sort of the crux of my dilemma here.

Didja get this question answerred? Sorry I'm late in replying...


All times are GMT -5. The time now is 10:51 AM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright 2000-2007, NewTek