tunnels

tunnels

Postby rubberduck » 05 Jun 2013, 12:46

new idea: real tunnels by using road-segments (not caves by using stones)

i don't know, how easy it is to implement
Attachments
tun.jpg
https://notabug.org/rbduck/Nucleagacy
my puzzle / action game in godot 4
User avatar
rubberduck
 
Posts: 910
Joined: 23 Apr 2013, 18:31
Location: sitting with tux in a bathtub

Re: tunnels

Postby CryHam » 05 Jun 2013, 14:39

Yeah, that's the problem, it's Impossible to do.
So far I know Ogre's terrain can't have holes.
Hmm. Even if we could do holes with discard pixel in terrain's shader, I don't know if it's possible to do holes in bullet heightmap.
It's not, but could use triangle mesh instead of heightmap.
Still it's freaking difficult (not easy) because of making the entrances fit the triangles of collision, road and dealing with an idea how to send this also to shaders.
User avatar
CryHam
SR Moderator
 
Posts: 1047
Joined: 25 Nov 2012, 08:40

Re: tunnels

Postby rubberduck » 05 Jun 2013, 14:46

what is "discard pixel in terrain's shader"
it is like a "material", where you can drive through??? and full invisible, no interaction with objects and particles...
https://notabug.org/rbduck/Nucleagacy
my puzzle / action game in godot 4
User avatar
rubberduck
 
Posts: 910
Joined: 23 Apr 2013, 18:31
Location: sitting with tux in a bathtub

Re: tunnels

Postby CryHam » 05 Jun 2013, 15:15

discard in fragmet/pixel shader doesn't draw the pixel on screen. i forgot what is it called in gl.
User avatar
CryHam
SR Moderator
 
Posts: 1047
Joined: 25 Nov 2012, 08:40

Re: tunnels

Postby Julius » 05 Jun 2013, 15:33

Well, one could carve in the terrain and add a mesh cover on top. Many shallow tunnels are done that way anyways, and especially those half open tunnels one can often find in mountainious areas (to protect againt falling rocks and the like), would make a really nice addition to Stunt-Rally.
One would just need to make a set of sufficiently modular "tunnel cover" models for it (given that you can paint the "carvings" into the the terrain hightmap).
User avatar
Julius
Community Moderator
 
Posts: 3297
Joined: 06 Dec 2009, 14:02

Re: tunnels

Postby rubberduck » 05 Jun 2013, 15:38

the idea is good, but when you want that a second road crosses the moutain, you must use a small "bridge" over it(road in the air)
https://notabug.org/rbduck/Nucleagacy
my puzzle / action game in godot 4
User avatar
rubberduck
 
Posts: 910
Joined: 23 Apr 2013, 18:31
Location: sitting with tux in a bathtub

Re: tunnels

Postby Tapio » 09 Jun 2013, 23:43

Julius {l Wrote}:Well, one could carve in the terrain and add a mesh cover on top.

Nice idea.
Julius {l Wrote}:One would just need to make a set of sufficiently modular "tunnel cover" models for it (given that you can paint the "carvings" into the the terrain hightmap).

SR already procedurally generates the road from a spline. Should not be an unreasonable task to generate the cover also. I see two phases:

  • Create tunnel interior walls (easy, just generate some upside down U-shape over the spline just like e.g. bridge walls)
  • Patch the terrain. This is harder, but could take advantage of the original terrain: the tunnel would be placed inside an uncarved mountain in the editor, and then the required carving is calculated from the spline and the original terrain points over the road spline are used for generating a static cover mesh.

There might be some stitching issues, but I'd imagine they would be worse with pre-made meshes and can be covered up with e.g. vegetation, rocks.
User avatar
Tapio
 
Posts: 30
Joined: 26 Nov 2012, 08:10

Re: tunnels

Postby rubberduck » 10 Jun 2013, 18:23

i don't know if it is possible to "deform" the segments with the road like in blender with array- and curve modifier

length(=stretched or not) of the tunnel-segments could be done with the length of the road-segments in editor

also bridges like http://www.blendswap.com/blends/view/23226 or http://www.blendswap.com/blends/view/19211 could be done like this
Attachments
array-curce-segments.png
https://notabug.org/rbduck/Nucleagacy
my puzzle / action game in godot 4
User avatar
rubberduck
 
Posts: 910
Joined: 23 Apr 2013, 18:31
Location: sitting with tux in a bathtub

Re: tunnels

Postby CryHam » 10 Jun 2013, 19:58

Well everything is possible. I guess it maybe wouldn't be that bad if we just made a big, broad entrance mesh (to deal with bullet terrain triangles).
Anyway, either way, this requires dealing with the most complicated code in game (made by me) which creates road mesh (Road_Rebuild.cpp), I don't think it can be written simpler, it is just complicated, and I don't burst in happiness about extending it even further :twisted:.
But I am for doing it in there, like all road creating was meant to be, it has many parameters for each spline point, has LOD, merge length, etc.
I made an issue for it code.google.com/p/vdrift-ogre/issues/detail?id=248, but like with all issues below Medium priority, I'm not going to touch it anytime soon.
User avatar
CryHam
SR Moderator
 
Posts: 1047
Joined: 25 Nov 2012, 08:40

Who is online

Users browsing this forum: No registered users and 1 guest