Multitexuring - a soccer pitch
Blitz3D Forums/Blitz3D Beginners Area/Multitexuring - a soccer pitch
| ||
I am trying to create a soccer pitch. I have a cube which I stretch out into a long flat rectangle. I texture this with a simple tiled grass texture. On top of the grass I need all the white pitch lines (sidelines, centre circle, penalty box etc). I assumed I would make the second texture transparent, just showing the white lines, but I read that multituring with alpha is not good. So what is the best way to do this? |
| ||
You can have a color map and a detail map. A detail map is what you use for grass. A colormap is something like this [imghttp://i13.photobucket.com/albums/a260/MortiisGames/Untitled-1.jpg] Simply what you will do is, apply your grass texture on the cube, then apply colormap stretched to your cube size with scaletexture on it with the "color" texture flags(LoadTexture("", 1+8)) . |
| ||
Ok, I see the lines now but they are light green, not white. Is it possible to make them show up as white without making the grass texture brighter? |
| ||
Aha. I changed the green on the colormap to black and set TextureBlend(pitchlines, 3). :D Thanks! |
| ||
well you've just made multitexturing with alpha :) |
| ||
well you've just made multitexturing with alpha :) Nope .. what'll be mutitexturing with additive blending ;) |
| ||
Ok, so I have my pitch lines in place but I'm a little concerned by the raggedness of them. The texture i'm using is a 2000x2600 png, with some anti-aliasing on the curved lines. It seems that no matter how big I go, I can't get rid of the noise along the pitch lines. (The pitch itself is a cube 1000x1300 units.) Take a look... ![]() ![]() ![]() I have loaded the textures with flags 1+8, and used textureblend 3. What can I do to improve the sharpness of the lines? |
| ||
A 2000 x 2600 texture?! This will get automatically increased to 2048 x 4096 as textures must be power of 2 on most cards. You could create 1 texture which is a quarter of the pitch size and use 4 x cubes or a 2 x 2 with the texture u fliped for 2 & 4 and the texture v fliped for 3 & 4. This will allow for more detail. 12 34 Another way to improve the texture is to disable mipmapping by only using textureflag 1. One last way to get very crisp lines is to create them entirely as a mesh. I've done this before when I started my sensi remake a few years back. Stevie |
| ||
Heheh. I knew it was too large, but I was experimenting with bigger and bigger textures. I might try the mesh route next. Thanks for your help. :D |
| ||
Honestly, I would just use a series of plain models. Flat models single surfaced each with a 512x512 texture map on it. Tile them together, say 16x8 and on each texture in the white lines how you want them... when finished, collapse them all together into a single mesh. Would certainly give you a great deal of detail. |
| ||
Eek! Maybe I picked you up wrong Vertigo but 512x512 texture when uncompressed is 769k and you're suggesting that he has 136 ( 16 x 8 ) of these? That's over 100mb of vram used for just the pitch texture. Maybe not so bad using DDS but will kill most older cards. |
| ||
No, only a few textures are needed, just applies multiple times. The corners are all the same, the sides are the same (a few places that would need a different texture, like where the centerline comes in), mostly he only would need a few textures. |