Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to add back mirrors
07-13-2010, 02:39 AM,
How to add back mirrors
I have tried to search if VDrift supporting displaying back (rear-view) mirrors but could not have found any thing. Have they not supported?
If so, could you tell me how to (change the code or do some thing else) to add back mirrors (both side mirrors and room mirror) to the HUD (or car model or somewhere else).
Thanks and regards.
07-13-2010, 10:34 AM,
There's support for assigning a control to a temporary rear view, but it just shows you the rear view as long as you hold the button down and then returns to the front view.

We do render a rear view all the time if you have reflections set to high, so it wouldn't be too tough to add code to display that somewhere.
07-15-2010, 07:34 AM,
Oh, thank you very much!
Hight reflection may be very good idea :-)
Will try it
07-21-2010, 10:56 AM,
I am thinking about creating the rear-view mirrors as following:

- Step 1: Enlarge the Field of View so that the room mirror and side mirror are moved into the screen
- Step 2: Set the texture of the mirrors so that they will have a 100% reflection.

But I don't know how to do the Step 2, I tried to change the body-misc1.png image but it seems to be not effected. (The thing is that it is slightly reflexed but very very difficult to see...)

[Image: shot003.jpg]

Could you show me how to do the Step 2 with the best quality?
07-24-2010, 11:13 AM,
Hmm, the most reflective you can get with the current shaders is to make the diffuse texture black and the misc1 texture white. If that doesn't work, we will need some other way to mark the object as fully reflective so the shaders can treat it specially.
07-24-2010, 06:53 PM,
Thank you for your reply.
May be I have to think about a different way.

joevenzon Wrote:We do render a rear view all the time if you have reflections set to high, so it wouldn't be too tough to add code to display that somewhere.
Considering your above statement, I would like to have two questions:
- Could you tell me which VDrift version is supporting the above function (I am using the 2009-06-15) ?
- Where is the rear-view buffer? Can I use glCopyTexImage2D to copy it to the texture of the mirror ?
07-24-2010, 07:36 PM,
I don't think the 2009 release supports realtime reflections. You need 2010-06-30, and you have to set the reflection quality to "high" for it to work. You should get this release and give it a try with the misc1 set to white and see how well that works before trying something more complicated. It may give you exactly what you want.

The rear-view buffer is in a framebuffer object on the GPU and is already available for use as a texture.
07-24-2010, 09:17 PM,
Thank u thank u many more!!!
The 2010 version has a very dramatic car reflection.

That is the result after upgrading the mirrors:
[Image: shot005.jpg]

The right mirror may look down so it has not enough light to show.
B......b.....but I like slightly more and more reflection for the mirrors.
Can we have the Blue channel of the misc to distinguish reflective effect...
Sorry because I have no experience about shader.
Could you show me how to.....
07-27-2010, 10:05 PM,
I'll look at doing something like that.

Hmm, it might be tough to get the mirrors pointing in the correct direction. Any ideas for that?
07-28-2010, 03:13 AM,
Thank you for considering this issue.

For the direction of the mirrors, I am thinking about creating the joints between the body and mirrors so that we can control the mirror direction from keyboard.

I haven't understood exactly the code but I think it is something like the joint in Bullet and/or like the joint between the body and wheels...

If I can help something, please tell me, I also like to develop this program very much...
07-29-2010, 06:18 AM,
Hi duc_ttm,

Quote:control the mirror direction from keyboard.
I think that is overkill. It should be enough to be able to set mirror position, orientation in the car config file.

There are plans to support more carparts(like we are doing for the wheels/tires). I just haven't had the time to implement it.
08-01-2010, 07:04 AM,
Thank NaN very much for the suggestion.
But I am wondering why the Mini Cooper has a very good reflection on the room mirror while TC6 or CT could not (although having the black diffuse and white misc).... ???
You can see it if set the exterior painting to black.

Forum Jump:

Users browsing this thread: 1 Guest(s)