• Welcome to SC4 Devotion Forum Archives.

Terrain Textures

Started by Nique, September 06, 2009, 03:32:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nique

JonM, wants to help with graphics.

I have no experience with 3d programming / modeling, just done a handful of tutorials. But JonM wan'ts to know what resolution he must use for creating terrain textures. I would like to say that, of course we should use transition textures:

Textures for rivers and ocean terrain (not the water itself).
Textures for (mowed) grass (at least 4 types i think?)
Mud textures
Dirt textures
beach textures (white sand)
rock textures (for mountains)
forest ground textures (think about dead-leafs, branches)
(etc.)

I'm just talking about terrain textures. No 'lot' textures yet

Because we want this game to be customizable we should let a door open (in the programming part of texturing the terrain) for players to implant or even add their own textures. But because this is just the graphical section of the forums i would like to know in what resolution it would be wise to design.

JonM, if you have any questions, please ask it here.
Proudly developer of

croxis


JonM

I would think 512x512 should be adequate for the closest zoom, so I'll just go ahead and develop some at that res, its a question of scale too. I mean the terrain is 3d, no? because you can have the 512x512 at .5 scale, which always looks much better. And so a 512x512 grass for instance should look like it would make sense at covering 256x256 of space. Follow me?




Korot

Yes, I do, you want to compress the texture to make more details to show through and to allow stretching on uneven ground to look better, right? But that number, is that in tiles/meters or something else, like pixels?

Regards,
Korot

Nique

#4
Quote from: Korot on September 07, 2009, 07:51:13 AM
Yes, I do, you want to compress the texture to make more details to show through and to allow stretching on uneven ground to look better, right? But that number, is that in tiles/meters or something else, like pixels?

Regards,
Korot

pixels i think.

as far i know, the terrain will have 10x10 meter quads. (each point  = 10 meters)

1.0f -> 2.0f
Proudly developer of

Korot


Nique

#6
Quote from: Korot on September 07, 2009, 08:28:09 AM
What does that line mean?

Regards,
Korot

Points in 3 dimensional space are floats

So 16 points from top left to bottom right (x = width, y = height, z = length):


point 00 = 0.0f(x), 1.0f(y), 0.0f(z)
point 01 = 1.0f(x), 1.0f(y), 0.0f(z)
point 02 = 2.0f(x), 0.0f(y), 0.0f(z)
point 03 = 3.0f(x), 0.0f(y), 0.0f(z)
point 04 = 0.0f(x), 1.0f(y), 1.0f(z)
point 05 = 1.0f(x), 1.0f(y), 1.0f(z)
point 06 = 2.0f(x), 0.0f(y), 1.0f(z)
point 07 = 3.0f(x), 0.0f(y), 1.0f(z)
point 08 = 0.0f(x), 1.0f(y), 2.0f(z)
point 09 = 1.0f(x), 0.0f(y), 2.0f(z)
point 10 = 2.0f(x), 1.0f(y), 2.0f(z)
point 11 = 3.0f(x), 0.0f(y), 2.0f(z)
point 12 = 0.0f(x), 0.0f(y), 3.0f(z)
point 13 = 1.0f(x), 0.0f(y), 3.0f(z)
point 14 = 2.0f(x), 0.0f(y), 3.0f(z)
point 15 = 3.0f(x), 0.0f(y), 3.0f(z)


Creates:



The distance between every float point (thats what the f means behind each number) is 10 meters


Now, we know that the terrain doesn't need to have float points on X and Z, only the height. If you change the X or Z number you will get different tile sizes. Therefore i only play with the Y axis of each point as we want to keep the tile sizes as they are:

point 00 = 0.0f(x), 0.8f(y), 0.0f(z)
The height(y)is now 8 meters instead of 10.

point 00 = 0.0f(x), 0.05f(y), 0.0f(z)
Here it is only 50 cm.

point 00 = 0.0f(x), 0.005f(y), 0.0f(z)
And here only 5 cm.


