Delgine 3D Tools & Content DeleD Community Edition
Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

UV texture a road

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Community Edition
View previous topic :: View next topic  
Author Message
monkeyface
Member


Joined: 17 Jun 2009
Posts: 11

PostPosted: Wed Jun 17, 2009 4:43 pm    Post subject: UV texture a road Reply with quote

Hello! I've been using DeleD for some days now, and even though I've ran into some bugs and crashes, I still find it really useful for a number of reasons.

There's one thing though that I can't wrap my head around. There's this road that I'm trying to UV texture, it's not a straight road, but a curved one. This only results in distorted textures and salty tears. Here's a picture of what I mean:



Would it be possible to come up with a satisfactory solution to this, without turning to a different program?
Back to top
View user's profile Send private message
chronozphere
DeleD PRO user


Joined: 20 Jun 2006
Posts: 1010
Location: Netherlands

PostPosted: Wed Jun 17, 2009 5:20 pm    Post subject: Reply with quote

Try this:

> Select the faces in face mode
> Click Gen UV
> Check "fit texture size to face"
> Hit OK

This should basicly do the trick. If it still doesn't look that right, you can always edit it manually and get rid of the glitches.
Back to top
View user's profile Send private message
monkeyface
Member


Joined: 17 Jun 2009
Posts: 11

PostPosted: Wed Jun 17, 2009 5:25 pm    Post subject: Reply with quote

That's what I did before, and the picture that I posted is the result of "untangling" them. This is how it looks just by checking the "fit texture size to face" option:

Back to top
View user's profile Send private message
chronozphere
DeleD PRO user


Joined: 20 Jun 2006
Posts: 1010
Location: Netherlands

PostPosted: Wed Jun 17, 2009 5:43 pm    Post subject: Reply with quote

Hmm.. too bad it doens't work as expected.

Maybe you could take the vertices and put them all on the corners of the "texture rectangle" in the UV editor. That makes sure that the entire texture is visible on each face. Make sure you put the right vertices in the right corners, otherwise the road get's flipped over at certain points. Smile

These things can get quite tedious. That's why I started working on a UV-mapping plugin that will drasticly speed up the texturing workflow by introducing some extra UV tools. Unfortunatly I don't think it will be finished soon. Stay tuned though. Wink
Back to top
View user's profile Send private message
monkeyface
Member


Joined: 17 Jun 2009
Posts: 11

PostPosted: Wed Jun 17, 2009 6:04 pm    Post subject: Reply with quote

Are there any ways to make them "snap" to the corners? That's basically what I tried the first time, but maybe it'd work better if I were more precise. I can't really understand why this doesn't have an obvious solution, isn't this software mostly for independent or freelance game artists? A road is a must in every urban environment! The road to victory is paved with seamless textures. Well, thank you anyways, I'll be watching out for that plugin of yours.
Back to top
View user's profile Send private message
Mr.Fletcher
DeleD PRO user


Joined: 07 Aug 2004
Posts: 1772
Location: Germany

PostPosted: Wed Jun 17, 2009 6:35 pm    Post subject: Reply with quote

monkeyface wrote:
The road to victory is paved with seamless textures.

Laughing

I don't see how to get this done either. As a workaround, you could create the street another time (as a 2*n grid) and map the object when it's still all straight rectangles. That way, the vertices are guaranteed to be in the corners. When you're done, transform the road to the shape you want.
That might still give those ugly strechings you see in the first screenshot, so be careful and keep the geometry clean.
_________________
Behold! The DeleD Wiki! Please help us expanding it Smile
DeleD on IRC
Back to top
View user's profile Send private message
monkeyface
Member


Joined: 17 Jun 2009
Posts: 11

PostPosted: Wed Jun 17, 2009 7:14 pm    Post subject: Reply with quote

Tried it just now. I used a guide for the road, and in the end I snapped it all to the grid to keep it symmetric and nice. Still those strange "starfish" stretchings.

Am I out of options?

Back to top
View user's profile Send private message
elementrix
DeleD PRO user


Joined: 11 May 2006
Posts: 1300
Location: The Netherlands

PostPosted: Wed Jun 17, 2009 8:02 pm    Post subject: Reply with quote

your using way to few segments for the turns, you need to try and keep faces as square as possible, this can only be achieved in very slight turns and is very hard to do in these.

A way to solve it in this case is by choosing one point to start, take for example the most left edge, this edge goes straight onto the left or right side of your UV map, then the face is mapped the same way as it is in 3D space, then for the next face again choose the first edge, and map it the same as it is in 3D, continue this for each face and you will have a better looking road, not perfectly seamless though.

you could also try to divide your road into more segments so your road is for example 3 poly's wide, then in the turn the outer poly's will stay pretty close to their square shape, and the inner poly's you will have to map as I explained.

EDIT:


Quote:
Are there any ways to make them "snap" to the corners? That's basically what I tried the first time, but maybe it'd work better if I were more precise. I can't really understand why this doesn't have an obvious solution, isn't this software mostly for independent or freelance game artists? A road is a must in every urban environment! The road to victory is paved with seamless textures. Well, thank you anyways, I'll be watching out for that plugin of yours.


