Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Tom Vykruta, posted on January 07, 2001




Image Description, by Tom Vykruta



Volumetric fog example. Screenshot comes from Traveler's Quest, a free, persistent MMORPG mod based on Drakan (Riot Engine). This isn't "true" volumetric fog, it's something I threw in last night, works great for our engine and is much cheaper than defining true fog volumes.

Tom Vykruta


[prev]
Image of the Day Gallery
www.flipcode.com

[next]

 
Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
tcs

January 09, 2001, 03:39 AM

Hmmm... I have the feeling that this iotd stuff starts to get weird and off-topic all the time ;-)

Tim

 
Mace

January 09, 2001, 04:18 AM

Its always like this nowadays in the iotd section. "Some" ppl must really enjoy coming in here every day and insult the iotd images.
However, this is not how it used to be and most of these annoying ppl are newbie members of flipcode and probably kids too, that cant understand how a model with less than 10 000 polygons can be commented as "beautiful".

I have a suggestion for you... why not give the submitters some instead of those insults.

 
Mace

January 09, 2001, 04:20 AM

heh, some html error there.

should be constructive criticism

 
DrKappa

January 09, 2001, 06:20 AM

MCBaxton is right. The tree isn't correctly fogged.
Before another flame war starts on my first post ever, I'd like to explain my POV.
Do I have the right to offend someone else's work? No.
Do I have the right to say what I think about an IOTD? Yes.
(To say "I don't like it because..." it's different than to say "it sucks!")
Do people posting an IOTD need constructive criticism in order to get better and better and in order to start
a valuable discussion about algorithms used? I think yes.

I really like the image. IMHO RIOT engine is one of the most understimaed engines around.
As for the tree problem, the vertex approach is ways faster and surely some problems in special cases aren't
enough for rewriting the code. Looking at the trees it seem to me that they're quite complex
(not a simple triangle). If you notice, the trunk is correctly fogged, while leaves aren't.
It's really interesting to see this uncorrectly fogged tree. I'd expect a correct fog on a complex shape like this.
Maybe you're using some kind of optimization you didin't talked about... :) Bounding Box check? Objects are
managed differently than landscape? Does the fact that the tree is clipped affects the fog calculation?
I used a ray-tracing aproach for my old per-vertex volumetric fog, which was almost free using a precalculated
sqrt table. I used it because it allowed me to create fog volumes floating, but your constant-height fog is surely
faster.
Good shot, good work. I really like it.

 
Sergei Miloikov

January 09, 2001, 06:33 AM

Look at the post below - I think this IS definitely the way to speak here, even when you try to teach somebody how to post. Better shut up - because when we don't want to see comments like Baxton's, we definitely don't want to see such kind of replies man... it's boring...

 
flure

January 09, 2001, 06:58 AM

i think the tree isn't fogged just because it has been placed outside any 'fog areas' ... so it's only placing error, not something that has to do with the code or the algo ...

thus the discussion about the 'incorrect fogged tree' has (to my mind) nothing to do here, except if anyone says 'hey man i should have placed this tree inside a fog area, cause that's like it should have been placed in reality' (or, more correctly, to place a fog area _over_ the tree :) ...

ok, that was just a post to say nothing ...

 
Jean-Michel Hervé

January 09, 2001, 09:22 AM

Cool looking picture, even if I agree with MC BAXTON : the tree seems weird at the first look. But I guess it's a graphician probleme anyway :)

It's an interesting approach of volumetric fog, and I believe that it could be included in a 3D engine along with more standard volumetric fog, as an optimized version that graphician can choose, or the tool choose automatically for them.

Anyway, I would add something : the IOTD is here to show something, but not everyone HAS to like it. Of course it is better to give reasons, etc. The main aim is to see something new, or interesting, or special, or... and that everyone can learn from it... including the author. So, I don't believe it's a good thing to only allow post stating "wow", "wonderful", "incredible", "amazing" and so on. I don't care people just saying "wow", what's interesting is to see what people has to say about it : how it looks, realistic or not (even if it is not intended to be realistic), etc.

In this particular shot, I think that the landscape is not detailed enough, and, rather that criticize, I just ask : why don't you higher the number of polygons for the landscape?

(I hope I won't be flamed, it's not my point really :)

 
Dave

January 09, 2001, 10:14 AM

I think MC BRAXTON says negative things to get attention. Have you ever known someone who just likes to argue? Whether they are right or wrong? If we ignore him and he posts to himself all the time, he will have less satisfaction from his posts than the ones with replies calling him names. Although the fog isnt up to his standard, it was obviously an accomplishment to the author and peeked a few people's interest. I think it looks nice from where I'm standing. If people would ignore MC BRAXTON and not reply to his arrogant posts, he would either quit posting or not enjoy his own posts as much. Please join me in this boycott. And to the author of this IOTD, I commend you for your accomplishment. I'm sure there are others who'd like to know how you did it. I am definitely on that list.

 
XenoPhage

