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


Submitted by Gerald Filimonov, posted on March 06, 2001




Image Description, by Gerald Filimonov



Heres a screenshot of my current engine ive been working on for the past year or so.

The core of the engine is based on a BSP tree, and the geometry is imported from .map files that are generated by Worldcraft. Ive written my own set of tools that parse the .map files, create faces for all the brushes, remove all the illegal geometry (i.e. faces that are in solid space, overlapping faces, etc...), calculate the BSP tree and finally perform lighting calculations using simple point lights.

I still have a quite a bit of work to do culling more geometry out of the data set by removing all the faces that are outside of the level, but once i get some code to generate portals this should be a trival task. Once all that is done ill start working on code to generate a PVS and use it to render the scene rather than traversing the bsp tree each frame.

The rendering portion of the engine isn't very optimized right now, and for a reason. Currently im focusing on getting the core engine stuff working, things such as the BSP/PVS code, a better lighting model which may include a switch to radiosity, and collision detection. I did run a small benchmark on the engine running on a P3-1Ghz/Geforce2 setup and i got 160fps with the level shown here (around 900 polys). I expect that once I do rewrite the rendering engine ill get at least 500fps or so. I may in the future release a demo, once i fix up the code to work on various graphics cards other than nvidia's.

This engine is being developed to handle the indoor dungeon scenes for a Everquest type game im working on.

-=[ Megahertz ]=-


[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.
 
var

March 06, 2001, 09:49 AM

Nice shot! What do you mean by "lighting calculations"? Do you generate lightmaps? Or do you use vertex lighting?

 
L.e.Denninger

March 06, 2001, 10:09 AM

900 polys.... ugh :)

You really should up your polycount for your maps.. :)
The eyeballs of a game-character together already have more than 900 polys :)

 
Dominic

March 06, 2001, 10:13 AM

Looks very promising! It's quite atmospheric... but beware collision detection! It may be easier in your situation where you have a tree for grouping objects, but in my app. it's the biggest bottleneck.

But I agree with your approach of leaving optimization til *last*, and getting the core functionality in first. Just don't under-estimate collision detection :)

 
Vorteks

March 06, 2001, 10:42 AM

Very interesting shot. Looks kinda futurisitc for an EverQuest-style game. If you are using a pregenerated BSP tree for your maps, how are you sorting the character's polygons?

 
darkyoda

March 06, 2001, 11:18 AM

var : it looks like its a lightmap if u look at the wall on the left, u see a brighter circle traced out by some shadow line. i'd say its a lightmap, and it looks like its pretty detailed lightmapping (i'd guess 2^8 by 2^8)

Denninger : todays game characters aren't using more than 16 polygons for their eyeballs, even orbb hasn't more than 150 i'd guess (plz correct me if im wrong).i don't think that even doom3 will have 900 polygons for the eyeball. i'd guess the average polygon count for a q3 model is between 2k and 3k polygons. And look at the Q3maps, if your turn your off curved surface tesselation, u won't have that many polygons. the textures add a lot more detail to objects than any gemometry that can currently be rendered realtime (even geforce3's polygon fillrate isn't that high, the biggest gain in visual quality is done by per pixel effects, like EMBM and per pixel lighting).

Gerald, when i first looked at this shot, it looked like some shot from QuakeWorld, maybe the dark, brownish atmosphere and polygon count is pretty similiar to Q1. maybe you should try to make some bigger areals with higher polygon count since some engines can handle these scene better/not so good.

cu,hf and keep on good codin' !

 
Jrz

March 06, 2001, 12:00 PM

Doh, he was being LED, errr I mean sarcastic

 
morgan

March 06, 2001, 12:15 PM

I'm pushing 32k polys at a GeForce at 85fps on a PII-- that's a relatively low end setup and makes a reasonable target polygon rate.

 
Mattman

March 06, 2001, 12:28 PM

I can barely see the image

 
Revolver

March 06, 2001, 12:49 PM

I can see it just fine, but at work and at home.

 
Revolver

March 06, 2001, 12:49 PM

But = Both

=)

 
[-WD40-]

March 06, 2001, 12:52 PM

What's great is that he actually managed to do what he wanted to do with his engine. It's not an old technology btw, Quake 3 hasn't evolved much since Quake 1 in term of the engine "structure"...still uses portal rendering maybe coupled with a bsp tree (or many like one for each portal?).

You're right though that this technology is kinda old because it has been overused in the past few years and personnaly I'm getting sick of all those FPS games using the same static technology...Red Faction looks promising for that it has a sort of dynamic "portal" engine.

I miss games with huge landscapes like Drakan for instance

Just my thoughts, still, good job and keep up the work

 
Jacko

March 06, 2001, 12:54 PM

