Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Fog problem

Author
Message
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 8th May 2005 11:48
hey all,
Im trying out fog, and i cant get it to be consistent in every direction, so when you face one direction everything but objects are that color, but when you turn it less fog but still looks bad, ill post a screenshot.

when turned


when straight


Video games…they can take you places unreachable, impossible, unfeasible. They put you in the book...they put you in the movie...they put you in a world, a world that before could only be imagined.
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 8th May 2005 19:07
SET OBJECT Object Number, Wire, Transparent, Cull, Filter, Light, Fog, Ambient

set ALL your objects to be affected by fog
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 8th May 2005 19:50 Edited at: 8th May 2005 20:22
fog isn`t consistent in realtime rendering, thats why some games like RTCW have radial fog as a feature in the settings for those cards that support it, fog is actualy a hack, you can see further on the diagonals than you can straight ahead on many graphics cards (at least I assume this is what you are talking about), it`s the way the effect is applied to the scene (see links).

http://www.theforumz.com/forumz/glossary.php?s=391a9b4a9d5ef6f747c3ed46171fdf86<r=R

or more detailed (scroll down to fog comparison..C knowledge beneficial)

http://download.nvidia.com/developer/SDK/Individual_Samples/samples.html

Mentor

PC1:XP, P4 3ghz, 1gig mem, 3x160gig hd`s, Radeon 9800pro, 6 way sound.
PC2: Linux, AMD 2ghz, 512mb ram, Nvidia GeForce4mx, 16 bit SB.
PC3: XP, laptop, intel 2.6ghz celeron, ATI 9000igp, 256mb
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 9th May 2005 01:36
Quote: "set ALL your objects to be affected by fog "

So i have to go through and do that for every single one of my 100+ objects?

So isnt there a simple way just to make fog, ive seen code snippets, i cant find them now, could u just give me code with a matrix, and a box, with fog?

Video games…they can take you places unreachable, impossible, unfeasible. They put you in the book...they put you in the movie...they put you in a world, a world that before could only be imagined.
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 9th May 2005 02:37
you could texture lots of objects with a smokey texture and make them hover about infront of the camera



"Well, if he dies, it'll teach him not to do it again." - Me
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 9th May 2005 02:56
yeah, but i want it to be partially transparent

Video games…they can take you places unreachable, impossible, unfeasible. They put you in the book...they put you in the movie...they put you in a world, a world that before could only be imagined.
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 9th May 2005 04:25
Quote: "So i have to go through and do that for every single one of my 100+ objects? "


it`s not that hard....




not sure what you want here, but you didn`t seem to be interested in what I posted so I guess you are on about something else.

Mentor.

PC1:XP, P4 3ghz, 1gig mem, 3x160gig hd`s, Radeon 9800pro, 6 way sound.
PC2: Linux, AMD 2ghz, 512mb ram, Nvidia GeForce4mx, 16 bit SB.
PC3: XP, laptop, intel 2.6ghz celeron, ATI 9000igp, 256mb
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 9th May 2005 08:53
Quote: "not sure what you want here, but you didn`t seem to be interested in what I posted so I guess you are on about something else."

ahh...no sry, i just didnt understand what those websites had to do with fogging in DBP.

And thanks, i didnt think of doing the code snippet that way.

Video games…they can take you places unreachable, impossible, unfeasible. They put you in the book...they put you in the movie...they put you in a world, a world that before could only be imagined.
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 24th May 2005 11:42
ok, ive got the fog working, but the whole point of it is not to draw objects beyond it, increasing the framerate. My current camera range is 10,000, but when i try to set it low, like 100, even though the fog distance is only at 50, you can still tell, its wierd. heres some screens:

With camera range at 1000 and fog at 50


With camera range at 10000 and fog at 50



its wierd, the fog doesnt go upwards when the camera range is set low, even though the fog should cover it up so you wont notice. Any ideas how to fix this?

Video games…they take you places unreachable, unfeasible. Putting you in the book...putting you in the movie...putting you in a world, that before could only be imagined. expage.com/piratesmainpage.
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 24th May 2005 11:47 Edited at: 24th May 2005 11:53
Ah, I think your confusing "fog" with "fog".

Meaning, your thinking of "fog" as "clouds". Don't to that. Fog in the comptuer world of DarkBasic is excatly like how you have your screen shots. Think of fog as you are in the center of the universe and all directions from your point of origin, fog is a set distance away. So no matter which way you look, the fog is x units away.

