Help Painting Road Surface

Blitz3D Forums/Blitz3D Programming/Help Painting Road Surface

KuRiX(Posted 2005) [#1]
Hi. In my racing game now i need to paint the black and yellow lines over the road. The problem is that i have very irregular streets (not just all straight). And the place where people walks (i don't know the english word for that, hehe) is over the road at irregular points.

What is the best method for painting? I have tried, without results:

- Making a big special texture for every road (too filtered, and ugly, and lot of memory needed)
- Making a base texture with some lines and trying to unwrap to model the road (impossible, too different roads, see picture below)
- Making directly 3d objects in white and yellow over the road (good idea, but very hard work with the different heights)

This a picture with the idea in mind (this is made with 3d objects over the road):



Any idea very very appreciated. Thanks!


D4NM4N(Posted 2005) [#2]
can you not use an editor to rotate the uvs for each face segment of the racetrack.

you could try uvmaping each course face onto a standard tarmac texture. This woukd require mimimum memory, but a fair bit of fiddling. I use quite a simple free program called lithiumUV for this kinda thing, but its a bit quirky, but it does the job. Do a google search for it.

Hope it helps


KuRiX(Posted 2005) [#3]
Thanks for the answer d-grafix. I am desperate with this. I have tried almost everything.

What is a tarmac texture?

I can't use an editor to rotate the uvs because of the different roads. the road changes too much...


D4NM4N(Posted 2005) [#4]
tarmac is what we call the roadsurface in english (the black stuff)

its a tricky problem u got there. Onw way woukd be to have 2 meshes one with just the road surface texture, and another on top with the line as an actual mesh set with an additive blend and color of 255 to ensure white.


Tom(Posted 2005) [#5]
Fire your roadbuilder, and hire a Roman, they build kick ass straight roads! :)

I'd probably model them as part of the road, not on top of it. Placing geometry on top may cause depth fighting at some view angles/distances.

Check my DLL for altering texture filter settings.
http://www.tomspeed.com/texture_filters/

Tom


D4NM4N(Posted 2005) [#6]
not if you set the entityblend to add and put it at the same height it shouldntt zfight it will work in the same way as a lightmap on an x file


KuRiX(Posted 2005) [#7]
Thanks for the answer tom. I do already use your filters in my game, hehe, thanks, you will appear in the credits!

I think i will build the lines as geometry with no collision. The problem is, for avoiding collision, i will need to make it separate objects and placing them on top (0.001 or something).

Of course i know that i can have problem at certains view angles/distances :_(

I hope that geometry will not affect my render speed too much :(


D4NM4N(Posted 2005) [#8]
yes to no collisions, the geometery for a few lines wont be much especially if there is no collisions on it.
if you move the object slightly above, it will look horrible with z issues. but you wont have to put it above if you use additive blending, just use entityblend linesmesh,3 (or could be 2 i cant remember) and make sure its color is 255. then the line will blend nicely with the road and you shouldnt see any z pobs

Good luck


D4NM4N(Posted 2005) [#9]
Your ode physics jobby is cool by the way, a friend of mine got it working well with one of my ted terrains. He had a buggy driving over mars. :)


KuRiX(Posted 2005) [#10]
But the entityblend could be a render performance hit, isnt it?


D4NM4N(Posted 2005) [#11]
dont know about a performance hit, but for my jetpac game im using an 8539 polygon mesh landscape with 3 alpha layers with entityblended lightmap. Not to mention the cubemapped water and environmment mapped gems lying about, and this all runs smoothly on a duron 800 mhz with a geforce 4. I use entityblending a fair bit in this, so i dont think it hits it that much.
Why dont you try it and see, make another copy of your existing track (just as an experiment) color it red with no texture or something and try add blending it with the one you have and mesure the fps difference.


KuRiX(Posted 2005) [#12]
Well, thanks for the information. I have been trying right now. The result is very good. But i am using very simple meshes for the lines and i am getting a 600 polygon mesh for every road (counting only basic lines!!!). I think this is too much count... because i should need in total about 25.000 polys for the complete map...

Don't know what to do...