January 09, 2001, 10:56 AM

I think the fog looks very realistic. What I've noticed regarding the tree in the background is that the far tree appears to be clouded by the fog, as it should be. The closer tree appears to be clouded by the fog only at the base (trunk). This makes it look a little weird since you would expect that if the trunk is clouded up that high, then the lower branches would be as well.

However, this is something you would have to be looking for. At first glance, this scene looks very realistic. The fog effects are excellent.

Regarding the actual movement of the fog, is there any type of dispersal when the character is actually moving through the fog?

 
M.Knuth

January 09, 2001, 12:46 PM

There is a very easy way to create nice groundfog like this ...

simply calculate the distance from the viewplane to the vertexes, which you want to fog, scale it a little and name it "u".

name the hight of the vertex "v" and use (u,v) as texture coordinate of an alpha texture, which you create before as exp- lookuptable

( hardware fog is a 1 dimensional lookuptable , this oue is 2 dimensional, so you can have divverent foggin depending on the higth of the objekt)

the method is easy , an so it is very fast :)

have fun!




 
EGreg

January 09, 2001, 12:52 PM

The fog looks very nice. Am I right, and do you use convex fog volumes and simply calculate the distance of a vertex to the closest plane of the fog volume? That's what I would do, and it's very cheap and effective :-)

Oh, and baxton: It's a river, man, a river! Don't be so picky. Normally, fog goes over LAKES, and still water, but a river is also possible. Maybe it's mist from the water.

Anyway, it's the effect we're going for. Realism is never total in a game. Otehrwise, we would be able to smell stuff, too. And the trees would be as realistic as can be. Oh, and if you're going to make something ultrarealistic, make that girl naked and dancing close to the camera, please.

Sincerely,
Greg

 
MK42

January 09, 2001, 01:00 PM

Maybe he would pick out his eyes with something very sharp :) So he wouldn't bother us with another negative comment ...

I think MC needs to get an attitude adjustment. All this 'negative' criticism will never get him a paying job anywhere ... hmmm ... maybe that's why he is so picky ...

I can't wait for him to submit his next IOTD (he mentioned he submitted one already when bitching about mine). Boy, will I get picky with that one!

- MK42



 
EGreg

January 09, 2001, 01:16 PM

Oh, by the way, I geuss the method you must be using is different. I usually come up with things on my own, so what I said was not a standard method of doing stuff. But hey, I came up with most of my own techniques for my first engines. Clipping, texturemapping, etc. Some of them, I later figured out, were already being used :-)

Anyway, this is one of the things I just developed on my own. The reason I say it is different from yours, is: mine DOES allow packets of fog floating around in space :-)

-Greg

 
EGreg

January 09, 2001, 01:20 PM

Oh, and one more thing. I just thought about my method... when a guy (or that girl :) or actually the camera is standing IN the fog, you don't measure the distance to the fog volume plane, you measure the distance to the camera. Why? Well, because they are looking at it from the inside, so it gets foggier as they go further.
I would be guessing it's a square-of-the-distance function.

-Greg

 
EGreg

January 09, 2001, 01:37 PM

Oh, by the way, what I said is not entirely correct, because it is not the distance to the closest plane that counts.
( As you can see, I have thought about this off the top of my head. )
It is the distance along the ray from the vertex to the eye. Hehehe
The distance along that ray that is affected by fog, that is how much is affected. You can even have a ray go through two fog packets. (It would actually be more distorted than if the fog packets were combined, but that is entirely too complex, I think).

-Greg

 
Ogotay

January 09, 2001, 01:44 PM

Heh, I'd love to make a test: someone from a famous game development company, let's say ID for example, posts a pic of their newest not-yet-released game showing a kick-ass screenshot demonstrating some new kewl effect(s) - but all this under a fake name and description like "I am John Doe working on this engine in my spare time..." I bet people like MC BAXTON would still come and say how much it sucks and how much better they would do this themselves. ROFL ;) Hope somebody would do a similiar thing one day 'cause I'd love to laugh at all those I-KNOW-EVERYTHING-MUCH-BETTA-THAN-YA-ALL guys then. Whuahaha

 
EGreg

January 09, 2001, 01:46 PM

Whoo, I see moderation is here.
Let me just say, let's have moderation in moderation. Why not have the following system, Kurt:

