Cinema 4D Tutorial – Displacement Using Splines

Did you know you can use splines to create displacement?

Displaced using a Gradient and a Spline

Displaced using a Gradient and a Spline

Using the MoGraph Displace Deformer this is actually quite a simple thing.  First of all you need a mesh to displace, then make the Displace Deformer a child of the mesh.  Well, as it is a deformer, you could place it in the same level of hierarchy, in a null for instance, but you knew that already!  (Mine is in a hyperNURB object, but that isn’t necessary.)

You also need a spline of some kind.   This will work with parametric splines too.

Object Manager Hierarchy

Object Manager Hierarchy

Once you’ve set this up, then you need a shader or texture to displace.  Hold on…   I said you could displace using splines.  Well this is true, but you still need a shader or material to drive the displacement.  So the simplest thing to use is a pure white color shader.  So add a color shader to the Shader slot in the Displace Deformer, Shading Tab.  You could always use a different shader there later for some even more interesting results.

Displace Deformer Shading Tab

Displace Deformer Shading Tab

Now it will displace the whole mesh exactly the same.  You can adjust the Strength, Height, the Type of displacement and also the Direction in the Object Tab.  Still doesn’t look very interesting does it?

Displace Deformer Falloff Tab

Displace Deformer Object Tab

Here comes the fun part.  Switch to the Falloff tab.  Set the shape to Source.  When you do this, the interface will change and you will have a link field.  Drag and drop your spline into this link field.  So now the white shader is displacing the mesh, but the spline is controlling the falloff of the displacement.

Displace Deformer Falloff Tab

Displace Deformer Falloff Tab

So you can easily get results like this.

Displaced using HYPA spline

Displaced using HYPA spline

Try adjusting the sample detail for some interesting results.

Low Sample Detail

Low Sample Detail

You can also use a spline to adjust the shape of the falloff.

Adjusting the Attribute Manager Spline Shape

Adjusting the Attribute Manager Spline Shape

Plus you can animate all these parameters, and of course the spline or mesh too!

So really the results are limitless. Trying to achieve this using regular displacement with textures would surely be a much more complex and time consuming process.

Here’s my sample file for you to download and enjoy Have fun!

EDIT: The behaviour of this seems to be different if you are using r10.5, so here is a file that I made for 10.5 users that shows the functionality is still there. Although it seems to be slightly limited in comparison with r11.

Download the 10.5 file for this scene.


Cinema 4D Tutorial – Displacement Using Splines

Author: Tim

15 Comments

  1. qwang
    qwang On April 29, 2009 at 4:00 AM

    download link is wrong!
    http://www.hypatv.com/blog/downloads/displace_spline.zip

  2. Tim
    Tim On April 29, 2009 at 4:49 AM

    Thanks for pointing that out.

    It should be working now.

  3. Lapix
    Lapix On April 29, 2009 at 7:11 AM

    Ehi.. This is great, really nice one. thank you.

  4. H.G
    H.G On April 29, 2009 at 4:09 PM

    Great fun,thanks Tim!

  5. cbowyer
    cbowyer On April 29, 2009 at 5:50 PM

    Hi Tim

    I’m trying to duplicate this setup but I can’t get my file or your file to render as above. For me, having the min Y falloff value (leftmost point on the spline) at 0 eliminates the falloff altogether. I have to move the min point off the bottom to get any relief showing. None of the other points along the spline seems to have no effect on the falloff at all.

    Any thoughts? Something I have turned off?

    regards

  6. cbowyer
    cbowyer On April 30, 2009 at 7:36 AM

    Hi Tim

    Yes, same trouble with your file as well. Just tried it again to be sure. Running 10.506.

    regards

  7. Tim
    Tim On April 30, 2009 at 10:47 PM

    I checked in 10.5 and the behaviour is definitely different, it seems Maxon added functionality to this when r11 came out. However it still works with 10.5. If you right click on the spline in the AM and choose reset. Then fiddle with the scale and sample detail, you should see your spline create the displacement falloff.

    I’ve updated the post and added a 10.5 file that shows it working. Thanks for pointing that out and I hope the new file works for you now!

  8. cbowyer
    cbowyer On May 1, 2009 at 6:35 AM

    Yep, that did the trick alright! Thanks Tim.

  9. skibadee
    skibadee On May 3, 2009 at 9:54 AM

    great blog!

  10. sq
    sq On May 11, 2009 at 4:36 AM

    thx Tim

  11. Jedidiah Hurt
    Jedidiah Hurt On May 27, 2010 at 12:12 PM

    Hey Tim,

    Thanks for posting this. I was tearing my hair out trying to accomplish this with the Boole operator. This calculates sooo much faster.

    Is it possible to use this technique to displace with solid objects, rather than splines? I’m going for an engraved stone look… i.e. http://www.istockphoto.com/file_thumbview_approve/6869989/2/istockphoto_6869989-roman-numerals-engraved-in-textured-stone.jpg

  12. atlasyster
    atlasyster On June 12, 2010 at 9:35 AM

    Excellent tips. Thank you

  13. Lesak
    Lesak On October 2, 2013 at 3:04 AM

    Great one!

  14. YiannZ
    YiannZ On May 10, 2014 at 4:27 AM

    Great tip Tim! Thanks for sharing!

Leave a Reply