Jump to content

Proper Lightmap Workflow


Sonic_Serpentine
 Share

Recommended Posts

Hey guys, So I'm looking into an ideal way to set up lighting for my levels. I'm going with PBR since that's what I'm familiar with from other engines. Right now I'm just leaving reflection color black until my diffuse + lightmapping are standing on their own. What I'm stumped on right now is how to deal with hot-spots and maybe lightmap contrast in general. There are sconces on walls and I use them as emissive textures to generate the lightmap bakes. In a typical Blender Cycles render, the surface nearest to the emissive sconce will get washed out. I bake the direct+indirect diffuse as a lightmap from this. When I apply this as the ambientTexture it looks close, but as I understand it, ambient is really a shadowmap, so its not making anything brighter than it already is and therefore no hotspots. I tried using lightmapTexture, but I don't think I understand how to format it correctly because setting my lightmap to it as-is effectively blasts on-top of everything rather than mix with it. The only thing that has come close to doing what I intend is applying the lightmap to the emissiveTexture and bumping up emissive color to BABYLON.Color3(5,5,5); It's rough, but it does get me surfaces that are lighter and darker than the albedo at the same time. (see bottom image for that)

So that's where I'm at. I'm holding out hope that there's a proper way to mix lightmapTexture and albedoTexture that I'm just missing. Also open to alternative approaches if I happen to be running against the grain in what I'm attempting.

Thanks in advance for any pointers.

Blender Cycles preview render

screen_blender_cycles.PNG?dl=0

 

in Babylon with PBR Material

albedoTexture = wrapping basecolor textures

emissiveTexture = lightmap

emissiveColor (1,1,1)

screen_bab_pbr.PNG?dl=0

 

albedoTexture = wrapping basecolor textures

lightmapTexture = lightmap

screen_bab_lightmap.PNG?dl=0

 

albedoTexture = wrapping basecolor textures

emissiveTexture = lightmap

emissiveColor (5,5,5)

screen_bab_emissive.PNG?dl=0

 

Link to comment
Share on other sites

Hi!  I'm far from an expert in these issues, but I wanted to remind you that all BJS textures have a .level  (in case you didn't know that).  It might help beef-up the brightness of things such as emissiveTexture and ambientTexture.  Pretty scene... nice work.

Link to comment
Share on other sites

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...