www.vray.us
Buy online or call 1-800-548-1578
Home Contact Us Documentation Free Tutorials Animation Production  

 
   

Bookmark and Share  



  VRay Categories   Categories

VRay for 3ds Max
VRay for Maya
VRay Educational
VRay for Rhino
VRay for SketchUp
VRay for Cinema4D
VRay for Softimage
VRay Standalone
VRay Bundles



Animation Production
Photosimulation


  VRay Resources   VRay Resources

1. Free VRay Demo
2. Free VRay Tools
3. Free VRay Tutorials
4. VRay Documentation
5. VRay Tips and Tricks
6. VRay Gallery


  VRay Bestsellers   Bestsellers

1. VRay 2 for 3ds Max
2. VRay for Sketchup 8
3. VRay for Maya
4. VRay Educational
5. VRay book
6. VRay 1.5 for Rhino 5


     Special
Gift certificates


     Help

Contact us

800-548-1578 - (US)
816-525-0103 - (International)

email: sales@trinity3d.com


Privacy statement
Terms & Conditions


  What's New   What's New

Archinteriors Bundle

Save Big with Evermotion Bundles

ArchModels, ArchInteriors, and/or ArchExteriors

1. ArchBundles 2-Pack
2. ArchBundles 3-Pack
3. ArchBundles 4-Pack
4. ArchBundles 6-Pack
5. Archinteriors Vol 1 - Vol 5 Bundle
6. Archinteriors Ultra Bundle


     Newsletter

Subscribe to our Newsletter!

Trinity3D.com Newsletter

Subscribe to our newsletter and receive new product announcements, special sales, coupons and more!

Trinity3D.com Newsletter
 

* Your Email Address

 

 
  VRay Home  ::  VRay Documentation Home  ::  VRay Tutorials Home

VRay Tutorials - Basic Texture Baking with VRay, part I >>> Texture baking >>> VRay Tutorials - Basic Texture Baking with VRay, part I

Search Keywords: bake, baking, render to texture

General

In this tutorial we will discuss the process of texture baking with VRay.

Rendering to texture, or "texture baking,” allows you to create texture maps based on an object's appearance in the rendered scene. The textures are then “baked” into the object that is, they become part of the object via mapping, and can be used to display the textured object rapidly on Direct3D devices such as graphics display cards or game engines.

In our case, we will show you how a simple scene can be baked and how this method can also be used for making a Fly-Through Animation.

The scene contains 2 objects (the Space ship and the Ground) and 1 Light source (omni). You can download the initial scene here.

The objects actually don't have any specific maps (diffuse) but a simple diffuse color. The materials assigned to them are both VRay materials. A gray one is assigned to the Ground object, and a Green one to the Space ship. The materials are Default, with Diffuse colors:

  • The Space Ship Material : (103, 174, 108)
  • The Ground Material : (128, 128, 128)
The Light source (omni) is situated a bit above and aside from the Ship. It has a Multiplier of 2.0 and Color RGB (226, 201, 146); the shadow type is VRayShadow.

Setting the Render

1.1. Open the starting scene, which can be found here.

1.2. Assign VRay as the current renderer.

VRay Tutorials - Basic Texture Baking with VRay, part I
VRay Tutorials - Basic Texture Baking with VRay, part I

1.3. You can open the Material Editor (M) to assure the materials are properly set and assigned.

VRay Tutorials - Basic Texture Baking with VRay, part I

1.4. Before we do our first rendering, we will turn on the Frame Stamp (System Rollout) so that we can have the render times shown.

VRay Tutorials - Basic Texture Baking with VRay, part I

1.5. Render:

VRay Tutorials - Basic Texture Baking with VRay, part I

That is what we get with all default VRay Settings. To make the lighting a little more interesting, we will add global illumination and area shadows to the rendering.

1.6. Go to Image sampler rollout and set the Image sampler type to Adaptive QMC.

VRay Tutorials - Basic Texture Baking with VRay, part I

1.7. In the Indirect illumination rollout, turn GI on and set both the Primary and Secondary GI engines to Quasi-Monte Carlo.

VRay Tutorials - Basic Texture Baking with VRay, part I

1.8. In the Environment rollout, turn Override MAX's (Skylight) on and set Color (255, 255, 255) and Multiplier to 0.8.

This will give us some environment color to act as a skylight.

VRay Tutorials - Basic Texture Baking with VRay, part I

1.9. Render:

VRay Tutorials - Basic Texture Baking with VRay, part I

Notice how the render time has increased, due to all the changes we made on the render setup.

1.10. Turn on the Area Shadow of the omni light.

VRay Tutorials - Basic Texture Baking with VRay, part I

1.11. Render:

VRay Tutorials - Basic Texture Baking with VRay, part I

Now we have the area shadow.

The image looks good, but grainy. To reduce the noise, we will adjust the QMC sampler parameters.

1.12. In the rQMC Sampler rollout, set the Noise threshold to 0.001.

1.13. Set the Global subdivs multiplier to 10.0.

VRay Tutorials - Basic Texture Baking with VRay, part I

1.14. Render:

VRay Tutorials - Basic Texture Baking with VRay, part I

Notice how the render time has increased, but the quality is much better. Now our scene is ready for baking.

Preparing Objects for Baking the Textures

2.1. Before all, we will turn Off the Frame Stamp (System Rollout), otherwise we will get it on our baked textures as well, which we do not want.

VRay Tutorials - Basic Texture Baking with VRay, part I

2.2. Now open the Render to Texture (0) Window from the Rendering Menu.

2.3. Choose your Output folder, where the new baked textures will be saved.

VRay Tutorials - Basic Texture Baking with VRay, part I

2.4. Select both objects from the scene (the Space ship and the Ground).

2.5. In the Mapping Coordinates Section - select Use Automatic Unwrap.

VRay Tutorials - Basic Texture Baking with VRay, part I

See how both objects were automatically added in the table of Objects to Bake.

2.6. In the Output rollout - choose 512 for the Size, turn on Enable (if not), and give the map a name in the name-field.

This actually will be the suffix-name of your newly baked texture files, prefixed by the name of its object in the scene.

For example: in our case the baked map of our Ground object will have the name: GroundCompleteMap.tga

VRay Tutorials - Basic Texture Baking with VRay, part I

2.7. In the Baked Material rollout - choose Save Source (Create Shell).

2.8. Select the Create New Baked option and choose (Standard: Blinn) from the pop-up menu.

2.9. Select Keep Source Materials.

VRay Tutorials - Basic Texture Baking with VRay, part I

2.10. Now go back to the Output rollout - choose Self-Illumination in the Target Map Slot.

See how this is automatically added in the table as well.

VRay Tutorials - Basic Texture Baking with VRay, part I

Leave all the other settings by Default.

Now our objects are ready for baking (rendering).

Baking the Textures (Rendering)

3.1. Hit Render Button on bottom of the Render to Texture Window.

3.2. You can see that the baking process proceeds in a row object by object, as they were set in the table.

First is being rendered (baked) the Ground object followed by the Space ship.

VRay Tutorials - Basic Texture Baking with VRay, part I
VRay Tutorials - Basic Texture Baking with VRay, part I

Loading the new Baked materials and Viewport preview

4.1. Open the Material Editor (M) and choose an empty one.

4.2. Click on the Get Material icon to open the Material/Map Browser.

4.3. Select Browse From: Scene

4.4. You will notice that there are 2 new materials. They are Shell Materials and contain both the original VRay material and the new Baked Material in them.

That is because we wanted so: see steps 2.7, 2.8, 2.9

4.5. Drag the new materials in the Material Editor as shown.

4.6. In the new Shell Material Paramaters, choose the Baked Material for Viewport, and Original Material for Render.

This simply means that:

- if we do a new fresh render (F9) - the object will use their Original material (VRayMtl).