and so on...


Anyway, i think for the ease of programming, we should make a global agreement on the axises. The terrain defines the world, it define's every measuring unit for the rest of the game.

I prefer X and Y for Width and Length, and Z for height.
Proudly developer of

Korot

I agree with you on that last sentence, as I've learned at maths that the Z-axis is the height axis and gmax also uses Z for hight.

Regards,
Korot

Nique

Quote from: Korot on September 07, 2009, 09:57:38 AM
I agree with you on that last sentence, as I've learned at maths that the Z-axis is the height axis and gmax also uses Z for hight.

Regards,
Korot

I added it to the design document
Proudly developer of

Jonathan

Is it possible to create the terrain textures programmtically?
So there are no repeats?
Each tile is different to all the other ones?

Korot

Sure on could, by making a random amount of pixels active. It would work, but it would also look rubbish. In all seriousness, it could be possible, provided that the function which determines which pixels to turn on and which to leave off, gets info about the hight of the terrain, amongst others. However, doing so for a very large map might take a lot of time, and when you then Terra-form the terrain, causing it to display another texture, it would only slow down the game even more.

Regards,
Korot

tomkeus

Quote from: Jonathan on September 07, 2009, 10:57:04 AM
Is it possible to create the terrain textures programmtically?
So there are no repeats?
Each tile is different to all the other ones?

Besides, users have to have a way to make their own textures without being fractal programming gurus. Say for example, someone wants to build desert region.
#define TRUE FALSE /*Happy debugging suckers*/

croxis

In simcity a greyscale bitmap was used for tile height.  We can do the same but also add a color bitmap and a small text file which coordinates the color with a texture image.

Nique

Quote from: croxis on September 07, 2009, 12:23:53 PM
In simcity a greyscale bitmap was used for tile height.  We can do the same but also add a color bitmap and a small text file which coordinates the color with a texture image.

I think that's okay
Proudly developer of

Shadow Assassin

#14
Quote
Besides, users have to have a way to make their own textures without being fractal programming gurus. Say for example, someone wants to build desert region.

They don't need to be fractal programming gurus if a means to create procedural terrain textures quickly and easily is implemented into the program.

All the user would need to do would be to choose the colours by using a colour wheel or something similar OR they could import textures (say, a grass texture, another grass texture, a rock texture, scree, etc etc) and then the game will shade the colours/implement textures based on elevation... so for instance you could have purple beaches and orange mountains if you so desired.

It's just an idea, but maybe look at how texture creation was implemented in Spore to get some ideas about how you could put in textures procedurally.
New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dedgren ♦ dmscopio ♦ Ennedi
emilin ♦ Heblem ♦ jplumbley ♦ moganite ♦ M4346 ♦ papab2000
Shadow Assassin ♦ Tarkus ♦ wouanagaine
See my uploads on the LEX!

tomkeus

Quote from: Shadow Assassin on September 08, 2009, 07:19:22 AM
It's just an idea, but maybe look at how texture creation was implemented in Spore to get some ideas about how you could put in textures procedurally.

Well, if anyone volunteers to do fractals, great. I personally do not plan to do much about graphics. Right know, I have hands full of the population-related simulations. Up until now I managed to get my fellow virtual citizens to have sex and get children.
#define TRUE FALSE /*Happy debugging suckers*/

Nique

the main problem is, that we have to keep in mind what 'region type' we want to use. Because when one city takes different textures than the other, the region (or world) will look very ugly from above.
Proudly developer of

croxis

So that information should be stored at the region level, not within individual cities.

Nique

Quote from: croxis on September 08, 2009, 04:49:09 PM
So that information should be stored at the region level, not within individual cities.

Yes, tha'ts another improvement from sc4 point of view ;)
Proudly developer of

JonM

This should repeat well. But I think ultimately there needs to be like a random tile with other textures so it doesn't look awful.

Nique, I sent you a high quality png