0
$\begingroup$

Working in game engine, objects are fine in 3d view, but once I start the game engine, object size has an inverse relationship to its material brightness. It's almost like there's a set amount of light each object reflects regardless of area, so larger objects are darker.

There's what I mean: The Below are three identical planes, with the same material. I actually took the first and duplicated it, changing nothing but the scaling.

Here it is in edit mode, with the mid-sized one selected so you can see where they meet: Edit mode

Object mode: as you can see, indistinguishable: unselected

But once I start game engine, the smaller one is blindingly lit, the middle one more or less what I expected, and the largest is extremely dark: enter image description here

It's not that the largest one is furthest from the lights, because the position the lights are directly on top of the middle one and it's still dark; also, there is no gradient, it just goes from one color to the next. (There's a little green to the inner plane.) Changing the Diffuse intensity does nothing; lowering Specular intensity gets rid of the white and makes the whole inner plane the light green of the upper right corner. Making it Shadeless (under Shading) results in uniformity, but of course no shade.

This seems too consistent to be a bug rather than a feature, so I figure I must be doing it wrong. But I checked the documentation, this site, Google in general, and I can't find it. Maybe I'm just not understanding the words.

$\endgroup$
  • $\begingroup$ What happens when u only have the largest plane, move the other ones to a different layer or completely out of the way? $\endgroup$ – Clue Less Mar 7 '18 at 17:53
  • $\begingroup$ Maybe that's some sort of z-fighting when 2 objects have their faces in the same place of 3d space. This isn't necessary but it's advised to never have faces intersecting especially on big areas $\endgroup$ – Mr Zak Mar 7 '18 at 23:46
1
$\begingroup$

What shading mode are you using? (Multitexture or GLSL)

Multitexture

In this mode the the colors of the vertices are calculated from distance to the lamps. The pixels of the face are interpolated from colors of the vertices. As your vertices are more far away from the lamps they are rendered darker. The interpolation will be between dark colors and other dark colors. This method is fast but assumes that face pixels have no significant different distance to the lamps than vertices.

Calculate vertex colors by distance and interpolate pixel colors in-between

In other words: It is assumed, objects closer to lamps have a denser mesh (smaller faces). This way the interpolation is not that much noticeable.

Test: You will see a significant different effect when you subdivide the plane just once as the middle vertex is close to the lamps.

GLSL

In this mode you should not see this effect as all pixels of the plane get the color dependent on the distance to the lamp (rather than interpolation).

calculating individual pixel colors by distance to lamp

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.