Showing posts with label Cycles. Show all posts
Showing posts with label Cycles. Show all posts

Friday, May 23, 2014

Adding Nodes - Node Pack

There are a number of custom nodes that are developed out in the community that can be used to simplify your life, or add a functionality you never had before.  One example is this NodePack by BWIDE:  https://bwide.wordpress.com/node-groups/bwide-nodepack-for-blender/

Sunday, October 6, 2013

Ceramic in Cycles

A quick entry on how to create a simple ceramic material like the one shown below.


Node setup is a simple combination of a Diffuse and Glossy, with the Mix Shader Fac biased toward the Diffuse.  The effect looks most convincing when there is a distinct light source, as opposed to the scene being lit by a texture.

Note also that the Roughness of the Glossy is set to zero.

Saturday, September 14, 2013

Invisible Emissive Material

In the Cycles renderer, let's assume that you want to light your scene with an emissive mesh, however, that mesh is in the way of how you want to view the scene.  Hiding the mesh will also remove the light effect, so we need to make the object invisible to the camera, but still light the scene.

With the emissive object selected, in the Object panel, under Ray Visibility, uncheck the Camera box.

Thursday, September 27, 2012

Transparent Mask - Cycles

This tutorial is similar to the material mask, however this approach makes use of an alpha (transparency) channel built into the texture (i.e. PNG with RGBA) that will be overlayed.  In this case the red splatter (from here on referred to as blood) is an image with a transparent background.  We will be overlaying this onto a wooden plank texture.



Saturday, September 22, 2012

Light in Glass - Cycles

For this entry, we'll go over a trick for having a light shine through glass efficiently in Cycles.  For this example, we'll have a simple setup of a oval sphere emitting from inside a regular sphere (which has the glass material), and a torus around it to receive the light through the glass.

When normally just applying a Glass material to the sphere, the problem arises that the light cast on the surrounding area is very noisy.  This is due to the fact that Cycles is trying to do a lot of intense math to try to get the lighting realistic.  This method of rendering can take a very very long time.

The quick trick is to use the LightPath node combined with a Mix Color node set to Add and a Factor of 1.0.  When combining this with a Transparent Shader, the resulting render is one where the light coming from the emitter is correct as it passes through the glass to the camera, but for the light that passes through the glass to the rest of the environment, it's as if the glass isn't there, leaving much faster rendering times and much cleaner image.

New render with this more sophisticated node setup.

Friday, September 21, 2012

Material Mask - Cycles

This entry will cover the function of creating a material mask using an image texture.  Our starting model is a simple sub-surfaced cylinder with a uv-mapped texture on it.


Using the following material node setup, we essentially are taking a second texture and masking out parts based on luminance.  A bright magenta is used to show what would normally be another texture showing through.  The ColorRamp node converts the output of the texture to black and white, while the sliders allow you to control what parts of the texture will show through.

An example of the cylinder now masked showing some magenta areas through.

Taking this node setup further, the output from the ColorRamp can be fed into a Mix Shader to also act as a mask for another shader (in this example a Glossy Shader).  A Mix Color node must be placed in between to control the strength of the second shader.  The second color of the Mix Color node must be set to black, acting like a scale between black and the full white from the ramp.

The result of this setup is as shown below, where the glossy is only affecting the areas that are masked per say.

Wednesday, March 14, 2012

Shadeless

Rendering an object with a Shadeless material essentially allows the full color of the color or texture to visible, without any interaction with the rest of the lighting in the scene.   This is most often used in cases of background images, and with creating color masks within a scene.

In the Blender Internal this is done quite simply by checking the Shadeless box in the Material tool palette (as seen below).

In Cycles, it is a little more cumbersome, and the node setup (below) must be used.  Essentially what's going on here is that the material is set to Emmissive, but to prevent it from lighting other objects in the scene, the light paths are isolated to only casting toward the camera.


Tuesday, February 21, 2012

Material Viewport Color

This entry will explain a simple concept of material identification, as well as touching on a special surface in Cycles called the Holdout.

FOR CYCLES:
In the initial viewport we have 3 cubes that have different colors. However, these colors are not representative of what the render will look like.

In cycles, in the material panel, you'll notice a field called Viewport Color.  This is what the object will be colored when viewed in Solid render mode.  In this example, the red is obviously the cube in the middle. You'll notice however, that the actual shader or surface used is Holdout.

When we view the rendered image, we see three boxes with three unique materials, none of which are colored.  The 'blue' box has a Glossy shader, the 'red' has a Holdout, and the 'green' has the Emmisive shader.  It's worth noting that the Holdout shader is essentially the opposite of the emmissive shader.  As the emissive shader emits light, the holdout shader actually absorbs all light and reflects none.


Monday, February 20, 2012

Quick Preview Render


When working in Render view in Cycles, sometimes the render takes too long and it's difficult to see how your changes are being effected.  Switching the Integrator to these settings will give a lower fidelity image, but a much faster render as you manipulate the scene.

Sunday, February 12, 2012

Alpha Texturing - Cycles

This entry will walk through the process of applying an alpha texture such that the lighting in the scene reacts to the transparency.  This tutorial is specific to the Cycles renderer, for the Blender Internal approach, go here: Alpha-Texture Internal

Our starting scene just has two planes, one with the image (containing transparency) and the second acting as the background.

The compositing view for the material is shown below.  Note that there are two image textures.  I'll describe the two images that are needed next.

Our original image which connects to the Diffuse BSDF is the original image with transparency.  This was simply a PNG of the blender logo.

The second image that flows into the Transparency BSDF node, must be a grayscale image representing the alpha channel.  Black is opaque and white is transparent (with gray being in between values of transparency).  This image must be generated in an image editor and imported separately.

The final rendered result shows the transparent plane hovering over the background.  Note how the light respects the transparency and the shadow matches the shape of the image rather than the rectangular plane that it is resident on.

Saturday, January 7, 2012

Texture Displacement

Texture Displacement in Cycles is essentially what was normal-map-texturing in the internal renderer.  This entry will show how to apply texture displacement to a mesh, and I'll show this with a log I created for my fantasy football team.

What we want to add bump mapping to is the text "Motown Mayhem".  Since this mesh will have a galvinized metal texture, I expect it would have rough texture as well.


The basic idea of adding displacement is feeding the image into the Displacement input of the Material Out box.  In this case however, to control its strength, we add a Math node in between and set it to Multiply.  By adjusting the value slider, you can adjust the strength (depth) of the bump.

The final render of the logo with the bumpy text.

Texture Masking

This entry will show how to apply texture masking using the compositer in Blender.

For the non-cycles approach, go here: Texture Stencil

This first texture will be the mask that we use.  I created this (crude) image using the following technique:  Texture Painting.  Other methods can be used, but essentially, the black or white will be used to allow or occlude the other texture.

In this example, the 'other texture' will be this galvanized metal downloaded from http://www.cgtextures.com/.

Once a new material is added to your object, go to the compositor and make the following arrangement.

The two textures are fed by the UV map (assumed is already generated example here).  These two feed into a Mix Node, which (this is the key) the mask image feeds into the FAC (or factor), while the metal texture feeds into the Color.  The other color in this case is set to white by default.  So the mask will allow white to pass through where the mask is white, and the metal texture where the mask is black.

A render of just the mask texture (as a plain texture, not a mask).

A render of just the metal texture.

A render of the metal being masked on the default white color.

Texture Painting

At times it is necessary to create your own custom textures (or texture masks), but creating these can be difficult if you can't paint on the object itself.  This can be done in Blender with texture painting.

This entry will show how to perform texture painting with the Cycles renderer, though it will be very similar for the internal renderer.

First we'll start with a bunker shaped rectangular prism.  We will be painting a camo texture onto it. 

Select the object and in Edit Mode [TAB], uv unwrap [u] it with Smart UV Project and switch to UV Edit View [Ctrl + LEFT].  You should see the following below.

Next we create a new image which we will paint on.  For this example, I made the background white.

The next image has a lot going on and is the main part of setting up Blender for texture painting.

First I created my own custom view which I called TexturePainting.  Note that the view consists, of the following views:

  • Node Editor
  • UV Image Editor
  • 3D View
  • Properties view.  

A new material needs to be created on the object with its Color set to Image Texture, and the new image that we created is selected.  The Vector needs to be set to UV.

The mode in the 3D View is set to Texture Paint.  This brings up the paint tool panel.  I selected airbrush as the Stroke.  To ensure the best viewing of the painting on the object, ensure the following:

  • Texture view is enabled
  • Zoom in close to the object while painting
  • Use orthographic mode rather than perspective

Finally I set the image in the UV Image Editor view also to the new image, so that I could see the effects of the painting on the map as I painted.

Now we begin painting!

Once the painting is complete, you can see the final painted object, and the painted uv map.

UV map projected on painted texture (i didn't paint the bottom).

For the new painting to show up in the render, you need to save the image.

Rendering applies that new painted texture to the object.

Friday, January 6, 2012

HDRI Image Lighting in Cycles

This entry essentially shows the steps of creating environmental lighting for a scene using an HDRI image.  This is the same concept as is introduced in this entry HDRI Lighting, however, you'll quickly note that this is much easier and simpler to do with the Cycles render engine.

So we start off with a simple scene with a smoothed sphere.

In the World tab, simple select Environment Texture for the Color, of the Background.  Select the desired HDRI image, and that's it.

Now that image will render as both lighting and the background for the scene.

Thursday, December 29, 2011

Cylinder Lighting

This is a nifty approach to creating simple environmental lighting using a cylinder and the Cycles render engine.  

First we start off with our HDR or sky image.  These can be downloaded from many sites online.  See the one of the Links entries for more information.

First create a cylinder (without ends capped) and wrap your scene with it.

Next, take a side view [NUM 1 or NUM 3] and, in edit mode [TAB], hit [u] for the UV menu and select Cylinder Projection.

Next, switch over to the UV Edit view [Ctrl + LEFT].

Select Clip to Bounds to automatically have the mesh fit the image box.

Because Cycles renderer does not support image assignment to UVs yet, switch to the Blender Renderer.

Now select the image from the beginning and load it into the UV map.

Adjust the mesh so that it fits the image.

Now the cylinder can use an emmissive image texture to create light for the scene.  You can follow this entry for that: Emmissive Image