If you are wanting "clouds", let us know.

[EDIT]
I just re-read what your trying to accomplish. Let me see if I can put an example together for you. There is another trick you can do with a sphere, whereas you are inside the sphere and you texture your sphere with a "fog" graphic.

-This...is my boomstick!
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 26th May 2005 13:21
Quote: "Meaning, your thinking of "fog" as "clouds". Don't to that. Fog in the comptuer world of DarkBasic is excatly like how you have your screen shots. Think of fog as you are in the center of the universe and all directions from your point of origin, fog is a set distance away. So no matter which way you look, the fog is x units away."

yeah, thats what i want, the point of the fog is to cover up the objects that are not drawn after a certain distance, increaing the FPS.


Quote: "I just re-read what your trying to accomplish. Let me see if I can put an example together for you. There is another trick you can do with a sphere, whereas you are inside the sphere and you texture your sphere with a "fog" graphic."

no offense...but i think u forgot about me .

Video games…they take you places unreachable, unfeasible. Putting you in the book...putting you in the movie...putting you in a world, that before could only be imagined. expage.com/piratesmainpage.
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 27th May 2005 08:04
anyone please?

Video games…they take you places unreachable, unfeasible. Putting you in the book...putting you in the movie...putting you in a world, that before could only be imagined. expage.com/piratesmainpage.
Squids Revenge
20
Years of Service
User Offline
Joined: 19th Jul 2004
Location: Washington
Posted: 27th May 2005 11:31
I'll try too help.
Be back soon, gotta research it.


Click sig > Look around > Go to forums!!!

Squids Revenge
20
Years of Service
User Offline
Joined: 19th Jul 2004
Location: Washington
Posted: 27th May 2005 11:42
Ok,
Quote: "if fog available()=1 then fog on : fog color <fog color> : fog distance <fog distance>
"



Click sig > Look around > Go to forums!!!

Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 27th May 2005 11:54
umm...what? lol.

Video games…they take you places unreachable, unfeasible. Putting you in the book...putting you in the movie...putting you in a world, that before could only be imagined. expage.com/piratesmainpage.
Squids Revenge
20
Years of Service
User Offline
Joined: 19th Jul 2004
Location: Washington
Posted: 27th May 2005 11:56 Edited at: 27th May 2005 11:57
Quote: " umm...what? lol."

That is code too make fog. It will cover up whatever is passed the fog distance.
It will save you from haveing too use the other fog thing on all your 100+ objects.


Click sig > Look around > Go to forums!!!

Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 27th May 2005 12:02
o, ok, hehe, thanks, ill try it out

Video games…they take you places unreachable, unfeasible. Putting you in the book...putting you in the movie...putting you in a world, that before could only be imagined. expage.com/piratesmainpage.
Squids Revenge
20
Years of Service
User Offline
Joined: 19th Jul 2004
Location: Washington
Posted: 8th Jun 2005 09:46
Ok.


Click sig > Look around > Go to forums!!!

waffle
22
Years of Service
User Offline
Joined: 9th Sep 2002
Location: Western USA
Posted: 8th Jun 2005 14:15
I see a few problems there ...

The blue that comes through:
That's what you get at the clipping range of the camera.
One way to fix that is with a backdrop. But sometimes that doesn't work either. Set the backdrop to the color of your fog.

The purpose of the fog is to hide objects before they are clipped.
Objects are then clipped at the camera range. So, if fog is at 50,
the camera clipping should be about 100 or so. But, sometimes, the backdrop color will come through and be rendered to the screen when the camera range gets clipped. Another solution is to create a large sphere that's located at the current camera position. This sphere has a radius just less than the camera clip range; so that it is always rendered, but is fogged up by being past the fog range. This will prevent the backdrop color from being rendered during camera clipping.

I hope this explains the blue you see, and why adjusting the fog and the camera causes wierd effects. You might also try setting fog to 25 or less with such a close clipping range.
the fake Mr T
19
Years of Service
User Offline
Joined: 6th Jun 2005
Location:
Posted: 14th Jun 2005 20:01
why not just change the draw distance?

Login to post a reply

Server time is: 2024-09-23 21:19:57
Your offset time is: 2024-09-23 21:19:57