DF-21 Forums Forum Index DF-21 Forums
The Dark Forces Community
 
DF-21.net Home | FAQ | Search | Memberlist  | Register 
Profile | Log in to check your private messages | Log in

DarkXL Update - Final Portal Solution and Upcoming New Build
Goto page 1, 2  Next
 
Post new topic   Reply to topic    DF-21 Forums Forum Index -> DarkXL News
View previous topic :: View next topic  
Author Message
lucius
DarkXL Developer
DarkXL Developer

Joined: 17 Feb 2008

PostPosted: Oct 19, 2008 22:43    Post subject: DarkXL Update - Final Portal Solution and Upcoming New Build View user's profile Send private message Send e-mail Reply with quote

Background
As you may have read I've been working on getting the portal system to cull and clip geometry (and other portals) correctly to handle complex tesselations and "impossible" geometry in DF robustly (for example see Perplexion). This type of geometry is used everywhere (although its usually subtle) so it must work for any number of portals. This wasn't being handled properly before, which is why you'd have geometry rendering glitches in various levels.

Anyway, my initial attempt at this was to do the portal clipping on the GPU using the zbuffer and stencil buffer. While this did work for the most part there were a few problems. Once problem is when portals were clipped by the near plane - this one is very problematic to fix in all cases robustly. The second problem was actually performance, not GPU performance ( no problem there:) ) or even CPU performance but CPU->Driver->GPU performance due to the excessive number of state changes that were required. The problem here is that it's not really possible to optimize this case very much (other then just having a faster CPU). So I redid the entire system in a completely different direction - which is almost complete.

The new system
The new system employs software portal clipping. Basically you start with the sector the camera is in (if there is one) with the fullscreen frustum. Any visible portals (those facing toward the camera and partially intersecting the frustum) are then clipped to the frustum. It then generates frustums for each of those clipped portals and precedes recursively through the new frustums. As its going it stores a list of sectors visible, along with the frustums and portal polygons through which they are visible.

Finally at render time the list is walked through sequentially (its automatically ordered correctly) from back to front. For each visible sector/portal pair it renders the clipped geometry (including objects) and then renders the portal into the zbuffer (with transparent/translucent texture if there is one - like handrails for example). The reason this is done is so that when the parent sector is rendered, it does not overwrite the contents of the child (think of two overlapping sectors where one is partially visible through a portal).

The next build
The next build should render all the sector geometry correctly in every level... So I will allow every Dark Forces level to be played through a command line that will unlock them all. The INF may not be complete and certainly some logics will be missing - but it should all render correctly. In addition I'll have people test the mods - including complex mods like DT1 - DT4 - and make sure that everything renders correctly. As I've mentioned before objects will be sorted properly so no more dark edges. In addition this system allows for much simpler tessellations - so complex sectors that failed before will now work correctly.

The future
For the next set of builds I will be completing each additional feature group (such as INF, logics, etc.), until every level is playable. For various reasons I will no longer be working on features a level at a time and have switched to a more "wholistic" approach.

Portal clipping screenshots
Here are some screenshots of the portal clipping in action:







As usual any comments are welcome.

_________________
DarkXL....http://darkxl.wordpress.com

Gez
Gamorrean

Joined: 05 May 2008

PostPosted: Oct 19, 2008 23:14    Post subject: View user's profile Send private message Reply with quote

I don't know enough about the technical points to make non-inane comments but since the forum isn't very active I'll post just to say I'm following this project with interest and it's nice to see it making progress. Smile

Now for inane comments.
You mention "impossible" geometry... Is it possible to have recursive portals, and if so what happens? For example, taking a simple room with two windows, A and B...
Code:

 _________
 |       |
 A       B
 |       |
 ---------

What happen if I try to make it so that looking through B allows to peek through A?


