Announcement

Collapse
No announcement yet.

Composited render elements and render don't look the same (color mapping)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Composited render elements and render don't look the same (color mapping)

    I fail. I was thinking that if i apply the same color mapping (ie gamma 2.2) on my render and on my render elements, i shall have the same result between the render and the composited picture but obviously not. The composited picture is slightly more exposed, probably because of silly logical mathematics.

    My goal is to generate a lightmap for real time, using correct gamma values. So all gamma correction should be already "baked" in my gi and lighting passes (like on right picture). I can't use post-process like on left picture. How should i tweak my render elements so my composited "gamma baked render elements" picture looks like my render ?
    My brain is too slow to see what i should do. I struggle with it for ages now.
    Thanks for helping.


  • #2
    Gamma correction is always the last step in the rendering process; all compositing operations should take place in linear space. If your textures are stored on disk with gamma correction, you need to make sure that this correction is removed from the bitmaps before doing the compositing, and re-applied to the result after that.

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment


    • #3
      Mmh ok, this is what i get, if anyone is ever interested in doing lightmaps with linear workflow for modulate2x shader. I think it's correct.

      So now, my real time stuff should look like my render. Which is cool.

      Comment


      • #4
        modulate2x = (lightmap*diffuse)+(lightmap*diffuse)
        All values up to average gray burn the diffuse, all values under darken the diffuse.

        Comment


        • #5
          erm no i've failed again, i give up.

          Comment


          • #6
            It's because you are trying to do things in the wrong way... as I said before, you first need to remove any gamma correction on the bitmaps, perform the compositing, and then re-apply the gamma.

            Best regards,
            Vlado
            I only act like I know everything, Rogers.

            Comment


            • #7
              yeah i understood, but it's for generate a lightmap for real time. I was looking for a solution where i didn't have to convert all my diffuse textures to gamma 1,0 and apply a gamma 2,2 to the all "frame". I wish i could do a trick with my lightmap, to match my render but keep textures in gamma 2,2. For now i just tweak a bit the gamma and luminosity, playing with shadow/highlight in photoshop to approach my render, but it's very empirical and unprecise

              That said, happy new year \o/

              Comment


              • #8
                Originally posted by KebabMakina View Post
                ...I wish i could do a trick with my lightmap, to match my render but keep textures in gamma 2,2.
                Yep, unfortunately this is not possible mathematically... it should not be too hard to write the proper OpenGL or DX shader for that though.

                Best regards,
                Vlado
                I only act like I know everything, Rogers.

                Comment


                • #9
                  Do you mean send gamma 1.0 textures (diffuse+lightmap) to the shader, which would apply gamma 2.2 in post process ? I've discussed about it with our developper. I'm not sure i've seen this used in any game or demo but we'll give it a try. It can only look more realistic anyway.

                  Comment

                  Working...
                  X