PDA

View Full Version : How to UVmap a racetrack?



doimus
08-30-2008, 01:52 PM
I'm trying to develop some low-poly modelling skills, and I'm currently learning the process of creating a race-field.
While I'm aware of the usual UVmapping process (mainly for square architectural objects), I don't understand how to map a longitudinal object with repeating texture (the track itself).
In other words, how do I make my square texture flow along the winding road?

Step 1: the track & the texture
http://img222.imageshack.us/img222/8987/racetrackmr5.th.png (http://img222.imageshack.us/my.php?image=racetrackmr5.png)http://img147.imageshack.us/img147/6853/tracktexturelf7.png (http://imageshack.us)

Step 2: ..... umm?
Step 3: profit.

What do I do in step 2?

MooseDog
08-30-2008, 02:19 PM
Streetwise (http://www.lightwiki.com/StreetWise_-_An_intermediate_tut_for_the_road)

this should do the trick:thumbsup:

Hopper
08-30-2008, 02:20 PM
IMO, I think it would be easier to simply create seperate textures for your curves. If not, you'll be stretching them in odd directions and sizes, thus rendering very unnatural results.

.. or ..

Follow MooseDog's link. Both will do, but the tutorial is a better way.

SplineGod
08-30-2008, 05:38 PM
If you rail extrude the track you can create your UV coords at that time. Make sure you actually create and apply a UV map to your template poly before rail extruding. Now when you rail extrude youll see the UV options unghosted.

doimus
08-31-2008, 04:14 PM
Thanks for the tips, rail extrude worked like a charm. I kind of wondered why is UV option always ghosted there, now I know...

SplineGod
08-31-2008, 05:05 PM
Youll find that this is the case for many other tools :)

Elmar Moelzer
09-10-2008, 02:57 PM
What the others said, thats pretty much the best solution.
There are some other more complicated but also quite interesting ones that you can use if you happen to run into problems with this method (for whatever reason that may be)
A little OT:
back in the 5.6 days, when LW did not have native UVmaps yet (there was a plugin but I cant remember its name anymore), we had a game engine that would load LWOs including textures, etc (yeah it worked with projected texturemaps actually).
So we had the job to make this:
http://www.mediastudio-graz.com/html/msg_avl_eng.htm
So we did not have any UVmaps for the road, but had to make an 8km course. There was no way that we could fit a single texture for the road into texture memory back then (I think the cards arround that time had 4MB memory, or so).
So what I did was that I disconnected the part that made up the road (and some of the grass arround it too, I think)and straightened it out. Then I applied the road- surface to the straight version so that the road would tile nicely and morph that straight version back into the curved one. Morphing the road back into shape would deform the texture as well and make it "follow" the curves of the road.
Anyway, doing this was quite a chore, as I had to manually rotate every single section of every curve in the road until it was straight. It still did not take that long, which was partially thanks to the polygoncount being rather limited back then...
The video on our page only shows part of the whole thing and the animation is actually a manula camera- flight. The real camera motion was computed by a separate simulation computer that a german company had built.

CU
Elmar

ZWF_BES
09-16-2008, 08:48 AM
Hello,

i found this tutorial very useful and it explains all necessary things for games mapping imho:

http://www.robinwood.com/Catalog/Technical/LightwaveTuts/LWPages/LWUVStart.html

Its worth working through it from a to z.