Spline Roads
by Duncan Gray · 10/27/2008 (12:49 am) · 32 comments
I thought I would post a blog and some pictures about what I'm busy with. A previous game I made used a road system of dif sections which were auto assembled into a random road grid. It worked fine and I was able to extract positional information to determine whether the vehicle had left the road, was going the wrong way etc.
But that road system was flat and using dif's was not suitable for bendy or curvy roads and I wanted to do something more natural looking. I first attempted to save the terrain as a heightmap and import it into a 3D tool where I could create a road system which followed the terrain as needed. I ran into problems with getting the terrain to import at the correct scale and decided there had to be a better way. I recalled D-racer had some great looking roads so I thought I would try and make my own version of spline roadway.
It turned out great. I only have to plot a few roadmarkers on the terrain and the software creates a perfect road which is divided into sections for scenegraph purposes and rendering efficiency. I also had to implement a collision system and solve the problem of gradually applying fog at the horizon. I can extract exact information about where each wheel is which is useful for dolling out violation points etc.
Still working on it but so far so good.



But that road system was flat and using dif's was not suitable for bendy or curvy roads and I wanted to do something more natural looking. I first attempted to save the terrain as a heightmap and import it into a 3D tool where I could create a road system which followed the terrain as needed. I ran into problems with getting the terrain to import at the correct scale and decided there had to be a better way. I recalled D-racer had some great looking roads so I thought I would try and make my own version of spline roadway.
It turned out great. I only have to plot a few roadmarkers on the terrain and the software creates a perfect road which is divided into sections for scenegraph purposes and rendering efficiency. I also had to implement a collision system and solve the problem of gradually applying fog at the horizon. I can extract exact information about where each wheel is which is useful for dolling out violation points etc.
Still working on it but so far so good.



#22
Idea Rant: There should be a new category of professional level add-ins or services. Expect to pay more for more functionality. Too often we are ethereally limited to an engine's cost or under for a kit or add-in, which doesn't make sense as a business model. This one is a candidate for more and would enable more games to be made faster. I would say it's worth several hundred dollars (especially if there would be a TGEA version) and that seems low.
I can't tell exactly if it's TGE or TGEA, I *think* TGE based on the video's mission editor.
10/29/2008 (4:14 am)
I certainly would pay for em! The man-hours it would take to get art of LESSER quality and function is much higher. It's also the kind of feature that would bring over many more converts from higher end engines, reducing world building costs dramatically as a tool to lay down roads!Idea Rant: There should be a new category of professional level add-ins or services. Expect to pay more for more functionality. Too often we are ethereally limited to an engine's cost or under for a kit or add-in, which doesn't make sense as a business model. This one is a candidate for more and would enable more games to be made faster. I would say it's worth several hundred dollars (especially if there would be a TGEA version) and that seems low.
I can't tell exactly if it's TGE or TGEA, I *think* TGE based on the video's mission editor.
#23
10/29/2008 (3:20 pm)
Sweet looking. It's not something I'm in very much need of, but I would definatly pay more than $100 for a content pack which implements this, only to take a look at the code and play around. Anyway, good job!
#24
I have emailed garagegames with respect to selling this as a kit but have had no response yet.
10/29/2008 (5:24 pm)
It's TGE but the source files are pretty much stand-alone. Porting to TGEA would only require changing the rendering section which would take 2-3 hours for someone well versed in DirectX. I have emailed garagegames with respect to selling this as a kit but have had no response yet.
#25
10/29/2008 (11:17 pm)
This is a great idea, well worth some money vs the time it would save. Great job, I am looking forward to being able to play with this.
#26
This is seriously one of the coolest things I've ever seen in Torque. Volunteering to test this for you right now. And count us in to purchase it as well. Top Shelf, dude, top shelf....
10/30/2008 (9:46 am)
Duncan,This is seriously one of the coolest things I've ever seen in Torque. Volunteering to test this for you right now. And count us in to purchase it as well. Top Shelf, dude, top shelf....
#27
also (or maybe more) it's taking my attention the idea about Spline Rivers (can we call it in this way?)... It would definitely add a great value to any type of games, from RPG to FPS to RTS and any I can think of... :-)
10/30/2008 (2:09 pm)
Duncan,also (or maybe more) it's taking my attention the idea about Spline Rivers (can we call it in this way?)... It would definitely add a great value to any type of games, from RPG to FPS to RTS and any I can think of... :-)
#28
11/03/2008 (7:34 am)
I have to echo everyone else in saying that this looks really excellent. I might have a go at implementing it myself (there was a forum post a while ago, with something similar but unfinished)... indie budget, me :P.
#29
Do you think it will be possible to use bridges and have the road go over it, or is it something like you're planing to do for the intersections that would have to be used? Also, will a set of intersections have to be made by the users according to their need (one for asphalt, one for asphalt/dirt road crossing, etc...) or would we have to do with the content you would provide (I guess that's asking if we would be able to make custom content to a certain extend).
Keep up the good work, and thank you for this.
11/05/2008 (1:22 am)
Very nice! I have a few questions though.Do you think it will be possible to use bridges and have the road go over it, or is it something like you're planing to do for the intersections that would have to be used? Also, will a set of intersections have to be made by the users according to their need (one for asphalt, one for asphalt/dirt road crossing, etc...) or would we have to do with the content you would provide (I guess that's asking if we would be able to make custom content to a certain extend).
Keep up the good work, and thank you for this.
#30
12/10/2008 (9:22 am)
i don't understand; is this like a loft object, working with a 2D shape, or does it modify a 3D model?
#31
01/04/2009 (11:17 pm)
i need this in my editor for tge.please where can i get this???
#32
01/28/2009 (7:09 pm)
nevermind,i done learned how to do this.thanks anyway... 
Torque Owner N R Bharathae