Hi everybody. I have a question involving the game engine:
I have created a level for a game and used UV textures on pretty much everything in the level (unwrapping the faces and adding an image). I tried to think ahead and reuse as many images as I could. Now I want to add some lights to the ceiling to create some cool atmosphere (I want shadows on the floor, walls, etc.) However when I add a light and press P to preview it, the ceiling is in shadow, illuminated in the one spot where I put the light, which is good, however the whole rest of the level is lit up as if I had lights all over. It’s like the ceiling is the only thing effected by the light source I add, and everything else is doing it’s own thing.
Am I missing something - a setting or option perhaps? When I render the scene in Blender render, the lighting seems to work fine - everything is dark except what the light source is hitting. But again, in the game engine, everything is brightly lit except the ceiling, which is the only thing effected by the light. I haven’t altered the diffuse intensity on any of the objects.
If you want the light to affect only some certain objects you can enable “only this layer” option in light panel and place it in layer two with objects that you want to be illuminated.
Basically the light only affects whats in the same layer.
Thanks BlendingBGE. But it’s actually the opposite problem. All of the lights I put into my scene to affect everything in the scene.
I actually did check out the layers though, I think that’s what causing my problem. It seems like the lights are only affecting the the objects in the same layer. So if I have my ceiling in the first layer, and put a light in the first layer, it is lighting up the ceiling, but nothing in the other layers. The odd thing is I checked the settings for the light and it’s not checked for This Layer Only, yet it’s certainly acting like that.
Again, I only see this happening in Blender Game. In Blender Render, the light affects everything, regardless of what layer it’s on. Any idea why it’s causing this problem in Blender Render?
I have it set to multi texture, if that’s what you mean when you ask if I’m using GLSL. If I set it to GLSL, the lighting looks great but all of my textures don’t show up.
I have 9 lamps in the scene. Right now my work around is to just place them all on each layer. I don’t know if this will cause performance issues later on. I also noticed that I can place 9 lamps, but only 8 will work at a time. Do I have too many?
Wow, that tutorial was quite nice, thanks! So from what i gather, in order to have textures show up with the GLSL setting, you need to assign a material, then a texture (like rock or metal or anything else), then if you want to use the UV mapping you would map the texture to UV, then unwrap the faces and load that same picture you used in the texture slot? You see for this scene I made, I only assigned a material, did not assign a texture, and went straight to unwrapping the faces, which sounds like that’s my issue. I started to assign textures using the same images I had unwrapped the faces to, and with the GLSL setting turned on the textures were showing up and looking quite nice, although I noticed it took a lot longer to render. Since this is for a game, I’m thinking about just leaving it in multi texture so that it has better performance. Does this sound about right?
Why is that? I recommed all to start using GLSL! GLSL rocks, and my opinion is that if you plan to make a good game you must use it, it has so many features, multitexture is old and its hard to achieve nice results BUT if u plan to make mobile games maybe multitexture is the best choice.
Not everybody has GLSL support. Therefore I think it is a strange recommendation. If you want to make a game for a wide range of user’s you need to care a missing GLSL support too. Except you explicitly do not want that.
E.g. I like Ferrari and think it is cool, but I can’t expect everybody else has a Ferrari. Even with a Ferrari I would stick in traffic jam if I do not know how to avoid it. With a bike I would be faster in this situation ;). (Which would not help if I’m sitting in the Ferrari.)
What I want to say is:
Better mention you can help with GLSL but you can’t with multitexture. There is no doubt - GLSL is cool. And there is no doubt it is not so cool if you do not have it (:rolleyes: where is my Ferrari … or better Porsche :evilgrin:?).
(Mobile platforms are not supported by blender. If so we might need to care the Single Face mode too ;).)
Yes you are right, but depends of your game, if you plan to make a serious game you might want to forget about multitexture, nowdays people enjoy good graphics so you might want to have some.
Now the problem is the framerate ,older pc cant handle glsl, but hopefuly more optimizations to come!
At the moment i am developing a game with GRAPHICS, glsl only but you can toggle shadows shaders etc.
Hopefully i can optimize enough so it can be playable on most of hardware.