Oct 13, 2007

Modeling a pipe using hyperNURBS

This tutorial is a day late, but that’s because I spent yesterday researching and experimenting myself so as to provide you with a top quality tutorial. The first part of today’s tutorial will explain how to model a pipe in Cinema 4D and weight it using hyperNURBS with the second part describing how to create an amazing looking translucent glass texture your sure to love. The second half of this tutorial is also an English translation of this German tutorial viewable here.

Extrude box

Firstly open up cinema 4D and hit the F5 key so as to bring up the multi angle view then create a new primitive cube and make it editable by pressing C. Next select the choose polygons button and select the top face of the now editable cube, right click and select extrude after which then press and hold the left mouse button anywhere within the selection and drag the mouse right (shown step by step above). Alternatively you can just enter a number into the offset value in the tools browser (shown in image below). For this tutorial I extruded each of the faces of the cube however to give a smooth transition for each bend you have to extrude a short way and then a longer way as shown in the image below.

Example and extrude preferences

Once you have a model looking something like the above image, create a new hyperNURBS object (step one in figure below) and place the modified cube as a child of it (step two in figure below). This will result in a smoother version of the model before.

hyperNURBS

Now what we need to do is place a weighting on the ends of the pipes so as to flatten them. Weighting as a way of telling the hyperNURBS where to apply its modifications. To apply this weighting you need to select the edges of the modified cube using the edge selection tool (numbered one in the below image), then to enable the hyperNURBS attribute you need to select the pointer tool (numbered two in the below image). When selecting the edges of the face you might find it easier to press shift while selecting and then if you select the wrong edge press CTRL and select the wrongly selected edge to deselect it (method numbered three below).

Select edges for weighting

Once you have selected all four edges of the face, you should be able to see the hyperNURBS preferences in the pointers preference panel (shown below) set the strength to 100% and press set, then repeat for all the other faces so that you have four pipes extruding out from a central point.

hyperNURBS pointer preferences and result

Now we have half finished the model as well as learnt in detail how to use the hyperNURBS function. As the second half of this tutorial focuses on creating a translucent glassy texture we need to now hollow out our model so that the texture will work. To do so copy and paste the hyperNURBS object and rename the two inside and outside respectively ready for using a Boole for the hollowing. The material I am going to later show you how to make works best when the walls of the container are 1m thick or less so the inside object will need to be precisely resized so that it is within this parameter.

Extrude the inside objects edges

Before we begin with resizing the inside object we need to first extrude its pipes so that when resized and booled they extend out of the outside object thus carving out the pipes inside completely. So as shown in the above image extrude each of the faces of the inside object. Once done select the inside cube object in the object browser then the polygon select tool and press CTRL + A to select all polygons in the inside cube (as shown below as step 3), then right click and select Normal Scale (step 4 below) and enter 99% into its preferences and press enter (step 5 below).

Steps for resizing the inside.

This will result in the shell being 99% the width of the model which is just what we want, next place the inside and outside objects into a Boole in the correct order so that you have a hollow pipe structure as shown below.

Final Model finished ready for texture.

Before I begin with showing you how to create this texture, I must first begin with explaining a little how it works. This texture uses Cinema4D’s subsurface scattering shader which takes a light input from a light within the scene and uses it to manipulate the luminescence of the material absorbing the light. This makes it a most excellent shader for producing glass materials which respond realistically when lit from the inside such as a glass lighting fixture. So the first thing to do before creating the new material is to create the light source which its going to reacting to. When you create the new light object it should automatically be placed in the centre of your model, unless you have moved the model around from its original position, just make sure its near enough centre if you have. Next go to the materials browser and create a new material and apply it to the Boole containing our model.

Step by step selecting subsurface scattering

Within the new material deselect the colour and specular attributes and select the luminance one, within the luminance preferences click the arrow button for the texture preference and select Subsurface scattering (as shown step by step in the above image). When rendered your model will now look like the below image, as you can see the material is reacting to the light, absorbing it and emitting it again, while luminescence depends upon the thickness of the walls.

Example render of defaults with subsurface scattering

We now need to customise the material to the needs of our model as its default settings wont take into consideration our models maximum thickness amongst other things. Therefore, click on the button now labled Subsurface scattering and enter the below settings, you can choose any colour here (step one in below image) however if you like the orange shown here then its RBG values are R255 G182 B0.

Subsurface Scattering prferecnces.

Next select specular colour and give it a slightly lighter colour than the one you chose before and then select Specular and enter the settings shown below.

Specular Preferences

Once rendered you should have something which looks like the below figure as you can see the walls where all the pipes connect are a little too thin this can be remidied by simply resizing the inside object to say 95% of it original size. Also as this is a low polygon model the render will look a little blocky, you can play around and experiment with things to change this.

Final Render

I hope that this tutorial has helped you in some way, if you have any questions or comments then feel free to post them using the form below.

Original German Tutorial of which this is a partial translation of viewable here.

No comments: