Jump to content

Baking shadow maps


Hersir
 Share

Recommended Posts

Babylon toolkit will be available soon (a PR has been submitted).  Can easily bake scenes... But be aware, there is an issue with baked shadows and ambient occlusion textures.

If you have an ambient occlusion texture on an object's material, ITS SHADOW WILL NOT BE RENDERED. You have to remove ambient occlusion (FOR NOW... I think @Deltakosh is going to work on fixing that now that the latest toolkit has been submitted)... Paging @Deltakosh :)

 

Example scene with baked shadows:

 

 

Link to comment
Share on other sites

About technique for texture baking in 3D modelers, you will find tutorials on the Internet.

About workflow I use, with .babylon files:

  • usually I have a scene dedicated to 3D realtime, another to lighting
  • meshes must have a dedicated channel non-tileable-UV for lightmaps (I call it UV2)
  • I bake lighting information (excluding diffuse passes & co)
  • in my 3D realtime scene, I put lightmaps to ambient texture material slot, assigned to UV2 channel (be sure that all objects having a same material shares also the same lightmap)
  • when exported to BJS, usually I have to set scene ambientColor to white
  • jod done

(I've in mind to made a mini-tuto... one day... on my blog, about making a mini-scene from A to Z in Blender to BJS, including lightmap baking of course. It will be in french in first step, but I will translate it in english. I just have to take time to write it :ph34r:)

Link to comment
Share on other sites

  • 8 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...