Spline defined meshes for features or units?

Spline defined meshes for features or units?

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Spline defined meshes for features or units?

Post by bobthedinosaur »

By spline I mean a line segment defining repeated geometry set, for things like roads, power lines, pipelines etc.. I was wondering if any one has played with something like this or the idea of it?

I remember a train on a tracks demo awhile back but I don't know if that track was one solid piece.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Spline defined meshes for features or units?

Post by knorke »

train thread:
http://springrts.com/phpbb/viewtopic.php?f=14&t=17137
uses units though. "driven by the track's script. It's not MoveCtrl as well"
Truely an interessting piece of spring history!

Roads are easier than pipelines because they could be just 2D.
Easiest road would just be a textured rectangle, similiar to Lua metalspots etc.
This road is ugly and short but it moves: http://www.abload.de/img/blajys0e.gif (1,7 MB)
Could make different textures and tile it like in some 2d games http://blogs.gscept.com/2008/08/ip1/pub ... /roads.jpg

Pipeles would be similiar (draw cylinders or whatever) but for really smoothly curved pipelines would need some math and manually calculate the vertices I guess? Kernel Panic has a "Onslaught" gamemode where it draws parabolic power links between bases, maybe worth to look at.

And then there is zero-K terrainform texture of course.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Spline defined meshes for features or units?

Post by zwzsg »

It's not a parabola, but an arc of circle with both ends at 45°. In early versions, I had trouble with the calculations, so instead it had ends at 90° then was squashed vertically, thus making an arc of ellipse.
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Re: Spline defined meshes for features or units?

Post by bobthedinosaur »

Yeah, several mods did some kind of node connection system. I am guessing for what I am thinking might require some kind of advanced shader thing to morph geometry to a guide line.
You can always draw on the map but that really doesn't help with placing liner segmented geometry.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Spline defined meshes for features or units?

Post by PicassoCT »

You want bezier curve based geometry edited in realtime?
Your my hero of work..

Srsly, its a lot of work- especially since you have to have a algo that uvmaps the dynamically generated geometry.
Post Reply

Return to “Game Development”