Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Splines Demo with Video

Author
Message
Codger
21
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 20th Apr 2008 22:43


I’ve been investigating Splines as a method of defining roads and flight paths for aircraft.
After a very grueling learning experience they turn out to be very powerful. With just 4 points I defined and paved the road on the video.
Those same points are used to control about 10 cars each one operating at its own speed. In addition an aircraft is following the road at a specific altitude above the road.
Another set of points are used to fly about 4 planes through a Cork-Screw pattern.
Another set of random points define the paths of 15 more aircraft terrain following each at their own speed and altitude.

Even at full screen I am having no issues controlling all 30 vehicles at 60 FPS on a P4 2.8 machine. (The 35 FPS on video was due to Fraps when I was recording)

Due to the amount of stops and starts learning splines, terrains, meshes etc the core code is messy. However if any of the more professional programmers are interested cleaning up and optimizing the code I would be willing to offer it as open source project for the community.

All the best

Codger

Credits:
All of the models are from Dark Matter #1, the terrain and skyboxes are from the terrain demo I just modified a few parameters for my needs.

http://flickr.com/photos/jjamespacbell/2428816494/

System
PIV 2.8 MZ 512 Mem
FX 5600 256 mem
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 21st Apr 2008 00:49
That looks like a really powerful technique .. very impressive. Well done!

No matter how good your code is, someone will improve on it
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 21st Apr 2008 18:26


Wow - That's AWESOME! I like how you had a long curve (looked like that to me) and the car followed it fine.

Like Pixel Said - Powerful stuff. So, what's the "Secret?"

Codger
21
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 22nd Apr 2008 04:37
Here are the files including media for your convenience. Love to hear your thoughts on improvements

System
PIV 2.8 MZ 512 Mem
FX 5600 256 mem

Attachments

Login to view attachments
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 22nd Apr 2008 04:55
Thanx for posting that. I just ran locally and I must say WOW to the Camera Follow logic. I love it. Was that your own or the TGC follow object with cam thing?

The jet... I think think the "H" or "J" key gave us a roller coaster ride.

So this vector - is that the direction vector? You have 3d coords for "Point placement" plus a "Vector" to define direction right? Then you draw ribbons more or less point to point? Is that how it works?

I haven't perused the code - its time to wind down - but this is a definate keeper! Thanx Codger. As for improvements...

This app is a demo and as such it does its thing. If you're looking for code analysis, theory ideas, etc... I'm not there with this yet. However your demo has convinced me that this is how I'm going to implement way points in Iron Infantry

Thanx Bro!

Login to post a reply

Server time is: 2024-09-29 17:26:07
Your offset time is: 2024-09-29 17:26:07