Baking in Lighting and Materials for use with VR Headset

For 3d models to retain their texture mapping and lighting when translating into VR compatible files you need to “bake” these textures into your model first.  Otherwise the model will just show as a flat solid white colour.

The process for this varies according to the 3d software –

 This is the process for Blender (tested in version 2.76)

blender

Create your model, add materials and set up lighting as required.

– Note: Stick to ‘Diffuse BSDF’ and ‘Emission’ surface types when creating materials.

Combine multiple meshes by selecting them and pressing Ctrl + J (not crucial but seems to simplify things). Then:

  1. Unwrap the mesh (3D View)
    Select the mesh, press space, start typing ‘Smart UV Project’. Choose it from the list when it appears and click OK
  2. Create an image to bake to (UV/Image Editor window)
    Click the ‘New’ button to create an image. Name the image (eg ‘baked’), leave the width and height at 1024 px, uncheck ‘Alpha’ and click OK.
  3. Select a material (Properties window > Material settings)
    Select a material from the list at the top.
  4. Set image to bake to (Node Editor window)
    Click Add > Texture > Image Texture then, in the orange-highlighted ‘Image Texture’ panel that appears, click the small image icon and select the image that you created in step 2 (‘baked’).
  5. Repeat steps 3 and 4 for every material used by your mesh.
  6. Bake materials and lighting (Properties window > Render settings)
    Scroll down to the ‘Bake’ settings, uncheck ‘Clear’ and click the ‘Bake’ button. Noise can be reduced by increasing the number of render samples under ‘Sampling’ in the render settings.
  7. Save the baked image (UV/Image Editor window)
    Click Image > Save As Image.

 

 

Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *