It is currently Thu Sep 09, 2010 2:03 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: "Transition" textures and flickering
PostPosted: Sun Feb 28, 2010 3:57 pm 
Offline
Tirechanger
Tirechanger

Joined: Thu Jan 21, 2010 6:56 pm
Posts: 27
Location: Formby, NW England
I've recently been seeing how well I can use a soft-edged grass texture to smooth the transition from grass to gravel. For example, take these screenshots of Essington:
Image + Image = Image

When building the track I have two choices: material blending or using the above approach. With blending, the transition is too soft for my linking. I know I can adjust the sizes of the relevant polygons, but that only works up to a point. So I've been trying to use a separate transition texture. The results have been quite good - via the texture I can make the transition both abrupt and smooth.

The problem is that from a relatively short distance the transition texture flickers out of view. I know vaguely why this is - it's polys are very close to the polys below it. Having looked at Essington and LeMans 77/79, I know that it's possible to stop the flickering. What I don't know is how. Does anyone know?


Top
 Profile  
 
 Post subject: Re: "Transition" textures and flickering
PostPosted: Sat Mar 06, 2010 8:10 pm 
Offline
Tirechanger
Tirechanger

Joined: Thu Jan 21, 2010 6:56 pm
Posts: 27
Location: Formby, NW England
Well, after a bit of a nudge from someone I came to the solution in the end: Reducing the mip bias of the transition material. The smaller mip images were being dominated by the transparency, making the texture appear to disappear.


Top
 Profile  
 
 Post subject: Re: "Transition" textures and flickering
PostPosted: Sun May 23, 2010 1:51 pm 
Offline
Tirechanger
Tirechanger

Joined: Thu Jan 21, 2010 6:56 pm
Posts: 27
Location: Formby, NW England
It's worth bumping this thread because there is still a flickering problem. The issue in my first post wasn't flickering at all, I was describing it wrongly.

Here are two screenshots of the problem:

Image Image

Very slight changes in viewing angle cause different parts to flicker out. Fortunately it doesn't happen much when viewed from low down, so few drivers would see any flickering, but there will be problems when viewing from trackside cameras. So once again, does anyone know how to stop that flickering? Material settings? Some parameter inside the .gmt?


Top
 Profile  
 
 Post subject: Re: "Transition" textures and flickering
PostPosted: Sun May 23, 2010 2:30 pm 
Offline
Champion Driver
Champion Driver

Joined: Thu Oct 29, 2009 12:01 pm
Posts: 430
A wild guess, but maybe its the alpha layer, try setting it at 50% grey and dxt5.

_________________
Image


Top
 Profile  
 
 Post subject: Re: "Transition" textures and flickering
PostPosted: Sun May 23, 2010 5:14 pm 
Offline
Tirechanger
Tirechanger

Joined: Thu Jan 21, 2010 6:56 pm
Posts: 27
Location: Formby, NW England
The whole point of a transition texture is that the alpha channel varies across it. I tried different compression settings but unsurprisingly they didn't correct the problem. It's either a material issue or a model issue. Incidentally, I've combined the separate grass, gravel and trans models into one, but that didn't change things either.


Top
 Profile  
 
 Post subject: Re: "Transition" textures and flickering
PostPosted: Sun May 23, 2010 7:10 pm 
Offline
Champion Driver
Champion Driver

Joined: Thu Oct 29, 2009 12:01 pm
Posts: 430
If I'm understanding you correctly, You have 2 meshes, one on top of the other? If so, then the underneath one will pop through at a distance and at certain angles, because a part of the top texture is opaque (white alpha) and that opaque bit will do the usual thing and flicker. Have you tried setting the alpha on both the underneath and ontop image? ie, top black to white, bottom white to black.

_________________
Image


Top
 Profile  
 
 Post subject: Re: "Transition" textures and flickering
PostPosted: Fri May 28, 2010 11:07 am 
Offline
Tirechanger
Tirechanger

Joined: Thu Jan 21, 2010 6:56 pm
Posts: 27
Location: Formby, NW England
That wouldn't work. The reason I have to use a separate transition texture is that the terrain (grass and gravel) textures have different UV mapping coordinates. They just tile without bending, whereas the transition object bends like a track, taking the texture with it.

But I'd been looking at this using ISI's SCN viewer, assuming it used the same rendering techniques as rFactor. When looking at it in rFactor, it was much better - the flickering was only just noticeable. Of course SCN viewer has no trouble with Essington so I'd still be interested in finding a solution.


Top
 Profile  
 
 Post subject: Re: "Transition" textures and flickering
PostPosted: Fri May 28, 2010 1:29 pm 
Offline
Champion Driver
Champion Driver

Joined: Thu Oct 29, 2009 12:01 pm
Posts: 430
If you really want it as perfect as posible, then you might have to step out of the box. Why don't you use simed and export the sections as 3ds then import and remap the texture co-ords in blender?
Then its just a case of exporting from blender as 3ds and converting the 3ds to gmt in simed.

Hmm,, one other thing that comes to mind. If you have my Nikko circuit, open it in simed and have a look at the track and the shoulders. What I did was, in BTB I laid a new track down and used the M + drag tool to snap the new track points to the old track points, then I widened the new track and removed the material from the centre panels leaving the materials only on the outside parts, that way I could get the concrete edges to look right instead of the static tile that BTB creates on the terrain. Then it was a matter of creating the shoulder in a few different sections and removing it altogether in some places.


Attachments:
nikkoshoulders.jpg
nikkoshoulders.jpg [ 279.86 KiB | Viewed 214 times ]

_________________
Image
Top
 Profile  
 
 Post subject: Re: "Transition" textures and flickering