Have about 10 people that visit flipcode.com over twice a day usually. Have them put a negative mark on a scale from 1-3 for each comment they would like to see removed (3 is strongly wanted, 1 is not strongly, just annoying). If it ever reaches past, say, 9, then then comment is removed.

Actually, this scale isn't very good, since you need 9 people which think the comment is annoying to remove it, but only 3 which think it's abusive. Hmm, maybe that's okay. But you could experiment with scales, say, 3-5 and limit 15, or some such. Then it's 5 people with annoying, and 3 with abusive :-)

-Greg

 
EGreg

January 09, 2001, 01:52 PM

Okay, never mind. There are many different fog approaches, and the usual good ones are bounding-box and sphere, sinc you don't have to test against all planes of convex volume, just two planes.

Anyway, here is pseudocode in general:

ray = vertex - eye
for each convex volume of fog
{
tempray = ray
for each plane in volume of fog
clip tempray to plane;
multiply length of tempray by density of fog, add to total
}
fog = total

actually, it's not really right, either, since AFAIK fog grows either exponentially or as square of distance... actually, darkness grows by square of distance... so fog must be exponential :-)

So do density ^ ||tempray|| rather than density*||tempray||

-Greg

 
Ogotay

January 09, 2001, 01:57 PM

Hey, I know as a simple visitor I have nothing to say about the organisational stuff ;)) but as a frequent visitor of Flipcode I like EGreg's moderation idea...

 
Ogotay

January 09, 2001, 02:01 PM

But I would extend EGreg's idea a bit (if I had the saying here lol ;) ). Let all registered users allow to vote if they find a post annoying (every visitor only once of course ;) ), and after reaching a certain amount of points a post would be removed?

 
Kurt Miller

January 09, 2001, 02:12 PM

If the comment forums really get that bad as to need a system so sophisticated where people actively participate in moderation circles all day, and really worry about this crap, than its likely the comment system will be removed. I'm not really interested in asking people to try to control a cloud of negativity on a site such as this one. That really shouldn't be neccesary imo...

 
Kurt Miller

January 09, 2001, 02:23 PM

"So, I don't believe it's a good thing to only allow post stating "wow", "wonderful", "incredible", "amazing" and so on. I don't care people just saying "wow", what's interesting is to see what people has to say about it : how it looks, realistic or not (even if it is not intended to be realistic), etc. "

To only allow "wow" posts is not the goal at all. Those can be pretty annoying too in large quantities. Criticism is definitely welcome. But there's a big difference between This simply sucks. and This might be a lot cooler if...

 
EGreg

January 09, 2001, 03:38 PM

I like Ogotay's idea! Anyone who is registered can vote to have the post removed

One little extension, maybe: And if the number of those who visit exceeds, for example, 40% of the readers of the forum page on which the comment is located, then it should be removed due to popular consensus :-)
Of course, it will be hard to know how many people view a page and then vote to remove comment, as opposed to those who view a page and vote to leave comment. I don't think this system tracks how many people call up a cgi script with certain parameters and how many people go on to click a link to remove a message on that page. But whatever, it is nice to imagine it; it would just be a democracy :)

I will stop rambling now,
Greg

 
Mark Friedenbach

January 09, 2001, 08:29 PM

That really shouldn't be neccesary imo...

I second that. I'd much rather go comment-less in the IOTD (and possibly other) forums than have to wade through hordes of negative and/or useless comments just to read something positive, uplifting, or on-topic.

 
treething

January 10, 2001, 12:45 PM

M.Knuth: Thats exactly the way ive done volume fog in the past. Worked pretty well for me too.:-) I was also trying to find a way of getting a D3D texture matrix to calculate u and v for me, so that it would possible be hardware-accelerated.

The image looks great by the way.:)

 
bit64

January 10, 2001, 04:13 PM

uhhh, hey I know, go to hell. And while you're there learn to communicate.

 
Eric Claeys

March 14, 2001, 05:02 PM

My Name is Eric Claeys

Basically, I do a lot of Modeling as a hobby in my spare time. I use 3D Studio Max R3 and Rhino 3D. I can basically create most anything in Rhino - given the time. Then I usually import the objects into 3DSMAX for rendering and modest animations. At the moment I can offer my services to whom ever needs them - drawing at home and uploading the models to an e-mail or whatever. If you would like an example I can send some pics or send me a request at Letsgetdrunker@collegeclub.com. Tell me exactly what you want, what format (supported by Rhino or 3DSMAX), and any other info (polygon count, texture, etc).

 
This thread contains 57 messages.
First Previous ( To view more messages, select a page: 0 1 ... out of 1) Next Last
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.