Home Technical Talk

Cubemap and dynamic lighting

polycounter lvl 10
Offline / Send Message
GlowingPotato polycounter lvl 10
 Hello,

So I need to create a cube map, but since our project is open world with dynamic light (sun moving) should I remove the light source from my cubeMaps? Otherwise the object will have two suns reflecting right? One from the actual directional light and another one from the cube map.

Any advice is appreciated. 

Replies

  • leleuxart
    Options
    Offline / Send Message
    leleuxart polycounter lvl 10
    Depends on the engine and whether or not it picks up the sun. CryEngine doesn't, but I'm not sure about some of the others. 

    I think your biggest issue, if the sun is moving and you're going to potentially have different times of day, is the balancing of the ambient light from the static cubemap. If you capture a cubemap at a brightly lit time and try to use it in darker lighting, it's not going to look right. If you have it so your cubemap switches/generates at different intervals, then you'll be fine. 
  • GlowingPotato
    Options
    Offline / Send Message
    GlowingPotato polycounter lvl 10
    leleuxart said:
    Depends on the engine and whether or not it picks up the sun. CryEngine doesn't, but I'm not sure about some of the others. 

    I think your biggest issue, if the sun is moving and you're going to potentially have different times of day, is the balancing of the ambient light from the static cubemap. If you capture a cubemap at a brightly lit time and try to use it in darker lighting, it's not going to look right. If you have it so your cubemap switches/generates at different intervals, then you'll be fine. 
    Hey, thanks for sharing.

    We are developing our own engine, we just implemented PBS and now I'am looking on how to approach the cube map that is used by the PBS.
    What you said is very true, during different times of the day the cube map is going to look wrong, especially during dawn and dusk...
  • leleuxart
    Options
    Offline / Send Message
    leleuxart polycounter lvl 10
    If you're using your own engine and the probe captures the sun, then as long as you can edit the captured cubemap in Photoshop and load it back to the probe in the engine, then painting out the sun shouldn't be an issue. It would suck in the long run after doing it so much, but it's an option still. Either way, it'll depend on the engine. I'd vote for the probe to not pick up the sun  ;)
  • EarthQuake
    Options
    Offline / Send Message
    Yes, you would paint out the sun from the source cube map/HDR panorama for global ambient/sky lighting.

    For local probes, you wouldn't want to paint anything out, the scene content baked into a local probe are essential for accurate lighting as you move from one area to another. Dynamic lights (including the sun) should be ignored from IBL probe capture. Probes should be generated by the engine and artists should never touch them other than applying them to the correct objects, but even that should be automated to a certain degree.

  • GlowingPotato
    Options
    Offline / Send Message
    GlowingPotato polycounter lvl 10
    Hey guys...

    We are not using the Cubemap to lit objects, its just for reflections. on metallic and glossy surfaces.
    So the cubemap is not generated by the engine. My idea right now is to create them with photoshop, four versions of the same, dawn, dusk, noon, night. and change them according.

    What you guys think ? Acceptable ?
  • StormyBA
    Options
    Offline / Send Message
    StormyBA polycounter lvl 8
    Try it and see if you get away with it. Always a good way of doing things. An issue we have with cubmaps on env stuff is a bunch of metal stuff is indoors and there is a bunch out doors but its all using the same material / cubemap. So yeah all the stuff inside is glowing... Brutal!
  • ActionDawg
    Options
    Offline / Send Message
    ActionDawg greentooth
    At that point you might as well just do it in shader by manipulating gradients based off time of day. You'll get much higher quality for 0 texture cost, just a bit more complex shader.
Sign In or Register to comment.