PostPosted: Sat May 29, 2010 6:24 pm 
Offline
Tirechanger
Tirechanger

Joined: Thu Jan 21, 2010 6:56 pm
Posts: 27
Location: Formby, NW England
That's an interesting idea. I've been trying to avoid it because it would require effort, but the obsessive part of me would like to eliminate that last bit of flickering.

I could add a new track to the outside of the corner, with the grass-gravel transition split up into 6 textures (start, middle, end, left and right for each - see attachment). For a wide gravel trap I could also add 3 more textures: middle start, middle end, and plain gravel for the main body. The seam between the track and the terrain would be very hard to see because both of them would use the same grass texture.

I can get the points very close in BTB but I'm glad I have 3dsimed because it can weld vertices.

Regarding Blender, I'm not familiar with it. How hard would it be to remap the texture? I can do UV mapping with LithUnwrap but it tends to be a long process. Does Blender have any useful features like bending a texture independently of the model? If not I'll just try the new track method.


Attachments:
trans.gif
trans.gif [ 26.15 KiB | Viewed 202 times ]
Top
 Profile  
 
 Post subject: Re: "Transition" textures and flickering
PostPosted: Sat May 29, 2010 11:51 pm 
Offline
Champion Driver
Champion Driver

Joined: Thu Oct 29, 2009 12:01 pm
Posts: 430
Its a piece of cake to remap the texture in Blender once you know how to do it. Blender doesn't communicate with rFactor though, You have to export as 3ds then import the 3ds into simed to convert it to gmt. That bit gets a little tricky and you start yelling out "Daavve heeellllllppp" :bg: but it's easily overcome.

As for blending, I do believe it is possible to do in Blender, but I haven't learned that bit yet :D.

I wrote a tutorial on how to make a car prop for BTB using Blender, I made a copy of it here. http://3rdgearmotorsports.com/wordpress/?p=120 This tutorial will cover the basics of using Blender, the basic tools etc. About half way down the page I explain how to get to the UV editor and how to UV unwrap. That should give you an idea on what you would need to do if you went down this path. Although to unwrap the terrain like you have to do, you would use a slightly different technique "follow active quads" that way you will be able to get the terrain mesh square on to the texture.

Actually, you got me going now, I will go and try this myself and see if I can figure out the blending of textures.

_________________
Image


Top
 Profile  
 
 Post subject: Re: "Transition" textures and flickering
PostPosted: Sun May 30, 2010 1:17 am 
Offline
Champion Driver
Champion Driver

Joined: Thu Oct 29, 2009 12:01 pm
Posts: 430
Almost got it. I can remap it in Blender and get it into simed, that's all good, but I'm stuck as how to assign the alpha blend. Is there a way in Simed to assign this to individual vertices? I have a section of the terrain beside the track, t1 is grass, t2 is the tarmac, I have set it t1 lerp t2, lerp using vertex alpha. I want to allocate which vertices will be blended. I want the vertices next to the road to blend with t2 and the far vertices to have no blend at all. If we can do this in simed we have a winner.

_________________
Image


Top
 Profile  
 
 Post subject: Re: "Transition" textures and flickering
PostPosted: Sun May 30, 2010 4:41 pm 
Offline
Champion Driver
Champion Driver

Joined: Thu Oct 29, 2009 12:01 pm
Posts: 430
I can get it all working in Blender, but I think it's limited to what I can import into Simed. It seems as though the 3ds forgets the multiple layers of texture and I can never figure out DAE lol. Sadly I think this experiment ends here :(

I think either use the extra track pieces like in Nikko, or use Blender to remap the terrain. Both processes will do pretty well much the same job and now I think about it, since you can weld vertices in simed, it's probably more efficient to use the extra track.

[ED] oh btw, jsut incase yoru wondering, the textures in this screenshot have texture painting on them, they aren't separate images with he blend edited into them.


Attachments:
blending.jpg
blending.jpg [ 419.77 KiB | Viewed 207 times ]

_________________
Image
Top
 Profile  
 
 Post subject: Re: "Transition" textures and flickering
PostPosted: Sun May 30, 2010 6:04 pm 
Offline
Tirechanger
Tirechanger

Joined: Thu Jan 21, 2010 6:56 pm
Posts: 27
Location: Formby, NW England
I very much appreciate the effort you've gone to. I downloaded Blender, not for the first time, but I'm not sure if I could really justify the time and effort required to learn the process when I can just make some textures and stick them on a new track. I'll make start/finish/left/right textures at some point, which when combined with the existing gravel texture will allow me to make some fairly big gravel traps.

In the attachments you can see the texture and the extra track. The texture is on the right and on the left is the grass texture. The use of the grass texture moves the seam a bit further away from the track:
Attachment:
transtex.gif
transtex.gif [ 38.3 KiB | Viewed 486 times ]

Attachment:
trans2.gif
trans2.gif [ 129.41 KiB | Viewed 202 times ]


Top
 Profile  
 
 Post subject: Re: "Transition" textures and flickering
PostPosted: Sun May 30, 2010 7:18 pm 
Offline
Champion Driver
Champion Driver

Joined: Thu Oct 29, 2009 12:01 pm
Posts: 430
Your Welcome. It looks great.
I don't mind spending the time researching it because I was interested in the subject to start with and in the process I have learned heaps. :thumbsup:

_________________
Image


Top
 Profile  
 
 Post subject: Re: "Transition" textures and flickering
PostPosted: Wed Jul 14, 2010 10:43 am 
Offline
Tirechanger
Tirechanger

Joined: Fri Aug 15, 2008 11:28 am
Posts: 31
Very useful thread.

I'd like do add another point: it's important to turn off the transition stripe object during the night. The alpha channel causes a weird effect under car's headlights.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group