this has nothing to do with the software, it's a flaw in 3D as we know, and curves are always hard to UV map properly, some games even make textures that are in the V shapes of the segments, specially for roads like this, but most roads you see in games tend to be pretty long and not very sharp.
_________________
Chickens RULE | www.elementrix.nl
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
monkeyface
Member


Joined: 17 Jun 2009
Posts: 11

PostPosted: Wed Jun 17, 2009 8:12 pm    Post subject: Reply with quote

The problem with that solution is I have to be VERY low poly. It's for a certain game, and more than 1000 polys in each room would really be pushing it.

I'm sorry, the second explanation I don't quite understand. Though it seems to me that the method you're proposing is quite time-consuming (there'll be a long road) and not completely seamless. Should I go search for a plug-in or another program?
Back to top
View user's profile Send private message
elementrix
DeleD PRO user


Joined: 11 May 2006
Posts: 1300
Location: The Netherlands

PostPosted: Thu Jun 18, 2009 10:33 am    Post subject: Reply with quote

monkeyface wrote:
The problem with that solution is I have to be VERY low poly. It's for a certain game, and more than 1000 polys in each room would really be pushing it.

I'm sorry, the second explanation I don't quite understand. Though it seems to me that the method you're proposing is quite time-consuming (there'll be a long road) and not completely seamless. Should I go search for a plug-in or another program?


your developing for a DS, because I can't think of any console/handheld/pc that can't go beneath 2000 on screen..? maybe the iphone EDIT: I checked and the iphone can handle over 7000 poly's on screen, psp 50k, and DS 2000, what are you making this for then : ')?

I'll try to show you what I mean with some images, will first have to make them:)

EDIT:
ok here is what I tried out, as I first explained, you don't see very sharp turns in games alot so I made a long and wide road and your road next to it, in the long and smooth road the poly's stay close to their square form, your road poly's are really bad.


so I took your road and tried to UVmap it with the way I tried to explain(a bit differently though) now I took every face one by one, all the outer edges are seen on the right side of the UVeditor, and I tried to get it as good as possible, but still with your poly's being weird shapes and not clean it's almost impossible.



I used maya for this to show you have the same kind of problems in every piece of software, you need to understand you can't just fix your road with another program or plugin, it's one of the fundamental flaws of how UVmapping works, and you'll have to live with it, and keep your geometry nice/smooth and clean:)
_________________
Chickens RULE | www.elementrix.nl
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
monkeyface
Member


Joined: 17 Jun 2009
Posts: 11

PostPosted: Thu Jun 18, 2009 4:23 pm    Post subject: Reply with quote

Oh, I must've not submitted the reply. Well, here it goes again.

My estimation of 1000 polys may not be too far off then, if the DS can do 2000, and the DS is a souped up version of the N64...
We're a group of people who hack the 1997 game Goldeneye, www.goldeneyevault.com. We're creating custom maps, and to be sure it works with both emulator and possibly the original console, we have to keep it rather low poly. That includes 32*64/32*32 textures.

I see what you're getting at. But I'm sure there have to be SOME specialized software who can do this, even if I realize it's not your everyday UV mapping. I added some polygons to the road, and it's not as stretched then, but still not "perfect". Also, for the second try I used a cylinder as a guide, I think that may also have had some effect.

This is the preliminary solution. We'll see how it goes.

Back to top
View user's profile Send private message
elementrix
DeleD PRO user


Joined: 11 May 2006
Posts: 1300
Location: The Netherlands

PostPosted: Thu Jun 18, 2009 4:29 pm    Post subject: Reply with quote

see how mario kart 64 did it, most of the tracks have very long turns, if your level is a city or street, what about making cross-roads and not really adding very sharp turns?

and yes, tracing of a cilinder is much better, there are no perfect road UV's, even if you are going to use to specialized software for roads, they will just add more geometry to make it look better.
_________________
Chickens RULE | www.elementrix.nl
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Dragonsbrethren
Member


Joined: 12 Apr 2009
Posts: 21

PostPosted: Thu Jun 18, 2009 5:35 pm    Post subject: Reply with quote

I was going to suggest abandoning the road textures, and just using one of the generic asphalt textures plus a secondary layer or vertex coloring for the various markings. It looks like you already came to that conclusion though.

elementrix: That's what GoldenEye did originally, any area that used these road textures simply connected them at 90 degree angles. It was kind of lame in hindsight, but I didn't take issue with it back then.
Back to top
View user's profile Send private message Visit poster's website
monkeyface
Member


Joined: 17 Jun 2009
Posts: 11

PostPosted: Sat Jun 20, 2009 1:28 pm    Post subject: Reply with quote

Glad to see you could make it to the party, DB!
While it'd look better with a generic asphalt texture at this turn, most of the road will be straight, and I think it'd look better with the road texture. It wouldn't be as monotonous, as the road will be long.

Here's another try, just by rotating and scaling the islands. I think it worked out okay.

Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Community Edition All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum