Thursday 17 January 2013

Create Abstract Background effects in 3d Max

I’m going to show you how to create bokeh background in 3ds Max. I think 3ds Max is perfect for creating abstract backgrounds because of it’s parametric nature. It’s really easy to change everything with parameters. I’m using 3ds Max 2011, but many older versions should work as well.
 Scanline Renderer
We’re going to render the bokeh effect with Scanline Renderer. If you are using mental ray renderer you have to change that ( Rendering > Render Setup… > Common tab > Assign Renderer > Production > Default Scanline Renderer ).
 Particle Cloud
Our abstract background will consist of two elements: particles and background. First, we’ll create the particles. I’m using Particle Cloud, but feel free to use Particle Flow if you want to. I think it’s just a little easier / faster to use Particle Cloud for our purpose here, because we don’t need any of those advanced features that Particle Flow has to offer. So let’s create a particle cloud in the front viewport ( Create panel > Geometry > Particle Systems > PCloud ).
Select the particle cloud, go to the modify panel and apply the following settings:
Basic Parameters
   Display Icon
      Rad/len: 670
      Width: 1200
      Height: 900
  Viewport Display
      Mesh
Particle Generation
   Particle Quantity
     Use total: 500
  Particle Timing ( We create all particles between frames -29 and 0 so that they are visible already at frame 0 )
       Emit Start: -29
       Emit Stop: 0
       Display Until: 0
       Life: 30
      Variation: 0
   Particle Size
      Particle Size: 20
      Variation: 100
      Grow for: 0
      Fade for: 0
  Uniqueness
      Seed: 704 ( Feel free to try different numbers here )
Particle Type
Standard Particles: Facing ( flat four sided polygons that will always face the camera )
Create a target camera ( Create panel > Cameras > Target ) in the top viewport. Right-click on the Perspective view and press ‘c’ in the keyboard to change it to a camera view. Position the camera target in to the middle of the particle cloud and the camera itself like in picture below.

Render your scene to make sure you get something like the picture below. I rendered with 700 x 438 px dimensions.

 The Particle Material
Next we’re going to create the material for the particles. This is the most complicated part of this tutorial, but don’t worry, nothing really hard here. Open Material Editor ( Press ‘m’ in keyboard ) and create the material for the particles:
Select the Particle Cluod and assign the first standard material to it
Face Map: YES ( map in material will be automatically applied to each face of the object )
Diffuse: Light gray ( RGB 230, 230, 230) ( diffuse and ambient are locked by default so both will have this color )
Opacity: 0
Advanced Transparency: Type: Additive

Apply an opacity map:
Opacity Amount: 40 ( particle transparency )
Opacity Map: Gradient Ramp ( Material/Map Browser > Maps > Standard > Gradient Ramp )
Gradient Ramp Flags:
    Flag #1: Color: RGB 44, 44, 44 Position: 0
    Flag #2: Color: RGB 44, 44, 44 Position: 88
    Flag #3: Color: RGB 64, 64, 64 Position: 92
    Flag #4: Color: RGB 64, 64, 64 Position: 96
    Flag #5: Color: RGB 0, 0, 0 Position: 100
( Click on the color gradient to add a new flag. Right-click on a flag to modify or delete it. )
Gradient Type: Radial

Let’s utilize Particle Age map to add some variation to the opacity of individual particles:
In the Maps rollout, click on the ‘Gradient Ramp’ Map
Click on the ‘Gradient Ramp’ again. ( Material/Map browser appears )
Double-click on the ‘Particle Age’ map ( Maps > Standard > Particle Age )
Select ‘Keep old map as sub-map?’ and click ‘OK’. ( Now we have Particle Age as opacity map and Gradient Ramp as a sub-map of Particle Age )
Drag and drop the Gradient Ramp map from ‘Color #1 Map’ slot to ,Color #2 Map’ slot. Select ‘Copy’ when asked.
Drag and drop the Gradient Ramp map from ‘Color #1 Map’ slot to ,Color #3 Map’ slot. Select ‘Copy’ when asked.
Adjust the Gradient Ramp Flags in Color #2 slot:
     Flag #1: Color: RGB 66, 66, 66 Position: 0
     Flag #2: Color: RGB 66, 66, 66 Position: 88
     Flag #3: Color: RGB 96, 96, 96 Position: 92
     Flag #4: Color: RGB 96, 96, 96 Position: 96
     Flag #5: Color: RGB 0, 0, 0 Position: 100
( Click on the color gradient to add a new flag. Right-click on a flag to modify or delete it. )
Adjust the Gradient Ramp Flags in Color #3 slot:
    Flag #1: Color: RGB 99, 99, 99 Position: 0
    Flag #2: Color: RGB 99, 99, 99 Position: 88
    Flag #3: Color: RGB 144, 144, 144 Position: 92
    Flag #4: Color: RGB 144, 144, 144 Position: 96
    Flag #5: Color: RGB 0, 0, 0 Position: 100
( Click on the color gradient to add a new flag. Right-click on a flag to modify or delete it. )

Now infant particles are darker / more transparent than particles that have some age. The effect of the Particle age map is not drastic but in my opinion necessary to get some variation to the opacity and brightness of individual particles. Render your scene to make sure it looks similar to picture below.

Our abstract bokeh background doesn’t look like much yet.
Abstract Background Material
The next step is to create the environment (background) map for our image. Open Material Editor ( Press ‘m’ in keyboard ) and create the environment map:
Select the second material slot
Click on ‘Get Material’ button and select Composite map from the Map list ( Material/Map Browser > Maps > Standard > Composite ). Make sure you select Composite map and not Composite material!
Click ‘Add a new layer’ to add a second layer to the composite map
Add Gradient Ramp map to the first layer of the Composite Map:
Coordinates rollout
   Environ: Selected
   Mapping: Screen
   Angle: W: 90
Gradient Ramp Parameters rollout
   Flag #1 Color: RGB 139, 84, 5 Position: 0
   Flag #2 Color: RGB 255, 229, 192 Position: 100
   Add Noise map to the second layer of the Composite Map:
Noise Parameters rollout
   Noise Type: Fractal
   Levels: 10
   Size: 20
  Color #1: RGB 100, 100, 100
  Color #2: RGB 255, 255, 255
In the Composite Map, change the blending mode of the ‘Layer 2′ to ‘Color Burn’

Let’s apply the map to the environment:
Open environment settings ( Rendering > Environment… )
Drag and drop the environment map from the material editor slot to the Environment Map slot. Select ‘Instance’ when asked and click ‘OK’.
Render your scene to see how your abstract background looks.

As you see the environment background brings a lot of life and color to the image. Feel free to change the color in the background map.
Depth of Field
As a last thing, we’re going to make the image more interesting by adding real depth of field effect to it. Select the camera and go to the Modify Panel to apply the depth of field effect:
  Parameters rollout
    Multi-Pass Effect
        Enable: YES ( Make sure ‘Depth of Field’ is selected in the drop down list )
 Depth of Field Parameters
    Focal Depth
        Use Target Distance: YES ( particles near the camera target will appear sharp )
   Sampling
       Display Passes: YES
       Use Original Location: YES
       Total Passes: 100 ( try lower values if it takes a long time to render )
       Sample Radius: 30
       Sample Bias: 0,5

Render your image to see the difference.

Finally, do some color correction in Photoshop if you like:
Brightness: 40

If you liked this, you might be interested in my other bokeh tutorial. That’s it. Thanks for reading!

No comments:

Post a Comment