I find that many 3D engines are concentrating more on technology. The BSP renderer is a fast and very simple to use system and if you use this for polygon rendering and use the extra power of your machine to concentrate on effects and lighting. As what was mentioned before Q3A maps are rellatively low level and they look fantatsic becuase of the texture quality and effects quality being used.

 
maddoc

March 06, 2001, 01:10 PM

Next Time I sent a pic of a Quake 2 Level as my IOTD
=)
No what I really mean is wow! and you have done all this by your own??

I know nobody who is able to code his/her own Quake 2
Engine.
That means I know nobody that finishs the engine because it's a hard piece of work


so and finally

k33p 0N c0DiNG

 
cHuNkY

March 06, 2001, 01:16 PM

Nice shot! Why aren't more people using quake .MAP files to prototype their engines? The editors are free, export only the information needed for static geometry and the plane format's perfect for generating BSPs. My engine (http://www.angelfire.com/geek/chunky/) also uses .MAP files as a data source :)

Keep up the good work!

 
STZ

March 06, 2001, 01:25 PM

... errr... do I see something ? it looks like doom..
octree should work EASILY
in indoor environments if u will follow my idea.
h e h.


 
NEGA

March 06, 2001, 01:45 PM

Dude, no matter what everybody says, old technology, blah, blah... This looks awsome, only for the fact that you coded it yourself. And I know its hard work cuz i gave up trying to code BSP trees, the right way, a while back ;)

One very important thing, please make it more lighted, i cant stress it enough on how many(all) other quake type engines look like crap cuz they're too dark. You may infact try to do it backwards, have an ambient well lit level, then apply static calculated shadowmaps, and use lightmaps (even on top of the shadow maps) to calculate only dynamic lights, makes it look more real i would think:)

 
L.e.Denninger

March 06, 2001, 01:53 PM

Jrz>Doh, he was being LED, errr I mean sarcastic

Youbetcha :)

>I know nobody who is able to code his/her own Quake 2 Engine.

Hmmm... Haven't looked for it either, have you..? ;)
Check any 3d-engines-list :)

> What the hell is so great about your engine ?

Damn, I've read the text at the IOTD twice now, but I still can't find the line that says his engine is great.
I must be blind I guess...

Well, finally someone who starts thinking before he starts coding!
No emphasis on optimization, all the attention to the design.
That's the way to go..!

 
Punchey

March 06, 2001, 03:14 PM

Look, marketing departments want whiz-bang eye-popping visuals and features. Gamers want fun. Sure, gamers like amazing next-generation rendering engines just as much as the next guy, but, IMHO as an avid gamer, there are ALOT of games that are good engines but not good games (Quake, etc.). And there are alot of mediocre engines but are GREAT games (Codename Eagle, Midtown Madness, Rainbow6, etc.). Why? Because they're just fun to play. I personally never found Quake to be very entertaining. It got very old. And as far as textures go, it was the most drab and boring thing I'd every played (and still have ever played). And how many people have written a Quake-like engine *SINGLE HANDEDLY*? I say that's an accomplishment and if you don't think so, go write a better one yourself and post your own IOTD and stop bitching.

But be sure and focus on gameplay itself. A good graphics engine will only get you so far. I've found that more often than not it is the aged engine that yields the most fun. Why? Probably because those who are busy developing the newest and most amazing graphics engines are too busy to write a good game that uses that engine. That's why you don't see the REALLY good stuff come out of an engine until it's already been out for a while. Perfect examples of this would be Half-Life which was based largely on the Quake I engine. And even from Half-Life came CounterStrike. Now there's a graphics engine that is aging! And yet CounterStrike is probably _the_ most played multiplayer game. Because it's FUN! And the most fun thing about playing Quake was not playing Quake. e.g. playing TCs and huge mods that used the Quake engine.

 
Scrambled Monkey

March 06, 2001, 04:11 PM

Glad to see that blatently insulting post removed...

Nice pic, it's looking good. About the lighting, I'm getting kinda tired of people complaining about screen shots the moment they see that it's dark. Have you ever seen the original Batman movie? Evil Dead 2? Alien? Dark sets are great in some cases at setting mood. I do agree however, in 3d engine test pics, dark scenes are kinda pointless, but in games sometimes it helps add atmosphere. So what if the third DOOM uses lots of browns and it's dark... Have you ever seen Saving Private Ryan? The colors were totally washed out/over-exposed looking, which was pretty disturbing in that opening scene... Also, the colors of the scenes in The Matrix that took place inside the matrix were almost totally devoid of blue. It's important to exaggerate colors/lighting to give a scene the proper mood. I guess some companies just copy the look of other games, but that's not always the case, so give it a second chance the next time you see a game screen shot that looks a bit dark and/or has a limited wash of colors.

About the pic, did you do the textures yourself? Also, are you doing anything to smooth out the shadows in the lightmaps? Looks cool, keep it up!
Dan

 
Jukka Liimatta

March 06, 2001, 04:14 PM