- in all the viewports - the objects will use their Baked Material (Standard).

VRay Tutorials - Basic Texture Baking with VRay, part I

4.7. Select the new Ground Shell Material - ground_material[Ground].

4.8. Turn on Self-Illumination and select a pure white Color (255, 255, 255). See that there we already have the Baked Map attached.

That is because we choosed exactly this Target Slot (see step 2.10)

4.9. Go to the Self-Illumination Map, and turn on the Show Map in Viewport icon.

VRay Tutorials - Basic Texture Baking with VRay, part I
VRay Tutorials - Basic Texture Baking with VRay, part I

4.10. In the Viewport, you should be able to see the ground plane with its already baked map.

VRay Tutorials - Basic Texture Baking with VRay, part I

Note: if you forget to turn on the Show Map in Viewport icon, the viewport would look just like this:

VRay Tutorials - Basic Texture Baking with VRay, part I

At this point, the Space ship is still being shown as totally black because we still haven't adjusted its material.

4.11. Repeat steps from 4.7 to 4.9. for the new Space ship material - ship_material [Space_Ship].

Now the viewport should look like something like this (notice how the Edged Faces (F4) can be also shown along with the baked maps).

 
VRay Tutorials - Basic Texture Baking with VRay, part I VRay Tutorials - Basic Texture Baking with VRay, part I
Shade + Edged Faces On
Shade + Edged Faces Off

4.12. Here are some additional views of the scene from different positions:

VRay Tutorials - Basic Texture Baking with VRay, part I

Rendering the scene with the baked materials

5.1. Open the Material Editor (M).

5.2. Choose the Baked Material in the Render option for both our Shell Materials.

VRay Tutorials - Basic Texture Baking with VRay, part I

5.3. Select the omni light and switch it off. Actually we can even delete that light from the scene and it will still render fine - we have all the lighting baked into the textures already.

VRay Tutorials - Basic Texture Baking with VRay, part I

5.4. In the VRay settings, turn GI off, Environment (Skylight) off, Default Lights off.

5.5. Render:

VRay Tutorials - Basic Texture Baking with VRay, part I

Notice the render time. In step 1.14. we had 4m:35s compared to 8.6 seconds that we get now. That is simply because with the baked textures VRay is not doing any lighting calculations. You can even switch to the default scanline render and still get the same result.

Having all this in mind, you can animate a camera and render a whole fly-through animation with very short render times per frame.

Notes:

We will show You another method, which can produce absolutely the same result as the above. This one concerns steps from 2.7 to 2.10.

Because the VRayMtl does not support a Self-illumination map, we will use the VRayLightMtl. The new baked maps will be automatically placed in the Texmap slot. Then for previewing the baked results, You repeat steps from 4.7 to 4.11 (of course considering in mind the new VRayLightMtls).

VRay Tutorials - Basic Texture Baking with VRay, part I
VRay Tutorials - Basic Texture Baking with VRay, part I

In the next part of the texture baking tutorial you will learn how to bake only specific elements of the rendering (e.g. only the lighting or GI).


  Buy VRay
VRay
Buy VRay
 

Buy VRay (Educational Version)


Free VRay Tutorials


Free 30 day Demos


  

Follow our newsfeed for all latest product updates and discounts

     Your cart
Cart is empty

View cart
Checkout


     Authentication
Username

Password

Log in
Register
Recover password



     VRay News

V-Ray for Rhino 5

V-Ray is now compatible with Rhino 5. With more than 2,000 new features and enhancements in Rhino 5, you won't want to miss out.

V-Ray for Rhino 5

Learn more, or purchase now.

 


     Popular Products

Facebook 

Follow us on Facebook!

Get the latest info on new products and special offers.

Or check out our ebay store - Discounted items

 

 


 
 
Trinity Animation Inc.

Pre-Sale and Post Sale Support

We have years of real world production experience and our knowledgeable staff can provide you the support you need for your pre-sale or post sale questions.

Contact us at sales@vray.us or sales@trinity3d.com