make a texute bend?

Forum Archive - from http://theuniversal.net
Locked
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

make a texute bend?

Post by zaroba »

everybody who's made a world will surely have had this problem.

how do you make realistic roads that curve? now, i know that some road textures could be tiled up/down/left/right and it will look fine on a curve since the texutre is just repeating instead of bending. but what about a road texture that has marks from vheicles driving on it?

something like this texture?
how would i go about making this texture make a 90 degree turn?
Image
User avatar
Fooli
Staff
Staff
Posts: 1957
Joined: Sun Oct 05, 2003 2:38 pm
Location: Mars

Post by Fooli »

I'd guess, if you were very good with photoshop or similar, you could get the software to use the texture to fill along a path you'd define that did the 90 degree bend. Probably.

I dunno how to do that. I'd probably cheat and do it in 3d: get the texture mapped to a plane, bend the plane 90 degrees, then render the result...

f
Last edited by Fooli on Sun Apr 18, 2010 8:26 pm, edited 1 time in total.
User avatar
Fooli
Staff
Staff
Posts: 1957
Joined: Sun Oct 05, 2003 2:38 pm
Location: Mars

Post by Fooli »

(very quickly) something like this...

Image

...assuming this is what you meant.

f
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

Post by zaroba »

wow, that is nice.
was that done with the 3d model method?
User avatar
Fooli
Staff
Staff
Posts: 1957
Joined: Sun Oct 05, 2003 2:38 pm
Location: Mars

Post by Fooli »

yes - just created a plane the same dimensions as the original image, gave it plenty of resolution (so it had maybe 50x50 segments, so it would bend smoothly) then... well, bent it :) Rendered the result as a 512x512 jpg, which actually is upscaling the original image - which is why it's a bit blurry compared to the straight one. Ideally the source image would be a nice and normal power of two size, but there we are.

Was that the sort of thing you had in mind? Thinking about it I suppose you would need each end of the bendy road texture to be centred on the side of the texture, which would be possible with a bit of fiddling.

Or, of course, you could just build the landscape in 3d in the first place.
f
User avatar
flametard
Posts: 1245
Joined: Sun Apr 01, 2007 2:05 am
Location: Join NR! faction name: 'NR new recruits' password: 'Truth'
Contact:

Post by flametard »

If you use tiles you'll only be able to acheive 90 and 45 degree turns with your roads. If you use texmaps you can mape hairpin turns, long easy turns, etc. of course you wont be able to use surface tile settings to simulate the feel of grass vs road. You can put tile on top of texmaps, but it is very hard to create surface tile textures that sit well on the texmaps, since they display at different resolutions.

speaking of which, can someone tell me how many surface tiles are on a world? i need to know this because im going to attempt to make surface tile textures that are meant to go onto my texmaps with as little seam as possible. I'm going to use bits of the texmap to make the surface tile, but i need to know how many tiles are on 1 texmap (a 16th of the world). if i do it right, i should be able to make very low kb files that are lower res than ppl are use to, but sit on the texmaps exactly right. does anyone understand what im saying?
User avatar
Fooli
Staff
Staff
Posts: 1957
Joined: Sun Oct 05, 2003 2:38 pm
Location: Mars

Post by Fooli »

The answer is in the heightmap... the whole world is 256x256, so 1/16th of the world is a 16x16 area of tiles.
f
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

Post by zaroba »

texmaps have surface settings too :P
User avatar
flametard
Posts: 1245
Joined: Sun Apr 01, 2007 2:05 am
Location: Join NR! faction name: 'NR new recruits' password: 'Truth'
Contact:

Post by flametard »

lol zar, i know, but it doesnt help when making curvy roads within texmaps, cause the texmaps have bits of road, dirt, grass, etc scattered all throughout them... at least the way ive been doing it using the .autotexmap 16 command, which as you know, spreads all 16 texmaps overtop the whole landscape in a 4x4 grid.

so fooli, that means there are 64x64 tiles within each texmap (if youve got them layed out using .autotexmap 16). so that means if you wanted to lay tiles overtop the texmaps, the tiles would have to be 1/64th the pixels of the texmap its laying on.. in order for them both to have the same quality and (hopefully) blend into one another, as long as the textures themselves are also the same. yes!! thanks. this way, you could blend the 2 ideas, having the texmaps display your curvy roads. then in the bits of grassy area around the road, you could lay grass tiles on the texmaps with little seamage (if done right) and that would allow your cars to slow down in the grass or mud or whatever. this would only work if the texmaps textures are consistant and not too varied.
User avatar
flametard
Posts: 1245
Joined: Sun Apr 01, 2007 2:05 am
Location: Join NR! faction name: 'NR new recruits' password: 'Truth'
Contact:

Post by flametard »

although it should be noted that the last time i checked, the surface settings (grass,mud, unpassable, high damage, etc) were bugged. that is, they work fine if youre driving overtop the tile, but also affect flying vehicles, jetpack vehicles, or a driving vehicle thats jumping in mid air. possibly also boats.

a retest of this phenomenon should be done to see if these problems have been fixed, because i remember mit having noted it.
User avatar
Fooli
Staff
Staff
Posts: 1957
Joined: Sun Oct 05, 2003 2:38 pm
Location: Mars

Post by Fooli »

Um... yes, you'd get a 64x64 grid of tiles per texmap, and you'd need to make sure each tile graphic was 1/64th the size of the texmap for them to have the same level of detail. In theory.

What you describe is indeed possible - using surface tiles to change the properties of an underlying texmap - but in my experience there aren't any blending modes that make it work nicely - it's always looked pig ugly on my PC.

The other thing I always struggled with (apart from making tile graphics that blend nicely with texmaps) is the fact that you're always gonna be trying to make square tiles match up with a nice curvy texmap for roads and such like, and... well, it's not really possible.

Your mileage may vary, but I think you'd be much better off building a landscape mesh in 3d and waiting for mit to finish that bit of code (I'm promised some coding time this week); or just using texmaps and not worrying about surfaces; or just using surfaces and not worrying about texmaps or nice curvy bits. Unless there's some magic blending mode I'm not aware of.

f
User avatar
Fooli
Staff
Staff
Posts: 1957
Joined: Sun Oct 05, 2003 2:38 pm
Location: Mars

Post by Fooli »

PS... if memory serves, Mit told me the trick to blending texmaps and tiles is to use the texmaps for colour and the tiles for detail. So your texmaps don't actually need to be particularly high res, they're just showing the basic type of landscape underneath, while the surface tiles should have a good amount of texture detail (texture as in tarmac, rock etc) - and, I think, may blend better if they're monochrome. It really works best on angular shapes, though. Have a play and see..

f
Locked