Sign in to follow this  
_winterdyne_

Modular Terrain Artefacts and Tunnelling / Bridging

Recommended Posts

Ok, for the past week or so I've been dragged off my usual high-level architecture design work onto art and mechanics design for our modular artefacts - the terrain stitching methods for them are based on the vertices of the artefacts to be stitched lying on the same resolution ZX grid as the heightfield for the terrain. The objective is that game designers and/or in-game 'architects' in Primogen based games will not be obliged to select building 'types', but rather be presented with a plot of buildable land (which can be levelled) upon which they can construct buildings from components according to set rules. Each component is effectively an in-game entity that can be interacted with (ie damaged, repaired or destroyed) which can have knock-on effects to the entire structure. Tunnels can be made under the terrain (but this carries an inherent risk of collapse according to constructive rules) and bridging structures over it. These can effectively link onto other constructions. Both the constructive and destructive rules require that components have some form of awareness of what is above and below them, as well as adjacent. This isn't a problem, and the mechanism for it is well defined, using a standard 'cel' resolution for all artefacts, the cels being aligned to a single level for any particular artefact. Since some plots can be large, I would rather avoid if I can forcing a 'building level' for an entire plot. The problem I have is with discontinuous footprint artefacts, such as bridges, or tunnels between buildings, where the 'footprints' are at differing heights - the collision volumes and renderable geometry of the two artefacts that are being linked need to be blended into a continuous whole, without disrupting the existing footprint, and without looking bad. However this process is achieved it should be as seamless as possible to user involved, be it a player or a designer. The method I propose is having specific component types which allow placement on discontinuous heights, and shearing the linking component 'stack' to match. This would allow 'walkable' ramps to form even on single-cel transitions, although larger transitional components would look better. For bridges, fine. Edit: Surface transitional component would have to be placed between non-transitional supporting components according to the standard construction rules(effectively this limits the transitional span to some extent). For tunnels, not so good. Because the builder may not be able to 'see' the component they're effectively linking to, it's possible to get almost a 'stuck lift' effect where a level tunnel suddenly has a drop or step in it to match onto a new height. Perhaps making all 'tunnel' components transitional and when a shear occurs applying it across all adjacent transitional components might work, or making the shearing a modifiable option, so builders can 'smooth out' steps or drops might be better. Edit: The behaviour when tunnels collide with the ground surface is already defined, the surface being deformed to the tunnel, and an appropriate entrance component being automatically placed. Opinions and suggestions are welcomed. If necessary I can add some diagrams to illustrate what I'm trying to get across, but I'm rather busy... [Edited by - _winterdyne_ on September 8, 2006 5:49:05 AM]

Share this post


Link to post
Share on other sites
Without knowing much about how this is implemented already:

I would suggest tunnels should be 'stretchy' but attached to designated control points. A new tunnel would have two control points (the two ends) and would therefore just be a straight line. Further control points could be added if the tunnel was supposed to go around corners etc.

Control points would then effectively be zero-thickness non-transitional tunnel segments (so you'd have to line them up, I suppose. Perhaps if they weren't aligned the tunnel could be a curve! ... </madcap>) between which transitional segments can be trailed.

Share this post


Link to post
Share on other sites
I may not be understanding you correctly, but if these entities could be snapped to a grid, then perhaps it wouldn't be so difficult to distinguish between a bridge entrance, a bridge rise, a bridge fall, and a bridge median. One might zone for these areas, while establishing certain rules determining the behavior of each, connected to the condition of local zones.

Actually, upon a reread, that seems to be what you're describing, at least with bridges, although you threw an "adequate support structure" requirment into the mix.

I'm not sure what your problem is with tunnels, exactly. From your description, I'm seeing a disrepcancy between, say, two diggers trying to meet each other, and finding the tunnels don't match by about six feet.

If this is the sort of problem you indeed have, could one implement some sort of (cancellable, able to be edited manually) pathfinding intelligence to planned (and therefore automated) tunnel digging/bridge building?

Again, not sure I understand exactly.

Share this post


Link to post
Share on other sites
With regard to the tunnelling, yes, you're pretty much on the mark.

We can indentify the 'meeting' tunnel section and shear (skew) it to fit onto the existing one. Spreading this to adjacent preceding tunnel sections would lessen the gradient of the shear, and look smoother.

But there is another problem - We can't effectively shear onto a section that's sheared already and guarantee a visually appealing result - this tends to look really poor for buildings (as shear has to be applied to all components 'stacked' on the shearing component.

Bob Janova - we do actually have better deformable geometry components for world editors to use, but they're not designed for placement by players and typically represent much larger 'chunks' than the building components I'm mostly thinking of in this thread.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this