[Need fix] World Data Block : several issues with setMist, AmbColor, Bgcolor

Hi,

I have encountered several issues while using :
setBackgroundColor, setAmbientColor, setMistColor

I was wondering if you could confirm the following :
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
GLSL
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

setBackgroundColor()
World Data Block + Textured Mode : NOT working
World Data Block + Shaded Mode : working
NO World Data Block. Textured Mode : working
NO World Data Block. Shaded Mode : working

setAmbientColor()
World Data Block + Textured Mode : NOT working
World Data Block + Shaded Mode : NOT working
NO World Data Block. Textured Mode : Works on objects with no material only
NO World Data Block. Shaded Mode : Works onobjects with no material only

setMistColor(), setMistStart(), setMistEnd()
World Data Block + Textured Mode : works on objects with no material only
World Data Block + Shaded Mode : working
World Data Block + Textured Mode + Mist button : Not working (following panel settings)
World Data Block + Shaded Mode + Mist button : Not working (following panel settings)
NO World Data Block. Textured Mode : works on objects with no material only
NO World Data Block. Shaded Mode : working

\\\\\\\\\\\\\\\\\\\\\\\\\\\
Note :

  • Create a world Data Block.
  • Apply the Mist button.
  • Delete the world Data Block

=> The Mist is still applied to all textured object in the 3d view and when the game is launched. Is that normal?
\\\\\\\\\\\\\\\\\\\\\\\\\\\\

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
MULTITEXTURES MATERIALS
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

setBackgroundColor()
World Data Block + Textured Mode : NOT working
World Data Block + Shaded Mode : working
NO World Data Block. Textured Mode : working
NO World Data Block. Shaded Mode : working

setAmbientColor()
World Data Block + Textured Mode : NOT working
World Data Block + Shaded Mode : NOT working
NO World Data Block. Textured Mode : working
NO World Data Block. Shaded Mode : working

setMistColor(), setMistStart(), setMistEnd()
World Data Block + Textured Mode : working
World Data Block + Shaded Mode : working
World Data Block + Textured Mode + Mist button : Not working (following panel settings)
World Data Block + Shaded Mode + Mist button : Not working (following panel settings)
NO World Data Block. Textured Mode : working
NO World Data Block. Shaded Mode : working


RESUME

I would like to know if that’s normal and if it shouldn’t be brought to the attention of developers?

Another test.
:::::::::::::::::::::::
Instructions
:::::::::::::::::::::::

Please download that test blend (targ.gz / 39.6ko)

  • Open the file. Launch the Game Engine P key. Watch
  • Esc. Create a World Data block (ShadingF5 - World buttons) and see what happens, Mist disabled/enabled. World Data enabled/disabled.

Also, here is quote from a conversation we had with cthames.
It describes a simple test to make and check it by yourself :

From cthames
Create a floor. A large plane. 4 vertices. No subdivide. Add your cubes. Add a material to your floor and cubes.

World data block and using the Mist button in the Mist/Stars/Physic tab. Mist will gradually progress from 2 BU to 20 BU at which point it will become solid.

  1. Having a material on your floor and cubes.
    With the Mist button enabled, setMistColor, setMistStart and setMistEnd doesn’t have any effect.
    With the Mist button disabled, setMistColor, setMistStart and setMistEnd doesn’t have any effect.
  1. Remove the material from your floor and cubes.
    With the Mist button enabled, setMistColor, setMistStart and setMistEnd doesn’t have any effect.
    With the Mist button disabled, setMistColor, setMistStart and setMistEnd, the plane of 4 vertices will be a solid color (this is what I meant but didn’t explain very well). The cubes will have a mist effect (kind of).

In GLSL (World data block, Mist button enabled) if there is a texture, mist uses texture paint and the mist is independent of the number of vertexes. If there isn’t a texture it uses vertex paint and the mist is dependent upon the number of vertexes.

setMistColor, setMistStart and setMistEnd doesn’t work on objects with materials/textures. It should but it doesn’t. It only uses vertex paint on objects that don’t have a material/texture. If you have two objects, one textured and the other not, the textured object won’t have mist and the untextured object will.
Any information and test would be helpful,
Thank you!

I really want control Ambient and Fog in python code too, but for long time these things don´t work… Unfortunately =/

Unfortunately:

http://www.tutorialsforblender3d.com/GameModule/RasterizerModule_13.html

http://www.tutorialsforblender3d.com/GameModule/RasterizerModule_14.html

http://www.tutorialsforblender3d.com/GameModule/RasterizerModule_19.html

Note:
Doesn’t work

So, can’t we do anything to solve that issue?

It is odd that the mist still applies when you delete the world block. On the note of the mist not working with texture mode and world block, I am not having this issue. I am running OSX though so that may be the difference. And for me the number of verts does not seem to affect the mist. I tried it with a mid poly model and with a generic cube both worked with and without textures. [edit] However adjusting the script values did not change the distance. [edit the edit… yeah I know it’s annoying but I swear it is the last one] Ok… played around with the script a little more and changing the value for miststart and end is working for me in texture and shade mode (had to use very low values start .5 and end 2) but not with the world button applied.

So I have this for the mist.

setMistColor(), setMistStart(), setMistEnd()
World Data Block + Textured Mode : working
World Data Block + Shaded Mode : working
World Data Block + Textured Mode + Mist button : Not working (following panel settings)
World Data Block + Shaded Mode + Mist button : Not working (following panel settings)
NO World Data Block. Textured Mode : working
NO World Data Block. Shaded Mode : working

My question to you is … if you are adding all of this with python why do you want the world button in the first place? It seems to me that what you are doing is setting up potentially conflicting commands… one set by the world buttons… and the other by the script and the system has been set up to override your script in case of a conflict. I could be wrong on this count but it seems like the logical conclusion to me.

Hi,

My question to you is … if you are adding all of this with python why do you want the world button in the first place?
It seems that the world button sets a lot more things than just mist and background color.
No World = no access to static/dynamic/occlusion/sensors objects (gravity, etc…).
thank you for your feedback.

I’m asking : shouldn’t this thread deserve a little attention, and issues be fixed?
Is it considered as “minor”; and couldn’t we have all those “little” features (and basics settings) fixed before adding other features?

I appreciate the work done on the Bge by the devs, and this is just a question.

maybe report them as bugs?