| Author |
Message |
lucius DarkXL Developer

Joined: 17 Feb 2008
|
Posted: Oct 19, 2008 22:43 Post subject: DarkXL Update - Final Portal Solution and Upcoming New Build |
|
|
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
|
Posted: Oct 19, 2008 23:14 Post subject: |
|
|
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.
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

Joined: 17 Feb 2008
|
Posted: Oct 19, 2008 23:22 Post subject: |
|
|
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. 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

Joined: 17 Feb 2008
|
Posted: Oct 19, 2008 23:27 Post subject: |
|
|
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.
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. 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
|
Posted: Oct 20, 2008 00:14 Post subject: |
|
|
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

Joined: 17 Feb 2008
|
|
lucius DarkXL Developer

Joined: 17 Feb 2008
|
|
Burning Gundam Kell Dragon
Joined: 28 Sep 2003
|
Posted: Oct 20, 2008 00:34 Post subject: |
|
|
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 
_________________ I don't think outside the box... I customize it. |
|
sheepandshepherd Trandoshan
Joined: 01 Apr 2008
|
Posted: Oct 20, 2008 01:27 Post subject: |
|
|
Well, I'm certainly perplexed 
|
|
Ryuichi91 Ree-Yees
Joined: 06 Aug 2007
|
Posted: Oct 20, 2008 21:31 Post subject: |
|
|
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

Joined: 17 Feb 2008
|
|
sheepandshepherd Trandoshan
Joined: 01 Apr 2008
|
Posted: Oct 20, 2008 22:04 Post subject: |
|
|
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

Joined: 17 Feb 2008
|
|
Emon Ree-Yees
Joined: 10 Aug 2007
|
Posted: Oct 21, 2008 00:05 Post subject: |
|
|
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
|
Posted: Oct 21, 2008 19:46 Post subject: |
|
|
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
|
|
lucius DarkXL Developer

Joined: 17 Feb 2008
|
Posted: Oct 21, 2008 23:03 Post subject: All the levels are working! |
|
|
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.
***WARNING: Lots of screenshots***

_________________ DarkXL....http://darkxl.wordpress.com |
|
sheepandshepherd Trandoshan
Joined: 01 Apr 2008
|
Posted: Oct 21, 2008 23:15 Post subject: |
|
|
Nice . . . I can't wait
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
|
Posted: Oct 22, 2008 00:34 Post subject: |
|
|
WOAH!! Awesome looking stuff.
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
|
Posted: Oct 22, 2008 01:06 Post subject: |
|
|
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 
|
|
BlazingPhoenix Ree-Yees
Joined: 22 Mar 2008
|
Posted: Oct 22, 2008 01:27 Post subject: |
|
|
Awesome! I definitely can't wait for this build.
|
|
lucius DarkXL Developer

Joined: 17 Feb 2008
|
Posted: Oct 22, 2008 02:00 Post subject: |
|
|
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 
More accurately, the colormap stuff hasn't been implemented yet. Real fog will probably be an extended feature though. 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
|
Posted: Oct 22, 2008 03:13 Post subject: |
|
|
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
|
Posted: Oct 22, 2008 11:32 Post subject: |
|
|
Beautiful
_________________ *ZaP* |
|
GreggD Gamorrean
Joined: 05 May 2008
|
|
Taton Trandoshan
Joined: 25 Sep 2003
|
Posted: Oct 24, 2008 04:22 Post subject: |
|
|
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
|
Posted: Oct 24, 2008 09:21 Post subject: |
|
|
Holy cow, it's even worse on the other side:
Not being even an amateur level maker, I probably never would've noticed.
Did they use this thing as a palette?
|
|
Magic_Al Gamorrean
Joined: 22 Mar 2005
|
Posted: Oct 25, 2008 01:52 Post subject: |
|
|
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

Joined: 17 Feb 2008
|
Posted: Oct 25, 2008 07:02 Post subject: |
|
|
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. 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
|
Posted: Oct 25, 2008 18:06 Post subject: |
|
|
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. |
|
|