Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Creating a data slider to control a spline wrap

From: CINEMA 4D Essentials 8: Character Rigging and Xpresso

Video: Creating a data slider to control a spline wrap

There are going to be times in your animation process where you're going to want to be able to control multiple objects, and you could use individual sets of key frames to control those multiple objects. But it's much better to have just one point of control. That's where Data Slider comes in. A Data Slider is a single point of control that can be used through Xpresso to control other objects. The first step in this process is going to be to create a null object that's going to hold our Data Slider. Let's go to the Primitives and add a null to the scene, and let's call this null, Sliders. Now you can put sliders on any object anywhere, but in this case, I want to make it really obvious where that slider is going to be, so it's easy for me to find later.

Creating a data slider to control a spline wrap

There are going to be times in your animation process where you're going to want to be able to control multiple objects, and you could use individual sets of key frames to control those multiple objects. But it's much better to have just one point of control. That's where Data Slider comes in. A Data Slider is a single point of control that can be used through Xpresso to control other objects. The first step in this process is going to be to create a null object that's going to hold our Data Slider. Let's go to the Primitives and add a null to the scene, and let's call this null, Sliders. Now you can put sliders on any object anywhere, but in this case, I want to make it really obvious where that slider is going to be, so it's easy for me to find later.

Now in CINEMA 4D terms, this slider is something called User Data. If you click on the null object, down in the Attribute Manager, you'll notice a little menu item called User Data. If we click on that, there is an Add User Data and Manage User Data. Essentially, there is very little difference between these fields. I normally go to Manage User Data. When I do that, that pops up the Manage User Data field. Now this is a big blank window, and what it's going to ask me to do is on the left-hand side is to add data. When I add data, it gives me the word Data over here on the left, and on the right-hand side are the attributes for that data.

So let's call this data something other than data. Let's call it Sliders. When I hit OK, you'll see that I now have a new User Data field over here on the right on the attributes for this null object. When I click on that, you can see there is a Sliders with a percentage. This percentage is the user data interface. Now that's not what we want to end up with. We want to have an actual Slider field instead of just a float field with a scrubber. Normally, I would not have hit OK right there, I would have modified this ahead of time. But I wanted you to see what the result was.

So let's go back to the User Data. We can get there two ways. We can go back to the User Data and tell it to Manage User Data, or we can right-click right on the Slider and then go to User Interface, and then we want to Edit Entry. When we edit entry, that pops us back into the Manage window and now we can see our Sliders interface over here. So the interface that we want to create is something called Float Slider. When we do that, you can see down here at the bottom of the window, this is an example of what the interface will look like. And the Default value is whatever the value will be when the object is at rest.

So we'll leave it at 0%. Down here in the field, we can change the units. We can make it be percentage, or real values, or degrees. We're going to leave it on Percent for now and the Step is going to be 1%. That's fine. You can actually change that to be tenths of a percent or in groups of 10%. The important thing is to put in a Step value that gives you enough control for the type of animation you're going to be doing. The limits for minimum and maximum are how much range the slider has. By default, the slider goes from 0% to 100%.

I could change this to 500%, and I'll tab over. Don't hit Return, otherwise that will be like hitting OK down here. You can see that now my slider goes all the way to 500%. If I change this to 100%, you can see that my slider maxes out at 100%. That's going to be fine for what we want to have here today. So let's click OK. And now, you can see that on our User Data field on the null, we now have a slider. This slider doesn't do anything yet though, and that's where Xpresso comes in. Now we want to use this slider to control the Offset parameter on this spline wrap.

We could set up a manual link with Xpresso to do that, but there's a really cool feature called Set Driven Keys. If I go back to my slider object, and right-click on the word Sliders here under the User Data, and I can go to XPressions and then Set Driver. Now what happens when I do that is that CINEMA 4D is now waiting for me to do another right-click, and it's asking, what do you want to use this driver to drive? So if I go to my spline wrap, and then right-click on the Offset, and go to XPressions and then do a Set Driven (Absolute), that Absolute reference means that no matter where I put the Xpresso tag, it's always going to point back to that same spline wrap object.

Now it still looks like nothing happened. But let's go to the Sliders null object, and adjust the value here on our slider. If we drag that to the right, you'll see that there goes the matrix object. Now I'm getting a weird redraw issue because of the screen recording software. So if I hit the letter A on the keyboard, you see my objects jump. Let's go ahead and animate the Sliders option. Let's drag that to the right, and then let's Ctrl+Click on that to set up key frame for that value at time 0. Then, let's drag forward in time, and you see that my screen reset itself back to the 0 percentage value.

Let's make that 100%, and let's Ctrl+Click to add another key frame. Now when we hit Play, you see my object passing through the sphere. Now I have an Xpresso link between the point on the spline and the sphere. If I take that big sphere and move it around, you'll see that my spline will redraw itself based on the position of that sphere, and now my objects will pass through that sphere at that location. So that's a really simple example of how to Use User data to control a particular parameter on an object.

In this case, we used the User Data to control a single parameter, but in the next movie, we'll use that User Data slider to control multiple parameters on different objects.

Show transcript

This video is part of

Image for CINEMA 4D Essentials 8: Character Rigging and Xpresso
CINEMA 4D Essentials 8: Character Rigging and Xpresso

12 video lessons · 4059 viewers

Rob Garrott
Author

 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed CINEMA 4D Essentials 8: Character Rigging and Xpresso.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.