L3DT users' community
Large 3D terrain generator

Mountain passes with tunnels

Got a problem or need advice?

Mountain passes with tunnels

Postby therrywan » Sun Jun 21, 2009 3:14 pm

Hi Aaron,
I am trying to create a valley that is isolated by a ring of mountains. However, At the moment I cannot create an underground passage across the mountains. Is there a way that I do not know of that will allow me to dig / trench a passage through my mountains? To keep the two valleys isolated, I will place a Portcullis gate of stone at both ends of the tunnel.
Thanks
therrywan
User avatar
therrywan
Member
 
Posts: 17
Joined: Sat May 30, 2009 6:21 pm

Postby Aaron » Mon Jun 22, 2009 1:45 pm

Hi Therry,

I vaguely recall answering this in an e-mail. My usual reply to queries about tunnelling in L3DT goes something like:

L3DT is a heightfield generator, and tunnels cannot be implemented with heightfields*. Heightfields can only represent a surface, and that surface has to consist of a regular grid of points with unique vertical displacements. Tunnels cannot be represented in this data structure, as they have irregular point spacing and are not single-valued in general. Tunnels are complex 3D objects that need to be modelled properly in 3D (i.e. not using heightfields).

Tunnels in game environments are usually generated as a mesh object using a 3D mesh editor** such as Blender. For rendering in a game engine, the used is to cut out a region of the heightfield at the tunnel entrance and replace it with the opening to your tunnel mesh.

By the way, what game engine are you using, how does it load / display tunnels? What file format is used for tunnel maps?

Best regards,
Aaron.

* Any hacks to make tunnels with heightfields, such as using multiple heightfields (one for the tunnel ceiling, one for the floor), are imperfect and unwieldy at best. Consequently, few renderers support these approaches.

** L3DT/Sapphire don't count as 3D mesh editors. They are 3D heightfield editors, which is a significant difference when you're talking about complex geometry like tunnels.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Re tunneling

Postby therrywan » Fri Jun 26, 2009 12:09 pm

I am using Torque Beta 3. At the moment my tunnels are stopping me. So far, the game loads well.
User avatar
therrywan
Member
 
Posts: 17
Joined: Sat May 30, 2009 6:21 pm

Postby Aaron » Sun Jun 28, 2009 4:07 am

Hi Therrywan,

A rather fruitful search of the GarageGames forums (see 1, 2, or link below) shows that the way to make tunnels is to create the tunnel as a building interior using whatever 3D editor pleases you best (e.g. 3ds Max, MilkShape.) You then load this in Torque3D as a polysoup mesh, and then in the Torque terrain editor, set some polygons to be empty to make a hole in the heightfield through the which your tunnel passes.

Best regards,
Aaron.

For the search results from the GarageGames forum, please follow this link:

http://www.garagegames.com/search/advanced?locations[]=forums&search=tunnels
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Re tunneling

Postby therrywan » Tue Jun 30, 2009 3:16 am

Hi Aaron,
Great!
You just might have solved my tunneling problem.
I still think you're a genius.

thanks
Therrywan
User avatar
therrywan
Member
 
Posts: 17
Joined: Sat May 30, 2009 6:21 pm


Return to Help and support

Who is online

Users browsing this forum: No registered users and 55 guests