Also, speaking of portals, are they always vertical window or is it possible to have horizontal windows as well (such as ZDoom's "stacked sectors")?

lucius
DarkXL Developer
DarkXL Developer

Joined: 17 Feb 2008

PostPosted: Oct 19, 2008 23:22    Post subject: View user's profile Send private message Send e-mail Reply with quote

Just to hammer the point home, here are some screenshots of perplexion which shows why this system is needed and what you can do with it.Smile Note this level is one of the Showcase levels for DF, although the portal actually HOMs when not close enough in vanilla DF but here it is always clear (no HOMing). Every adjoin may be like this, it can't be limited to a small set (like newer games) because of the way its used in some DF levels.







_________________
DarkXL....http://darkxl.wordpress.com


Last edited by lucius on Oct 19, 2008 23:28; edited 1 time in total

lucius
DarkXL Developer
DarkXL Developer

Joined: 17 Feb 2008

PostPosted: Oct 19, 2008 23:27    Post subject: View user's profile Send private message Send e-mail Reply with quote

Gez wrote:
I don't know enough about the technical points to make non-inane comments but since the forum isn't very active I'll post just to say I'm following this project with interest and it's nice to see it making progress. Smile

Now for inane comments.
You mention "impossible" geometry... Is it possible to have recursive portals, and if so what happens? For example, taking a simple room with two windows, A and B...
Code:

 _________
 |       |
 A       B
 |       |
 ---------

What happen if I try to make it so that looking through B allows to peek through A?


Also, speaking of portals, are they always vertical window or is it possible to have horizontal windows as well (such as ZDoom's "stacked sectors")?



"Portal" or "Prey" style portals with transforms may be an extended feature, right now this stuff (above) is actually needed for DF.Smile Its pretty scary all the crazy things you can do in DF that didn't get implemented in newer engines for years.

By impossible geometry, I mean geometry that actually overlaps in 3D space but is disjoint in portal space (see my perplexion post above to see what I mean).

As for stacked sectors, this will be accomplished through vertical adjoins, similar to Outlaws - except with both top and bottom adjoins possible. This will be an extended feature obviously.

_________________
DarkXL....http://darkxl.wordpress.com

Tsophika
Gamorrean

Joined: 14 Jan 2008

PostPosted: Oct 20, 2008 00:14    Post subject: View user's profile Send private message Reply with quote

Long ago I exported JABSHIP to work on in Radiant. I know this overlapping is used in at least one place, a spiral staircase that leads to a level change.

lucius
DarkXL Developer
DarkXL Developer

Joined: 17 Feb 2008

PostPosted: Oct 20, 2008 00:18    Post subject: View user's profile Send private message Send e-mail Reply with quote

Tsophika wrote:
Long ago I exported JABSHIP to work on in Radiant. I know this overlapping is used in at least one place, a spiral staircase that leads to a level change.


Its used to some degree in almost every level, including Secbase. Smile

_________________
DarkXL....http://darkxl.wordpress.com

lucius
DarkXL Developer
DarkXL Developer

Joined: 17 Feb 2008

PostPosted: Oct 20, 2008 00:19    Post subject: View user's profile Send private message Send e-mail Reply with quote

A couple more cool Perplexion screenshots.




_________________
DarkXL....http://darkxl.wordpress.com

Burning Gundam
Kell Dragon

Joined: 28 Sep 2003

PostPosted: Oct 20, 2008 00:34    Post subject: View user's profile Send private message Send e-mail Reply with quote

You know, I was thinking to myself this morning "I haven't heard anything on DarkXL at all this week" and then I check the threads and a bounty of information has come about.

This is VERY good news, can't wait to check out the next build Very Happy

_________________
I don't think outside the box... I customize it.

sheepandshepherd
Trandoshan

Joined: 01 Apr 2008

PostPosted: Oct 20, 2008 01:27    Post subject: View user's profile Send private message Reply with quote

Well, I'm certainly perplexed Very Happy

Ryuichi91
Ree-Yees

Joined: 06 Aug 2007

PostPosted: Oct 20, 2008 21:31    Post subject: View user's profile Send private message Reply with quote

Amazing.. just simply amazing (Why can't Blood get this kind of awesome treatment. Sorry I know its off topic) Lucius by the next build will we be able to play any user made level (even though most of them won't work atm it's released)?

lucius
DarkXL Developer
DarkXL Developer

Joined: 17 Feb 2008

PostPosted: Oct 20, 2008 21:57    Post subject: View user's profile Send private message Send e-mail Reply with quote

Ryuichi91 wrote:
Amazing.. just simply amazing (Why can't Blood get this kind of awesome treatment. Sorry I know its off topic) Lucius by the next build will we be able to play any user made level (even though most of them won't work atm it's released)?


Yes. The mods should render correctly, although some mods may not function completely due to INF or logic issues. Once the rendering issues are complete I'll be hitting up those other areas to bring them to completion as well. Also you'll be able to play in all of the Dark Forces levels, although again there will be missing logics and other gameplay issues still.

_________________
DarkXL....http://darkxl.wordpress.com

sheepandshepherd
Trandoshan

Joined: 01 Apr 2008

PostPosted: Oct 20, 2008 22:04    Post subject: View user's profile Send private message Reply with quote

Speaking of missing logic . . . will all the original DF levels be beatable, or will there be keys or mission objects that aren't yet implemented? Also, are you planning on implementing all the weapons this upcoming build?

lucius
DarkXL Developer
DarkXL Developer

Joined: 17 Feb 2008

PostPosted: Oct 20, 2008 22:18    Post subject: View user's profile Send private message Send e-mail Reply with quote

sheepandshepherd wrote:
Speaking of missing logic . . . will all the original DF levels be beatable, or will there be keys or mission objects that aren't yet implemented? Also, are you planning on implementing all the weapons this upcoming build?


This build is all about fixing all the rendering issues. As I said above I'll deal with implementing the remaining logics, weapons, INF, etc. in future builds. So the levels will not be beatable (or probably not) but you can use cheats to look around the levels and make sure everything is being rendererd correctly.

The following builds will tackle those other areas.

As stated above:
lucius wrote:
Yes. The mods should render correctly, although some mods may not function completely due to INF or logic issues. Once the rendering issues are complete I'll be hitting up those other areas to bring them to completion as well. Also you'll be able to play in all of the Dark Forces levels, although again there will be missing logics and other gameplay issues still.



At any rate the levels will be beatable soon, I'm still shooting for pre-Thanksgiving.Smile

_________________
DarkXL....http://darkxl.wordpress.com

Emon
Ree-Yees

Joined: 10 Aug 2007

PostPosted: Oct 21, 2008 00:05    Post subject: View user's profile Send private message Reply with quote

This is fantastic. If I understand it correctly, what you're doing is similar to what Jedi Knight does. Except yours is probably more efficient... JK is known to get exceedingly slow with hundreds of adjoins in view (on modern hardware and a patch that increases the visible adjoin limit)... as I recall, the engine walked extra nodes that weren't necessary.

Overlapping sectors are awesome. You can do so many cool things that are just becoming popular in newer games.

GreggD
Gamorrean

Joined: 05 May 2008

PostPosted: Oct 21, 2008 19:46    Post subject: View user's profile Send private message Reply with quote

Holy cow, if I can play the whole game like this before Thanksgiving...That would be nice...

_________________
----------------------------------------
"If they were created by man, then we can solve them by man." -Tim Sabien

sheepandshepherd
Trandoshan

Joined: 01 Apr 2008

PostPosted: Oct 21, 2008 21:42    Post subject: View user's profile Send private message Reply with quote

GreggD wrote:
Holy cow, if I can play the whole game like this before Thanksgiving...That would be nice...


In other words, lucius and his super-fast progress are AMAZING Razz

lucius
DarkXL Developer
DarkXL Developer

Joined: 17 Feb 2008

PostPosted: Oct 21, 2008 23:03    Post subject: All the levels are working! View user's profile Send private message Send e-mail Reply with quote

Here are lots of random screenshots from various unreleased levels in the game. Note that all the levels are currently working and every sector can now be tessellated (including sectors with overlapping vertices). There are some issues to be fixed and optimizations to be done - but the build should be done soon and you can see the levels for yourselves. Smile

***WARNING: Lots of screenshots***

































_________________
DarkXL....http://darkxl.wordpress.com

sheepandshepherd
Trandoshan

Joined: 01 Apr 2008

PostPosted: Oct 21, 2008 23:15    Post subject: View user's profile Send private message Reply with quote

Nice . . . I can't wait Smile
I'm really not used to being able to see all the textures so clear from so far away, that's pretty awesome.
Is it just my imagination or is the sky BM in the Imperial City screenshot a little stretched? If it is, I'll report it in Codeplex for the future builds. I just wasn't 100% sure, I haven't played the level in a while.

Burning Gundam
Kell Dragon

Joined: 28 Sep 2003

PostPosted: Oct 22, 2008 00:34    Post subject: View user's profile Send private message Send e-mail Reply with quote

WOAH!! Awesome looking stuff. Very Happy

I've never seen Gromas look so vivid in color, I'm really excited now.

Oh, by the way. How do you load mods in the new build? I can't find the area to put the command line in anywhere. Or maybe it's somewhere obvious and I'm just blind. I wanted to possibly get some screenies in on my projects.

_________________
I don't think outside the box... I customize it.

sheepandshepherd
Trandoshan

Joined: 01 Apr 2008

PostPosted: Oct 22, 2008 01:06    Post subject: View user's profile Send private message Reply with quote

Ehh, I think Gromas looks vivid because the red fog isn't implemented.
Load the level the same way you did in DF . . . make a BAT file, type DarkXL.exe -u_____.gob, and run it. Unfortunately, until the next build comes out, you can only play custom levels that replace Secbase-Testbase levels. Good luck getting past the crippling sector bug though lol Razz

BlazingPhoenix
Ree-Yees

Joined: 22 Mar 2008

PostPosted: Oct 22, 2008 01:27    Post subject: View user's profile Send private message Send e-mail Reply with quote

Awesome! I definitely can't wait for this build.

lucius
DarkXL Developer
DarkXL Developer

Joined: 17 Feb 2008

PostPosted: Oct 22, 2008 02:00    Post subject: View user's profile Send private message Send e-mail Reply with quote

sheepandshepherd wrote:
Ehh, I think Gromas looks vivid because the red fog isn't implemented.
Load the level the same way you did in DF . . . make a BAT file, type DarkXL.exe -u_____.gob, and run it. Unfortunately, until the next build comes out, you can only play custom levels that replace Secbase-Testbase levels. Good luck getting past the crippling sector bug though lol Razz


More accurately, the colormap stuff hasn't been implemented yet. Real fog will probably be an extended feature though. Smile As for the running you're own mods, like sheepandshepherd said, you just use the DF style command line. You can make a batch file, run it from the command prompt (still available even on Vista) or make a shortcut.

Let me know if you have trouble getting it to work. Also you can use the 'G' and 'F' key cheats to get past adjoins or fly for areas where the INF doesn't work properly (or you just want to see an area that isn't done yet).

_________________
DarkXL....http://darkxl.wordpress.com

C. Zoui
Ree-Yees

Joined: 03 Aug 2008

PostPosted: Oct 22, 2008 03:13    Post subject: View user's profile Send private message Reply with quote

Wow. I can't appreciate on a technical level what I am seeing here, but I do know that I like what I see. *thumbs up*

Marley
Gamorrean

Joined: 30 Sep 2003

PostPosted: Oct 22, 2008 11:32    Post subject: View user's profile Send private message Send e-mail Reply with quote

Beautiful

_________________
*ZaP*

GreggD
Gamorrean

Joined: 05 May 2008

PostPosted: Oct 23, 2008 21:53    Post subject: View user's profile Send private message Reply with quote

sheepandshepherd wrote:

I'm really not used to being able to see all the textures so clear from so far away, that's pretty awesome.

Dude, you know I had the same feeling when I first played eduke32. The original DOS version of Duke Nukem 3D was just like pretty much every other DOS FPS. They all had the darkness that hides the draw distance. With eduke32 (which I liken DarkXL to), everything is visible. EVERYTHING. Seriously, once you get over the initial shock, it's a great feeling.

_________________
----------------------------------------
"If they were created by man, then we can solve them by man." -Tim Sabien

Taton
Trandoshan

Joined: 25 Sep 2003

PostPosted: Oct 24, 2008 04:22    Post subject: View user's profile Send private message Send e-mail Reply with quote

Its funny looking at the second to last screen shot. An amateur level maker will turn bright red from a single improperly stitched texture, but the original game is full of more texturing errors than you can shake a stick at.

_________________
"A fight should be clean and elegant, without waste"
-Asuka Langley Sohryu, Evangelion

Weregoose
Gamorrean

Joined: 05 May 2008

PostPosted: Oct 24, 2008 09:21    Post subject: View user's profile Send private message Reply with quote

Holy cow, it's even worse on the other side:



Not being even an amateur level maker, I probably never would've noticed. Laughing

Did they use this thing as a palette?

Magic_Al
Gamorrean

Joined: 22 Mar 2005

PostPosted: Oct 25, 2008 01:52    Post subject: View user's profile Send private message Reply with quote

Coincidentally, the second-to-last screenshot in this batch is almost identical to the second-to-last screenshot in the batch released today by the Dark Forces Mod. http://www.lucasforums.com/showthread.php_t=193270

Back on-topic, I'm really looking forward to the next build!

_________________
----- MagicAl`s DARK FORCES Niche -----
http://homepage.mac.com/anewmanagn/magic_al/

Armed only with a blaster pistol and an intimate knowledge of
Imperial methods, MagicAl prepares to go to lunch....

lucius
DarkXL Developer
DarkXL Developer

Joined: 17 Feb 2008

PostPosted: Oct 25, 2008 07:02    Post subject: View user's profile Send private message Send e-mail Reply with quote

Magic_Al wrote:
Coincidentally, the second-to-last screenshot in this batch is almost identical to the second-to-last screenshot in the batch released today by the Dark Forces Mod. http://www.lucasforums.com/showthread.php_t=193270

Back on-topic, I'm really looking forward to the next build!


Pure coincidence I assure you. Smile Anyway thanks for the comments.

Burning Gundam, did you ever get DarkXL to load your mod?

_________________
DarkXL....http://darkxl.wordpress.com

Burning Gundam
Kell Dragon

Joined: 28 Sep 2003

PostPosted: Oct 25, 2008 18:06    Post subject: View user's profile Send private message Send e-mail Reply with quote

Haven't tried yet, I haven't done too much work since the asking it to merit doing so yet. But when I have a couple of areas built that look okay to me, I'll give it a go.

_________________
I don't think outside the box... I customize it.

Display posts from previous:   
Post new topic   Reply to topic    DF-21 Forums Forum Index -> DarkXL News All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group