I am arrogant, annoying and most of the time very very unfriendly person. I try not to write when don't have anything constructive or positive to say, but...

900 triangles on 1GHZ P3 + GeForce2 !?!?!?

That's all I had to say for today. ;-)


Now I feel really bad. But honestly, one should be able to run 100,000 (!) triangle scenes smoothly. Perhaps there is massive overhead somewhere, the BSP code, or the code changes texture, etc. per triangle? Even so, it should be a bit faster. Fillrate limited? 160fps seems to indicate it is so-- I hope it is. ;-)

Sorry again for negative comment, I have the least right to say anything in case anyone wonders what I have done myself. =)

 
Punchey

March 06, 2001, 04:56 PM

Perhaps he meant that there were only 900 polys _visible_ in the screenshot but because he has not yet optimized at all he's actually passing all the geometry trough the pipeline. I definately got the impression that he has yet to do some good culling so I'd bet this low FPS is due to that. I doubt very much that he's only able to actually PASS 900 polys at that FPS. I think that's just what's in the screenshot. I could be wrong though.

 
DirtyPunk

March 06, 2001, 05:10 PM

But the Ninja Turtles movies also had such dark atmosphere. Especially the later ones :)

Still, Megahertz is doing pretty damn well - And this man is even a recovering EverCrack addict :)

 
iMalc

March 06, 2001, 05:20 PM

Really? Collision detection is your biggest bottleneck? You should be able to fix that. Bounding boxes/spheres, quad/octrees, generating a simpler set of faces just for collision detection.

 
STZ

March 06, 2001, 05:29 PM

for scrambled:

"Nice pic, it's looking good. About the lighting, I'm getting kinda tired of people complaining about screen shots the moment they see that it's dark. "

If it's dark, it should be lack of understanding whats suitable for game and what is not good. People wants to see what is going on in the screen, so they should be able to do it.
It's nothing strange ?

"Have you ever seen the original Batman movie? "
Who said that original Batman movie is perfect ? Are u thinking that famous thing MUST be perfect ? In some places there can be flows.

I hate when some really silly people say : oh, it's cool, cuz it is used in original batman movie !! hehe

Don't be so stupid and dumb

sorry this time I said the truth, you may blame me, but it's truth.
People who thinks like that are not creative enough or can't see the difference between the bad and good.

Prove that I'm wrong ... hehe

 
Warren Marshall

March 06, 2001, 05:34 PM

On the front of your monitor is a control called "Brightness" and another one called "Contrast". Try playing with them. :)

 
Warren Marshall

March 06, 2001, 05:38 PM

"900 triangles on 1GHZ P3 + GeForce2 !?!?!?

That's all I had to say for today. ;-)"

So what? Why does an IOTD have to show millions of polygons to be impressive?

He's coding an engine on his own and this is how far he's gotten so far. That's impressive.

 
STZ

March 06, 2001, 05:38 PM

suggestion: try to spot bad places in every kind of game and do not think that it's fully perfect. It's no perfect games as well as other things in the world.
So my suggestion: open your eyes more widely !
--
Why I mentioned it ? That's cuz this is very common error. It let's u learn more, but at the same time can limit your creativity and you should find balance between it.
And why BSP was developed by philosopher ? Strange ? It's nothing strange. Cuz you can't find many ideas looking just at bytes. Monkey can learn, but hardly can create something. We should be higher than that level. At least some of us :)
I have whole philosophy about it, and I posted, cuz I finally get sick from your common flows.
Sorryy again.
heh

 
Phil Carlisle

March 06, 2001, 05:39 PM

Sheesh, something sparked a riot in here :))

Nice work Gerald, I was just curious why you dont actually go for using the .bsp format over the .map? If your going to do bsp/pvs anyway, wouldnt it make sense to use the whole toolset (worldcraft and arrgrad or whatever radiosity).

Basically, most of the work is in making usable tools for 3D (IMHO), so if your using the tool to produce the map, why not use the tool to produce the final thing and work with thier bsp/pvs format?

Of course, that means you look very similar to whatever else renders the particular format.

I can understand if you are trying to do something like your own radiosity process (which you mentioned, and which I hope I get time to try myself), because it will mean that you can try increasing the lightmap resolution (I hate quake style lightmap res's :))

Phil.

 
Revolver

March 06, 2001, 05:46 PM

You totally lost me. In any case, I'll reiterate what's been said:

Dark scenes can build atmosphere. Somehow, seeing a zombie stumble through daisies in broad daylight just isn't as scary as in some dark dank corridor.

 
bit64

March 06, 2001, 06:06 PM

Sweet. So you are only doing the indoor stuff? What happens when the player steps outside? Just curios, I like your screenshot. I odnt know what those dudes are talking about it beng too dark. I've seen mario brothers get darker than that.
Keep posting.

 
This thread contains 59 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.