Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Texture rendering in old VDrift version
08-11-2017, 05:41 AM
Post: #1
Texture rendering in old VDrift version
Hello,
First of all I need to thank you all for developing VDrift which I have been using for many years now in a neuroscience project.
For many reasons I can not move on from the code of 2007. I have now access to Nvidia Titan video cards in a Debian 8 system and 4k 3D monitors and have adapted the code here and there.
I need a bit of support on old texture rendering. I need to use the Weekend Drive task in a visual sensitive situation. All is fine except for the water "like" texture. I attached screenshots in the 2007 version and the new one (on purpose I drove down to the lake)
I know this is old story and the simple answer is move to new code, but I can not do that.
Please spend a bit of time and try to provide some support, even if only advice.
Thank you for your time.    
Visit this user's website Find all posts by this user
Quote this message in a reply
08-12-2017, 04:40 AM
Post: #2
RE: Texture rendering in old VDrift version
On some of the screenshots it looks like the uvs are messed up. Did you change anything in the texture loading code?

You could try checking the track in blender. Import the jpk to see how the water texture looks.
Find all posts by this user
Quote this message in a reply
08-14-2017, 03:42 AM
Post: #3
RE: Texture rendering in old VDrift version
(08-12-2017 04:40 AM)NaN Wrote: In order to view links, you must have to reply to this thread.On some of the screenshots it looks like the uvs are messed up. Did you change anything in the texture loading code?

You could try checking the track in blender. Import the jpk to see how the water texture looks.

Thank you so much for looking into this.
I did import the jpk into blender and got the attachment. It looks like hav-02-dof00 is not rendered at all. Maybe like you say uv is wrong so the texture is rendered from behind with culling on. I will look at list.txt (is there culling set ?) .
Over all I have the impression that the whole axis are rotated in the new code, tracks and cars compared with 2007. In order to use new cars I need to change (x,y,z) to (y,-x,z) (like 90deg rotation) .
Do the UVS look strange in the blender rendering?


Attached File(s) Thumbnail(s)
   
Visit this user's website Find all posts by this user
Quote this message in a reply
08-15-2017, 05:09 AM (This post was last modified: 08-15-2017 05:15 AM by NaN.)
Post: #4
RE: Texture rendering in old VDrift version
There is a riverbed mesh with messed up uv coords or wrong texture. And that is what you see. I am not sure what purpose it has.

It seems like the water mesh is not drawn in your case.

You could try playing with blending maybe:
Code:
#entry 184
hav02.dof-00.joe
vann01.tga.png
1 # mipmap
0 # nolighting
0 # skybox
0 # blending: 0 = opaque, 1 = alpha blend, 2 = doublesided
1.0
0
0
1
1.0
0.9
1.0
0.0
0
0
0

Maybe also check texture alpha channel.
Find all posts by this user
Quote this message in a reply
08-16-2017, 11:32 AM
Post: #5
RE: Texture rendering in old VDrift version
Thanks for the ideas.
I did both.
I set in list.txt to alpha rendering, and rebuild the texture file.
I added a bit of "lake like" color to the texture and left a bit of transparency.
If the uv maps for the river bed would have been correct it might have looked better
with higher transparency but what I have is enough for what I need.
One thing I learned is that if alpha is set to lover then 0.7 (30% transparency) the texture is not rendered at all. On the other hand using the same texture and making the same change for the latest version of code renders with the greener color but completely ignores the alpha setting.
If you would like to have the edited texture let me know and I can post it.
My issue is solved, and once again thanks for the help.


Attached File(s) Thumbnail(s)
   
Visit this user's website Find all posts by this user
Quote this message in a reply
08-17-2017, 11:35 AM (This post was last modified: 08-17-2017 11:35 AM by NaN.)
Post: #6
RE: Texture rendering in old VDrift version
(08-16-2017 11:32 AM)lucifesta Wrote: In order to view links, you must have to reply to this thread....
One thing I learned is that if alpha is set to lover then 0.7 (30% transparency) the texture is not rendered at all. On the other hand using the same texture and making the same change for the latest version of code renders with the greener color but completely ignores the alpha setting.
If you would like to have the edited texture let me know and I can post it.
My issue is solved, and once again thanks for the help.

Sure, feel free to share it.

Btw for opaque objects vdrift uses alpha testing which will discard anything with alpha below certain value. This might have had an unintended effect here.

For performane it might be better to have a separate alpha test draw group. Although I haven't tested how much difference it would make.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)