About Store Forum Documentation Contact
Donations:
345$/mo



Post Reply 
[RESOLVED] ZOrder broken when there is Fog?
Author Message
aceio76 Offline
Silver Supporter

Post: #1
[RESOLVED] ZOrder broken when there is Fog?
Using this image as reference:
[Image: grassthru.jpg]

I am drawing fog using a custom object, with the following snippet:
Code:
void ObjFogLocal::drawBlend()
{
   if(Frustum(Ball(radius, position)))
      FogDraw(Ball(radius, position), density, color);
}
I need to exclude what's behind from blending.

Any advice with this? It is blending everything when fog is on.

www.thinkplaystudios.com
(This post was last modified: 10-03-2011 05:07 AM by aceio76.)
09-26-2011 03:58 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Zervox Offline
Silver Supporter

Post: #2
RE: ZOrder broken when there is Fog?
Have you tried Renderer.blend_objects_affect_depth_based_effects?
I am not sure but could possibly be the reason(don't know if this was an issue before the update)
09-26-2011 06:55 AM
Find all posts by this user Quote this message in a reply
aceio76 Offline
Silver Supporter

Post: #3
RE: ZOrder broken when there is Fog?
Hi Zervox, I will try it. But what does it do?

Edit: I saw that setting and it is enabled by default.

www.thinkplaystudios.com
(This post was last modified: 09-26-2011 02:49 PM by aceio76.)
09-26-2011 02:28 PM
Visit this user's website Find all posts by this user Quote this message in a reply
aceio76 Offline
Silver Supporter

Post: #4
RE: ZOrder broken when there is Fog?
Just as additional information, depending on the camera angle when looking on the walls, the objects behind stop appearing through the walls (fixes itself). This sounds like a lighting issue and I can't find a way to control it further.

www.thinkplaystudios.com
09-26-2011 04:13 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Zervox Offline
Silver Supporter

Post: #5
RE: ZOrder broken when there is Fog?
did you try disabling it?
09-26-2011 04:22 PM
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #6
RE: ZOrder broken when there is Fog?
Few months ago I have similar problem and Esenthel wrote me to not use local fog. So try maybe with Global Fog.
09-26-2011 04:52 PM
Visit this user's website Find all posts by this user Quote this message in a reply
aceio76 Offline
Silver Supporter

Post: #7
RE: ZOrder broken when there is Fog?
Global fog is horrible and I'd rather not use fog if it's global.

I will try to disable Renderer.blend_objects_affect_depth_based_effects.

I will also try to use volumetric fog and see how much more load it does.
Renderer.blend_objects_affect_depth_based_effects=false; does not help here.
Sorry, I was confused with another engine, we don't have volumetric fog here.

www.thinkplaystudios.com
(This post was last modified: 09-26-2011 09:00 PM by aceio76.)
09-26-2011 08:32 PM
Visit this user's website Find all posts by this user Quote this message in a reply
aceio76 Offline
Silver Supporter

Post: #8
RE: ZOrder broken when there is Fog?
Hi Harry, was it mentioned what was wrong with using local fog?

www.thinkplaystudios.com
09-27-2011 03:04 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #9
RE: ZOrder broken when there is Fog?
Hi,

Yes, check here - http://www.esenthel.com/community/showth...p?tid=3855 post #12

(07-01-2011 10:52 AM)Esenthel Wrote:  FogDraw will not affect blended meshes - it's impossible. so if you want smooth fog for blended meshes use either sky fog (Sky.frac and Sky.atmosphericDensityExponent) or global 'Fog'
(This post was last modified: 09-27-2011 10:31 AM by Harry.)
09-27-2011 10:30 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #10
RE: ZOrder broken when there is Fog?
Hi, yes the Z Order is a bug (grass shouldn't be visible when behind a wall), I'll fix it quickly.

And yes, currently local fog does not affect blended objects.
09-27-2011 12:42 PM
Find all posts by this user Quote this message in a reply
Wireframe Offline
Member

Post: #11
RE: ZOrder broken when there is Fog?
Can you add in near future, that the local fog does affect blended objects?
09-27-2011 03:39 PM
Find all posts by this user Quote this message in a reply
aceio76 Offline
Silver Supporter

Post: #12
RE: ZOrder broken when there is Fog?
Thanks for the fix, Esenthel. I've verified bug is gone.

www.thinkplaystudios.com
09-27-2011 04:26 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply