![]() ![]() Now we modify our GlowingBall object to contain these two textures with respective blending modes: The texture for the additive term is simply our glowing ball texture, rendered on top of a black background:Īnd the texture for the multiplicative is simply the inverse of the additive texture: We can imitate this blending by superposing two objects with different textures, one using multiplicative blending, and the other additive. See, now we have a term, that's a multiple of the “Background Color” and a second term that's additive and independent of the “Background Color”. Please take a moment to verify that this is exactly the same equation, just rearranged. Output Color = Background Color * (Pure White - Object Color) + Pure White * Object Color What we could do instead, is to simulate “Awesome Blending” using a superposition of two objects! Let's rearrange our “Awesome Blending” equation as follows: One problem with this is the added complexity just for a heart-warming ball of pure love! Another problem is that we might want to have other objects in front of our glowing ball, and that further complicates our setup. We could render our scene to a texture, blend our glowing ball on top of that texture, and render that resulting texture inside a real viewport. Unfortunately, such a blending mode doesn't exist :( Output Color = Background Color + (Pure White - Background Color) * Object Color So, maybe, we could scale our additive texture with the remainder of the background color from pure white. Let's imagine for a moment, what kind of blending would work for us We would like to increment the bright regions a bit(so we need something additive), but never saturate them. Which is clearly not what we want, since this will always make the background darker. Output Color = Object Color * Background Color In addition to these, there's also multiplicative blending, which works like this: ![]() Output Color = Object Alpha * Object Color + Background Color Output Color = Object Alpha * Object Color + (1 - Object Alpha) * Background Color Let's see how the two blending modes we've used so far work: ![]() So, what we want is a kind of blending that doesn't saturate a bright region, doesn't make it darker under any condition and yet it's still strong enough over a dark region. When the texture is dark enough that we're barely avoiding too much saturation, it's already too dark over a black cloud. We could try to reduce the brightness of our texture, but then the light appears too weak over the dark regions. Now the trouble is that the bright region was already close to full white and adding our glow has saturated it, so we can't even see any trace of yellow, the color yellow is only visible over the neighboring region where the background wasn't that bright. Graphic = Texture = enobayram_glow_normal.png Pivot = center Position = (150,50,0 ) BlendMode = add So, we need to change the blending mode, let's try additive blending, which means that our object's pixel values will be added to its background instead of being averaged: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |