DIV ARENA FORUMS

Issues with M8 fogging

BreadCaster - 7-8-2017 at 09:18 AM

Hi all

So heres another question - or, I guess, a mode 8 complaint of mine. It's to do with mode 8 fogging/z fog.

Currently, if you have a wall with three vertices in, and mode 8 fogging turned on, it displays like in figure B in the attached image. The three separate sections of the wall end up being shaded seperately, which really breaks immersion if you've had to use a seperate section of wall in the middle. Say you've had to use the middle section of the wall to display some slime dripping from the ceiling, or a door graphic, etc - your only other solution is to load a huge texture and play around with it in the graphics editor.

Is there a way to get Mode 8 to instead display the fogging effect like in figure A? Perhaps something that checks when the wall is shaded if it is exactly parallel with the other walls connected to it, then shade it all as one wall?

It'd be great if it could. Some areas of my mode 8 experiments have had to have the fogging disabled entirely in some areas for this reason (because it looks so awful), and it doesnt help in generating a good atmosphere.

Hope there's a solution!


- BC



Mode8fog.jpg - 53kB

CicTec - 7-8-2017 at 10:02 AM

Hello BreadCaster,

For what I see, the only function that sets fog properties is SET_FOG, the function requires the starting and end point of coordinates to calculate the distance and the level of fogging introduction.

What values ​​do you use to calculate fog distance?
Have you tried to set the "initial value" to the position of the first vertex of the wall and the "final value" to the last vertex position?

BreadCaster - 7-8-2017 at 10:24 AM

Co-ordinates.... hmm. not as far as i understood, as far as Im aware you just enter in numbers that indicate how far the fog starts and ends from the mode 8 camera. I could try this out however - though not until I've got back onto my PC that can run Div (this macbook can't run DivDX/Div 2/Div).

CicTec - 7-8-2017 at 11:06 AM

Well, as coordinates I referred to the "position", the values ​​for the two parameters of the function vary from 0 to 100, according to these indications the level of the mist distribution

I've tried the following example (taken from DIV2 in Spanish):
Code:
PROGRAM ejemplo_set_fog; GLOBAL niebla; ángulo1; BEGIN load_fpg("HELP\WLD_VIEW.FPG"); load_wld("HELP\WLD_VIEW.WLD",0); start_mode8(id,0,0); ctype=c_m8; go_to_flag(0); FRAME; z+=128; LOOP niebla=25+get_distx(ángulo1,20); ángulo1+=5000; set_fog(niebla,niebla*2); // Establece el nivel de niebla del modo 8 FRAME; END END

The random volume of the fog is displayed within the mode8 region. According to this procedure, I think the engine calculates the fog for each wall/sector individually, probably to keep a better effect in perspective and depth (3D or pseudo-3D). Of course, it does not take into account the calculation of the adjacent wall/sectors for the fog, as a single entity, so I think it is more a question of planning limitation/implementation than of a bug.

I have not looked at the source code at this time to verify/confirm what I indicated, so I can not tell if it is possible to modify/improve this operation.

Currently I believe that the only solution is to create a unique wall.

CicTec - 7-8-2017 at 01:46 PM

One question, is the texture fade applied to the 3 adjacent walls always the same or changing?

You could try changing the texture's fading level (the closest ones have a higher value for it to be clearer, the farthest ones a darker value) and see if fogging can uniformize the effect as if it were a single wall.