Ashadow and fog

Blitz3D Forums/Blitz3D Programming/Ashadow and fog

Svenart(Posted 2009) [#1]
I´m trying to add some fog into a program using the ashadow system, but it seems that the ashadow or the glow effect is overriding the fog settings. Can anyone help me with this?


D4NM4N(Posted 2009) [#2]
Hi Sven!
do you have a screenshot,i have not used ashadow (or heard of it for that matter :) but i may recognise the symptoms if i can see the result.


Naughty Alien(Posted 2009) [#3]
i would strongly suggest to give it a go to FastExt library..it has everything you are looking for..all in one..


Svenart(Posted 2009) [#4]
hello,

i have uploaded a few screenshots here:

This is a normal screenshot with ashadow. Fog is on, but you cant see it.



If I activate bloomeffect (ashadow), you can see the fog, but only in the shadows.



Also it seems, that transparent objects does not work with ashadow. like you can see in the following image (tree in the middle in front of the castle.)

Does anybody knows how to fix this? Is this happening also in devilshadow engine and the swift shadow engine, or are they better?



@ naughtyalien: The fastext lib is looking cool, but It does not contain a shadow engine unfortunately.


Ross C(Posted 2009) [#5]
Is this not something to do with ashadow using a screen overlay technique?


Svenart(Posted 2009) [#6]
I dont know anything about the techique ashadow is using, except that its stencilshadow (I think)...

Has anybody the same problems with ashadow? Is this happening also with other shadowengines like devils shadowlib or swiftshadows?


D4NM4N(Posted 2009) [#7]
It appears the shadows are meshes themselves, and are correctly fogging.
If you quickly simulate fog on the ground you can see what i mean: (Excuse the nasty edges but i did a rough select in gimp and faded it ro roughly what the fog should be)



As you can see the shadows would look right if the ground/nonshadow areas were fogged.

Firstly, how have you set up the ground?, -as there is no fog on it either. Is it just a huge 2tri quad surface or is it made of many tris? The reason i ask is because the fog seems to work on the vertex color in b3d so the more tris the better. If its an imported part of the scene, read on:

As for the other bits, its almost as if the fog is (as you say) only activating on the shadows... Not on any parts of your scene mesh. If i fog the ground it looks right. I think you may have something overriding the effects on your meshes (did you load as b3d?). Try a RECURSIVE pass on the whole mesh and add for fog on (experiment with fullbright too).
(by this i mean a 'deep' fx-set, not simply calling entityfx(meshname) on the parent. I have some code to do this somewhere if you are not sure what i mean.)

As for the tree being in front, what i suspect is happening is the shadows axis is possibly a reference point behind the tree (ie the tree is between the visible shadow mesh and the shadows mesh axis) this causes problems with alpha objects (DX7 problem maybe) as they are not sorted by Z order but by their world positions.