Displacement Using Splines

Posted in Cinema4D MoGraph on April 29th, 2009 by Tim

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.

Tags: , , , , ,

Converting HDR Images to Spherical Maps

Posted in Cinema4D Misc on April 16th, 2009 by Tim

We all know that HDR Images produce superior reflections when used as environment maps.

However a lot of HDRIs are supplied in formats that are not specifically shaped to be optimal for spherical mapping.

They often are created using the popular probe method, or alternatively, you might have some that have been generated using the cross method.

You can see an example of such formats below.

HDRI Cross Format

HDRI Probe Format

Well luckily for us, Cinema4D comes with some tools to take these formats and convert them into the more usable spherical map.

If you go to the Render Menu and scroll down, you’ll see two entries.

Convert HDR Cross…
Convert HDR Probe…

Cinema4D Render Menu

Cinema4D Render Menu

Well it is really as simple as selecting the command, then choosing the appropriate HDRI.

Cinema will then perform the conversion and resave the HDRI in the same directory.  The Filename will have the addition of _con to show you that this is the converted file.

The Converted HDRI

The Converted HDRI

Happy HDRI-ing!

Tags: , , ,