Development Blah: Comments

All other topics around Descent and D2X-XL

Moderators: Frustikus, simX, Aus-RED-5

User avatar
Alter-Fox
Posts: 1132
Joined: Mon Mar 31, 2008 7:29 pm
Location: some other reality

Re: Development Blah: Comments

Postby Alter-Fox » Thu Jun 07, 2012 4:23 am

Tasty. Fear. WANT MORE!

Well I really want to say it. But it's totally pointless. Can I add something pointful too? Like a spike?

Mandatory on-topic section:

How exactly is the multi-cube tunnel generation going to work? I know that right now (unless it's been changed since the last time I used DLE) there is only one "current cube" and one "other cube". How is that going to be changed, or will it use another system entirely?
We live in a universe... It's distracting
=========================================================
beware of ounce
User avatar
Hawkins
Posts: 256
Joined: Wed Jan 11, 2012 1:18 pm
Location: /Universe/Milky-way/Sol/Earth/Europe/Greece/Athens/~

Re: Development Blah: Comments

Postby Hawkins » Thu Jun 07, 2012 5:03 am

marking elements* will do the trick probably

*sides in particular, with some checks on bad marking or auto/smart-adjacent side selection or some sort of robustness I fail to think at 8:03 am sleepless
Gigabyte® GA-X48-DQ6
Intel® Core 2™ Quad Q6600 @2.4GHz
ATi(AMD®) Radeon™ HD4870
________________________________________________________________________
Descent Rangers
Captain of Black Lions squadron
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Re: Development Blah: Comments

Postby karx11erx » Thu Jun 07, 2012 9:27 am

You will tag all sides you want the tunnel to extend from, and the current side must be one of that sides. The tunnel path is computed from the current side's to the the other side's center; so the "other" side's center will only serve as destination point of the tunnel. The tunnel end will not be connected to any segments nearby to avoid geometry distortions, leaving the level author any freedom to connect or extend it manually (or use the end as start of a second tunnel segment with different turn and twist angles).

Hawkins wrote:Scary.

Why? :think:
User avatar
Alter-Fox
Posts: 1132
Joined: Mon Mar 31, 2008 7:29 pm
Location: some other reality

Re: Development Blah: Comments

Postby Alter-Fox » Thu Jun 07, 2012 12:49 pm

Don't rationalize fear. It ruins the flavour, like when you burn soup.
We live in a universe... It's distracting
=========================================================
beware of ounce
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Re: Development Blah: Comments

Postby karx11erx » Thu Jun 07, 2012 3:48 pm

Alter-Fox,

you are increasingly posting pointless comments here. Please stop doing that.
User avatar
Hawkins
Posts: 256
Joined: Wed Jan 11, 2012 1:18 pm
Location: /Universe/Milky-way/Sol/Earth/Europe/Greece/Athens/~

Re: Development Blah: Comments

Postby Hawkins » Fri Jun 08, 2012 2:13 am

Kudos karx, the new generator is a charm as described. Cannot test it yet, since I have yet to resolve my driver issues to make DLE's OGL display properly, but I can take advantage of the spare time to really study how you form the cubes around the Bezier (if I understood correctly) and how that is handled in multi-side boundary conditions.
Gigabyte® GA-X48-DQ6
Intel® Core 2™ Quad Q6600 @2.4GHz
ATi(AMD®) Radeon™ HD4870
________________________________________________________________________
Descent Rangers
Captain of Black Lions squadron
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Re: Development Blah: Comments

Postby karx11erx » Fri Jun 08, 2012 8:36 am

I can briefly explain that.

First a path of reference points ("nodes") between the start and end point is created by use of a cubic bezier function (find a very good explanation of these on Wikipedia). Then a set of base vertices is computed by taking the vertices of all start sides and subtracting the tunnel start point from them (so now they are relative to the start point). Then the orientation (rotation) matrices for each path node are created. They are interpolated between the start and end node's orientations. These get computed from the start and end sides' normal (forward), the current edge (right) and their perpendicular vector (up). The end side's normal gets negated to point to the proper direction.

To determine the z rotation angle between the start and end orientations, the end orientation's x and y rotations are undone in relation to the start orientation by computing the angles between the two orientation matrices' z (forward) axes and rotating the end side's orientation matrix around the perpendicular vector of the start and end orientations' z axis. Now the start and end sides' forward vectors are identical (minus slight aberrations caused by limitiations in double floating point arithmetic), and the their z axis rotation ("twist") can be computed from the angle between their right axes.

The only problem remaining is to determine whether the rotation is clockwise or counter clockwise. To determine that, I rotate and twist the start matrix right vector back into the end position (by reversing the previous unrotation and applying the twist angle rotation). If the result of this transformation has a dot product > 0.999 with the end orientation's right vector, I am done. Otherwise I add the difference angle between the two to the twist angle.

Each path node orientation has two base parameters: The direction of its forward vector (here the vector of the previous to the next path node is used to smoothly average the angle of the perpendicular plane in regard to the forward vector) and the twist (angle around forward vector) relative to the start orientation. To interpolate a path node orientation, it's twist is computed by scaling the total twist with the quotient of the path length at that node and the total path length (twist * length / total_length). The required x and y rotations are done via a quaternion based rotation around a rotation axis which is perpendicular to the current path node's and the base side orientation's forward vectors and the angle between these two vectors. The base orientation's right and up vectors are rotated around this axis (the forward vector doesn't need to, since we have it already). Next, the local twist is applied by rotating the local up and right vectors around the forward vector by the current twist angle.

This yields a rotation matrix in the current coordinate system (based on the identity matrix) for each path node. To compute the cross section at each path node, the start vertices simply need to be rotated using these rotation matrixes (their inverse, to be precise). What remains to be done is to enter the proper vertex indices in each tunnel segment (which was quite straight forward with the data structures I have devised).
User avatar
pokeman7452
Posts: 589
Joined: Wed Oct 24, 2007 2:33 pm
Location: Northern VA, USA

Re: Development Blah: Comments

Postby pokeman7452 » Tue Jun 12, 2012 4:31 pm

If it's possible to explain the math problem in a way that does not require knowing the code, I bet someone could figure it out.
Laptop: (outdated)——————————————————————————————Desktop:
ASUS G72GXBBCDDDHLMPPPRTVWcdeefghimnoorruyz2 5 6 8000+-./()Newegged
Core 2 Duo (2.5Ghz)ABBDDGHLMPPPRSSTUVWXcdefgimnry6 78000+-/i5 3570K (4.0-4.7ghz)
6GB DDR2ABCDGHLMPPPSSTUVWXcdeefghimnoorruyz2 5 7 8000+-./()16GB DDR3
Geforce GTX 260MABBCDDDHLPPPRSSUVWdghimnoruyz2 5 7800+-./()GTX650Ti
80GB + 500GB HDDACDLMPPPRSSTUVWXcdeefghimnoorruyz2 267-./()2X500GB in RAID0 + 1TB
DL DVD+-RWABBCGGHMPPPSSTUXcdeefghimnoorruyz2 2 5 678000./()52X CD-R | HD DVD/Blu-Ray, DL DVD+-RW + LS
Win 7 Home Pre/XP ProABBCDDDGGLMRSSTUVcdfghuyz22568000+-.()Win 7 Pro/XP Pro
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Re: Development Blah: Comments

Postby karx11erx » Tue Jun 12, 2012 5:17 pm

When rotating the R and U vectors around the rotation axis between the previous and current path nodes, X and Y rotations are applied to R and U. These create the error. It's not hard to compute these rotation angles, but, I have spent almost three weeks on the tunnel generator, and I am having enough of it. My current "hack" is compute the error when a preliminarily rotated tunnel and to rotate that tunnel again using that error. Works well enough.
User avatar
Pumo
D2X-XL Expert
D2X-XL Expert
Posts: 1437
Joined: Tue Sep 25, 2007 9:28 pm
Location: Here :)
Contact:

Re: Development Blah: Comments

Postby Pumo » Tue Sep 25, 2012 6:57 pm

Nah, I have not found any new playground for my creativity, it's rather a notorious lack of time due to lots of real-life issues, unfortunately. :(

That's why I've been way too innactive on the Descent community as of lately.
I hope to get things in order again in about two months to resume my work on PM (I hope less...)
[Pumo software main website] - Pumo Mines current progress: 60%
-SYSTEM SPECS-
CPU: Intel Core i7 4790 3.6 GHz (4 GHz Turbo)
RAM: 16GB DDR3 1333MHZ
SSD: Kingston SSDNow V300, 240GB
HDD: Seagate 1TB 7200RPM SATA
External HDD: Seagate Backup Plus Slim 1TB 5400RPM
Video: nVidia GeForce GTX 1050 Ti OC 4GB
Sound: RealTek High Definition Audio
Display 1: LG 24M38H 24" 1080p HD LED Monitor
Display 2: Dell 19" 1440x900 TFT Monitor
OS: Windows 10 64-bits
Sirius
Posts: 1990
Joined: Tue Sep 25, 2007 10:29 pm
Location: Bellevue, WA
Contact:

Re: Development Blah: Comments

Postby Sirius » Wed Sep 26, 2012 4:37 am

I had hoped I would too... then things kinda stalled. As time's gone on I've been feeling less and less upbeat about the idea of making things for Descent - it just doesn't do what I want to do now. Strange as it may sound at first, well, my main interest is still single-player design, and having to make everything for 6DOF limits the things you can do there.

But I do have ideas I want to realize now, so that's something. I just need to actually start on them... which means less playing games, more making them I think...!
User avatar
Enzo03
Posts: 135
Joined: Wed Apr 01, 2009 1:19 pm
Location: Private Luxury Worldship.
Contact:

Re: Development Blah: Comments

Postby Enzo03 » Sat Oct 27, 2012 2:57 am

I can't believe what I just read. :strange:
Some people are like Slinkies. They aren't really good or even useful for anything but they always manage to put a little smile on your face when you give them enough of a push down the stairs.
User avatar
Alter-Fox
Posts: 1132
Joined: Mon Mar 31, 2008 7:29 pm
Location: some other reality

Re: Development Blah: Comments

Postby Alter-Fox » Sat Oct 27, 2012 4:23 pm

Sirius wrote:Strange as it may sound at first, well, my main interest is still single-player design, and having to make everything for 6DOF limits the things you can do there.


I know where you're coming from. But when you're not building for 6DoF you have to make stairs!
But I still haven't actually finished a map for Half-Life 2 or Doom 3, just started and abandoned lots. At least for Descent I have finished levels, if not any entire projects.
We live in a universe... It's distracting
=========================================================
beware of ounce
User avatar
Pumo
D2X-XL Expert
D2X-XL Expert
Posts: 1437
Joined: Tue Sep 25, 2007 9:28 pm
Location: Here :)
Contact:

Re: Development Blah: Comments

Postby Pumo » Wed May 22, 2013 5:45 pm

Oh yeah, the new features will be a great addition to my Kartsal Mot. mission!
Now I can finally script the story of the levels as it's supposed to be.

And I must check now the new DLE update, as it sounds very promising with the new fixes, hopeully bringing more stability. :thumb:
[Pumo software main website] - Pumo Mines current progress: 60%
-SYSTEM SPECS-
CPU: Intel Core i7 4790 3.6 GHz (4 GHz Turbo)
RAM: 16GB DDR3 1333MHZ
SSD: Kingston SSDNow V300, 240GB
HDD: Seagate 1TB 7200RPM SATA
External HDD: Seagate Backup Plus Slim 1TB 5400RPM
Video: nVidia GeForce GTX 1050 Ti OC 4GB
Sound: RealTek High Definition Audio
Display 1: LG 24M38H 24" 1080p HD LED Monitor
Display 2: Dell 19" 1440x900 TFT Monitor
OS: Windows 10 64-bits
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Re: Development Blah: Comments

Postby karx11erx » Wed May 22, 2013 9:11 pm

Just publishing more fixes.

Return to “General Discussions”

Who is online

Users browsing this forum: No registered users and 2 guests