Jump to content


Build a tunnel


  • Please log in to reply
7 replies to this topic

#1 Eletricman

Eletricman

    Senior Member

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 124 posts

Posted 07 October 2006 - 06:49 PM

Hope this is the place to ask it: Right now I'm building a track, just for fun and to understand better things related with scenery. In fact, I've decided to adapt a GP2 track to GPL. The original track has a tunnel in a point I'm getting near ATM. My question is How I can build a tunnel in a GPL track?

If it would be very difficult, no problem, I already have alternative ideas here, it's not the idea now to puzzle myself. :P

Attached Files

  • Attached File  GP2.gif   53.92K   58 downloads

Edited by Eletricman, 07 October 2006 - 06:50 PM.


#2 Bill

Bill

    Gpl Freak

  • Administrators
  • PipPipPipPipPipPip
  • 61 posts

Posted 08 October 2006 - 06:27 AM

let me check my notes and post back to you, they are not that difficult to build from what I remember however there are some things to keep in mind
cant have a groove on the track in the tunnel as it will transfer to the roof.
I will post back soon with more details

#3 pirenzo

pirenzo

    Where's this go again?

  • Staff Crew
  • 257 posts
  • Gender:Male
  • Location:London

Posted 08 October 2006 - 09:50 AM

On the first wall in the section set Unk4=262144.
This adds a polygon to the top of every wall in that section, set at the height of wall_0.

To turn off the ceiling polygon for a particular wall, use Unk4=524288


As Bill says, the groove will be transfered to the ceiling too, so set the groove darkness (in the .grv file) to zero for all the references within the tunnel.

use .tex setting 6 to map textures to the roof of your tunnel

e.g. for the bit directly over the asphalt:

1 0 0 10.0 10.0 asphalt
1 0 6 10.0 10.0 roof
Now they've made Dunlop Bridge much faster this year, and in doing so they have made it safer. Not so acute as it was, it can be taken, very nearly flat out - Mike Hawthorn, Le Mans 1956

#4 Bill

Bill

    Gpl Freak

  • Administrators
  • PipPipPipPipPipPip
  • 61 posts

Posted 08 October 2006 - 02:35 PM

View Postpirenzo, on Oct 8 2006, 11:50 AM, said:

On the first wall in the section set Unk4=262144.
This adds a polygon to the top of every wall in that section, set at the height of wall_0.

To turn off the ceiling polygon for a particular wall, use Unk4=524288


As Bill says, the groove will be transfered to the ceiling too, so set the groove darkness (in the .grv file) to zero for all the references within the tunnel.

use .tex setting 6 to map textures to the roof of your tunnel

e.g. for the bit directly over the asphalt:

1 0 0 10.0 10.0 asphalt
1 0 6 10.0 10.0 roof
Never thought of doing it that way Pirenzo :)
the way I did mine was as follows

use 2056 walls in your gtk for the tunnel area
set the height
in your tex file you will need to have an entry as follows
2056 2 6 1.5 1.5 brdgin ceiling tunnel
2056 3 1 2.0 8.0 brdgl left wall tunnel
2056 2 1 4.0 4.0 brdgr right wall tunnel
notice the first entry the 3rd number is 6.
This number makes the ceiling visiable and is set to the height of your 2056 walls.
gplea's site has a tutorial that explains the texture file and the link is here
If you want a groove in the tunnel area then it must be built in the
ashpalt texture itself and not through the groove file.
Hope this points you in the right direction :)
Now you have 2 options.
I will have to try your way Pirenzo :)

#5 Eletricman

Eletricman

    Senior Member

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 124 posts

Posted 08 October 2006 - 09:30 PM

thank you, guys!!!

Later I'll try it, still trying to get used with GTK's with more than 4 traces :mellow:
In fact the wall becoming the tunnel is not required, it's just the idea I'm using with the necessary adaptions.

Due to the confusion, now I'm doing some improvements on my height editor (see the height editor topic) to help me to view what's going on....

#6 Eletricman

Eletricman

    Senior Member

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 124 posts

Posted 26 October 2006 - 12:20 AM

:( not working, GPL insists in only show the error texture (maybe it could be a solution cheating the GPL engine, hehe)

trying both ways nothing happened about texture mapping, at least the roof is there
maybe that's the solution, "work" with the texture error, until there, anyone still have any other idea?

Attached Files

  • Attached File  GPL5.jpg   37.14K   41 downloads


#7 luna

luna

    Honored Member

  • Member
  • PipPipPipPipPipPipPipPipPipPip
  • 189 posts
  • Gender:Male

Posted 26 October 2006 - 06:38 PM

I think the way it works is that the ceiling polys are created between wall 0 and the last wall; the height of wall 0   gives the height of the ceiling and the TEX values for this wall specify the textures. This means you need a TEX entry which corresponds to the unk3 value of wall 0. E.g if wall 0 is type 2056 unk3=1 your TEX file should have something like 2056 1 6 10.0 10.0 <ceiling texture>

A couple of other problems with ceiling polys: textures are always split across traces and mapped between them with the values given in the TEX file and I don't know of any way of forcing them to be mapped once across (as unk4=2 or 512 will do on the ground). Also if your tunnel walls cross traces at angle within sections you'll get a compile error (access violation blahdiblah).

:wave:

#8 Eletricman

Eletricman

    Senior Member

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 124 posts

Posted 27 October 2006 - 12:48 AM

Thanks Luna, it worked now.
(time to move to the next step)