Join Rob Garrott for an in-depth discussion in this video 029 Working with XRefs to simplify your workflow, part of Design in Motion.
- View Offline
Hi! Rob Garrott here and welcome to Design in Motion; the weekly series where we explore important fundamentals in the world of motion graphics. Today we are going to talk about something called an XRef in CINEMA 4D. Working flexibly and efficiently is really the only way to get your motion graphics projects done on time and still be able to react to client changes. Recently, I had to create a scene with race cars chasing through a cityscape. About halfway through the project, the director decided that he wanted to have different cars in the scene. XRefs saved my life.
They helped me and they can help you too. An XRef is a special object in CINEMA 4D that points at an external C4D scene file. What that allows you to do is to keep that scene file updated, and then any place that XRef uses it, gets automatically updated as well, and makes a very flexible workflow. Let me show you what that means. I'm going to go to the Create menu down to the XRef submenu and there is an Add XRef command but I don't like to do that, I prefer to add it manually. So I am going to add in an XRef. This red icon here indicates that the XRef has no reference to it.
So under the Object Properties for the XRef, I am going to tell it to look at a scene file, and that's this Reference field. So I'll click on the Load Scene File button and then I'll navigate to white sedan. If I open the white sedan, I now have this white sedan here, and it looks like everything is a regular object in CINEMA 4D except that this XRef points back at that white sedan. If I click on the XRef and go to the Object Properties and hit Open for Edit, it's going to open up that white sedan model.
If I make a change to this white sedan, let's say I will add a cube to the scene, and I'll put that cube right on top of the car. There we go! Now there is a big block sitting on top of my car. I am going to save, Command+S, and if I switch back over to my Untitled document that I was just working out of, it looks like nothing has changed here. But if I click the Reload button, look at that, the Reload button loaded in that change I made in the scene. If I go back to the scene and delete the cube, go back to the white sedan, and select the cube and delete it, and then save, Command+S or Ctrl+S on the PC.
I'll go back to my Untitled document and reload it again. That cube disappears. So any changes I make in that scene file get updated wherever I am using the XRef. So let's take a look at that in a practical application. So I've got a car chase here and let me just rewind back to 0 and hit play. Let's bring the Perspective view full-screen. When I hit play on this, I've got a really cool looking car chase here. Only problem is, is that the director has now told me that instead of two white sedans, they want a red hatchback being chased by a green van.
So I have got to swap the cars out. Well, the XRef process makes that really quick and easy. The way I have built my hierarchy here is that I have a dummy car object that's being animated along the spline, and underneath that is a second null object that is controlling the direction that car is facing and then under that, I've got my XRef. Now that may seem excessive for a parenting arrangement, but that means that I can move this XRef, or swap it out, and not affect any of the keyframes because the only objects that have keyframes on them are the car 1 steer, or the car 2 steer, and then the Align to Spline tags. Those are the only places that have keyframes.
That means I can move this around and it won't affect my animation or I can swap it out entirely and my animation will not change. That's the flexible part. So let's change the first car to the red hatchback that the director asked for. So I am going to go to the XRef, select the Load Image button, and navigate to the Desktop to my Xrefs folder and I will grab the red hatchback, and then hit Open. It's going to ask me, are you sure you want to update it? Yes I do. When I do that, you can see now that's changed to a red hatchback. My animation is still valid. There goes the red hatchback.
I kind of like that one. Now, the second car needs to be a green van. So let's find the XRef for the second car. That's in this hierarchy right here. When I select this, and I click the Load Scene file button, I will navigate to my Desktop to my Xrefs folder, and I will grab the green van out of there. When I hit Open, I tell it, Yes, I want to update that green van, and boom! There is the green van. I'll deselect my objects by clicking over in the Object Manager. Now when I hit Play, I've got the same animation with two different cars.
That's exactly what the director wanted and it took me no time at all because I used XRefs. XRefs truly are a game changer when it comes to having a flexible workflow. For more on working with CINEMA 4D, check out the CINEMA 4D section of lynda.com. That's it for this edition of Design in Motion. Keep it moving and I will see you next time.
- Communicating emotion using color correction
- Using expressions to control animation
- Rendering type in a seamless environment
- Doing more with less in the After Effects render queue
- Creating bouncing animated type using dynamics
- Creating realism with Global illumination
- Working with Xrefs to simplify the workflow