03-01-2007, 12:31 AM,
|
|
alex25
Senior Member
   
|
Posts: 531
Threads: 42
Joined: Jun 2006
|
|
joevenzon Wrote:I think I understand what you're saying now, and that's the way skybox objects currently work. They didn't used to work that way, but they do now, and you can turn it on and off in the track.txt file (default is on).
the way i think it works now, is that the horizon get projected onto the skydome (which is at some arbitrary distance far away) but instead of being projected from the origin is projected from the current car position.
what i would like implemented is something completely different. i would like to have the horizon drawn at its actual size but centered on the current viewpoint, so as you drive around the track the horizon sort of encircles the car and follows it around.
like in this diagram (top view):
where 1,2,3 are the car positions along the track, the coloured circles are the horizon and in black is the track.
--alex--
|
|
03-01-2007, 11:41 PM,
|
|
alex25
Senior Member
   
|
Posts: 531
Threads: 42
Joined: Jun 2006
|
|
joevenzon Wrote:Quote:i would like to have the horizon drawn at its actual size but centered on the current viewpoint, so as you drive around the track the horizon sort of encircles the car and follows it around
That is exactly how it currently works. There is no "skydome projection." All skyboxes work the way you described above.
i don't think so and i'll try to explain with a series of pictures from mosport. in this picture:
![[Image: shot002.jpg]](http://caliban.lbl.gov/vdrift/shot002.jpg)
neither the sky nor the horizon were marked as skyboxes. i hope you can see the horizon is drawn in front of the sky and it's clearly visible.
in the second picture
![[Image: shot004.jpg]](http://caliban.lbl.gov/vdrift/shot004.jpg)
both the sky and the horizon are marked as skybox objects. the horizon doesn't show up. the only explanation is that both the horizon and the sky are drawn at some arbitrary distance. in the third picture
![[Image: shot005.jpg]](http://caliban.lbl.gov/vdrift/shot005.jpg)
i made the horizon a transparent blended texture and it shows up again. clearly when you mark objects as skyboxes they are not drawn the same size as when they are not, otherwise the horizon would've showed up without having to make it a transparent blended texture.
hope this helps.
--alex--
|
|
03-02-2007, 03:19 AM,
|
|
alex25
Senior Member
   
|
Posts: 531
Threads: 42
Joined: Jun 2006
|
|
joevenzon Wrote:The objects are drawn the same size as they are... the problem is that the skydome is a smaller object than the horizon, and so it's covering up the horizon. Mark the horizon as a skybox and comment out the skydome, and my bet is that you'll see the horizon. the skydome is not smaller than the horizon, that was the whole point of the first picture: the horizon is smaller than the skydome when neither one is marked as a skybox. tomorrow i'll try to make a horizon that's some 10 metres around the car, so i should have very limited visibility and we'll see if that's the case.
--alex--
|
|
03-03-2007, 12:42 AM,
|
|
alex25
Senior Member
   
|
Posts: 531
Threads: 42
Joined: Jun 2006
|
|
joevenzon Wrote:Sounds good. You could also set both the horizon and the skydome to not be skyboxes to see what their relative sizes are. i've been swamped at work so it might be a little while before i get around to doing it, but in the first picture above both the horizon and the skydome are not skyboxes, and the horizon is smaller than the sky, but when i make them skyboxes the horizon doesn't show up unless i make it transparent.
--alex--
|
|
03-03-2007, 10:45 PM,
|
|
alex25
Senior Member
   
|
Posts: 531
Threads: 42
Joined: Jun 2006
|
|
joevenzon Wrote:Sorry about the difficulty with communication in this thread... you were right all along! no problem, i am glad you were finally able to identify and fix the bug. i've removed the no longer needed horizon transparency for barcelona and jarama. things look good. and don't worry. if i find more bugs i'll let you know.
--alex--
|
|
03-08-2007, 06:15 PM,
|
|
alex25
Senior Member
   
|
Posts: 531
Threads: 42
Joined: Jun 2006
|
|
joevenzon Wrote:Are there any other bugs you've found?
not really a bug per se, but a possible optimization. now that we have the horizon following the viewpoint around, should be also set the far clipping plane to the size of the horizon? there is no point in drawing objects behind the horizon and it should speed up the drawing of scenery somewhat. the view distance would be the minimum of what gets set in the menu and the size of the horizon/sky.
--alex--
|
|
|