Page 1 of 1

sector map - proposal

Posted: Tue Sep 13, 2005 6:24 pm
by zbyszanna
I don't know how will it fit into wing commander world (as I played only original Privateer - loved it!), but maybe sector map could benefit from nice planet/station models that are already in the game? I mean let's replace circles, squares and such with authentical planet/station model. I there is agricultural planet, let's put tiny agricultural planet model on the map.

Posted: Tue Sep 13, 2005 7:10 pm
by chuck_starchaser
Agricultural planets are spheres. The spheres could use more subdivision, tho. I've been pushing for 64 rings, 128 wedges, and I've noticed improvement but I'm not sure we're there yet. If we are, then maybe they could use 128 rings and 256 wedges. What they could definitely use, though, is a kick-ass set of textures. Planet textures should be 2048 x 1024, no if's or but's, and should look jaw-droppingly detailed... but it's not easy to create a fractal planet texture that looks detailed and realistic.
The mining and refinery bases are very good already, IMO. Maybe the texturing, again, could be more kick-ass; like adding environmental self-shadowing, and reducing the amount of specularity. I'm not even sure they have specular maps at all (by default, the engine makes everything specular).

Posted: Tue Sep 13, 2005 7:21 pm
by klauss
I had given specmaps to mining bases. Don't know what happened to those. I'll see if I can dig them up. But, anyway, he was referring to the navmap. In there, we would need LESS detail, actually.

Posted: Tue Sep 13, 2005 7:25 pm
by spiritplumber
What would also be good is having 4~5 textures per type of planet, and some form of cloud generation... i might take a poke at it as soon as I'm done with my homework :)

Posted: Tue Sep 13, 2005 8:33 pm
by klauss
Cloud generation?
I might help there. I got the graphics side quite figured out.
But... Cloud generation? How? Fractal-like? Or choosing several cloudmaps randomly and paste them together?

Posted: Tue Sep 13, 2005 8:54 pm
by spiritplumber
I think having several cloudmaps and layering them would be the cheapest option -- maybe change their colors, lighter or darker.

Posted: Tue Sep 13, 2005 9:15 pm
by klauss
That can be done. Just give me some time, and bug me constantly for I tend to forget things.

Posted: Tue Sep 13, 2005 9:47 pm
by chuck_starchaser
Nasa has two Earth cloud maps for download, any resolution you want. I can upload them for you, give me half hour to find them and stuff.
Nobody will notice they are from Earth, since clouds are always changing :)
Layering them would be too much, though, as each layer you add implies another sphere. Unless there's some trick we can use to overlay the cloud texture onto the ground texture, without using shaders.

Here: http://www.deeplayer.com/dan_w/goodies/ ... er1024.png
1024 x 512 is good enough. I already processed it a bit. The original covered too much, which is realistic but not fun. But giving it a low alpha would be too unrealistic, as clouds aren't too transparent. So what I did was increase contrast, while keeping the white end constant. One thing we could do would be to blend it additively onto the planet texture at a random rotation each time we enter the system.
I'll keep looking for the other cloud texture I had...

Posted: Wed Sep 14, 2005 2:02 am
by mkruer
how many textures do you need?

Posted: Wed Sep 14, 2005 5:46 am
by chuck_starchaser
Spirit, I made this texture for a test:

Image

It's 1024 x 512.

Now, when I replace agricultural.png with it, I think only a fraction of the texture wraps the planet...

Image

But even if one were to assume it is expecting a 512 x 512 like the original, it still doesn't explain what I see there: The one half of the planet we see should contain almost half of the entire texture; but what I see there is a much smaller piece of the texture. In fact, I don't think the original texture wraps the planet correctly.

Where does one specify the size of the texture?

Posted: Wed Sep 14, 2005 5:59 am
by spiritplumber
It has to be 1024x1024 (or 512x512), if it's not square, the part of it that goes outside the square gets ignored.

Posted: Wed Sep 14, 2005 6:05 am
by mkruer
I am going to get ripped on this, but I thought it could be any dimension 1:2 or 1:4 etc… as long as it was based upon a power of two.

Posted: Wed Sep 14, 2005 6:10 am
by spiritplumber
nope :( we really need to fix that...

Posted: Wed Sep 14, 2005 6:34 am
by chuck_starchaser
Ok, thanks; here's the texture, 1024x1024:

Image

Here's a screenshot:

Image

Still it seems to me it's not showing half the texture... :-/
And if you have reflectivity map enabled, okay, hold on two minutes while I resize it...

Here:

Image

That's the specular map. Just right click on the textures and save.

I made 20 planet textures but haven't processed them in Gimp yet.
Let me know what you think of this one.
By the way, the darkness is right; took the colors from an Earth picture by NASA; the clouds will brighten it considerably.

And here's a better cloud layer than the one in there:

Image

Enjoy. If you like it I'll process the other 19 agri planets same way.

EDIT:
Here's another one; this one's 2048x2048:
http://www.deeplayer.com/agri04.png

Posted: Wed Sep 14, 2005 5:50 pm
by klauss
Textures can be of any size, of any shape, as long as dimensions are power of two. They get stretched to fit the geometry. It is so, undoubtedly, because OpenGL makes it so.

The spheres have texture coordinates in the [0,1] range, which covers the entire texture.

What I was going to do, is to enable multiple composite textures. As if multiple spheres were rendered one on top of the other, but using multitexturing it should be doable in one pass (two at the most, if you're using an insane number of textures, or a very old card).

That's part of a composite texture framework I've been working on. It was left half done, since the half that's missing is really hard to do :P , but eventually I will do it. First I want to finish the "Superbattle Project" (The name I gave what I'm currently doing - a series of optimizations/refactorings that would enable superbattles, 200-500 units at a time). I'm not sure it's possible, but I'm trying. When I find it impossible or I succeed, I'll finish the composite texture framework and make it work with cloudmaps at first, everything at last, so not only you'll be able to create composite (probably random) cloud maps, but also any other kind of textures (ships, terrain, whatever).

FYI: I already managed to get 200 ships at a time with little performance impact when they're scattered across the entire system. When they get together, it slows to a crawl (1-5 FPS). The challenge is to avoid that slowdown - not easy, not sure it's possible either. Mostly since every unit has subunits, so we're talking probably about 1000 or 2000 units actually (most of them were big capships with tons of turrets - clydesdales, oxes, etc... - VS, just picture that in WCU - pretty).

Posted: Wed Sep 14, 2005 7:41 pm
by chuck_starchaser
klauss wrote:Textures can be of any size, of any shape, as long as dimensions are power of two. They get stretched to fit the geometry. It is so, undoubtedly, because OpenGL makes it so. The spheres have texture coordinates in the [0,1] range, which covers the entire texture.
Yet, somehow there was a difference when I went from 1024x512 to 1024x1024. It's true it should make no difference if the uv coords are specified in the 0,1 range. Maybe they aren't though? You *could* specify them in pixel coords, then rescale the image in software if you use a multiple of the number. It would amount to malicious code, but it's possible...
What I was going to do, is to enable multiple composite textures. As if multiple spheres were rendered one on top of the other, but using multitexturing it should be doable in one pass (two at the most, if you're using an insane number of textures, or a very old card).
Excellent! I think, though, in some cases we could use mixing textures statically, or quasi-dynamically in software. I'm thinking I could work on this: A little library, so that people with older videocards who don't care to see the subtle drifting of the clouds in real time can turn it off, and releive some of the multitexture unit pressures.
That's part of a composite texture framework I've been working on. It was left half done, since the half that's missing is really hard to do :P , but eventually I will do it. First I want to finish the "Superbattle Project" (The name I gave what I'm currently doing - a series of optimizations/refactorings that would enable superbattles, 200-500 units at a time). I'm not sure it's possible, but I'm trying. When I find it impossible or I succeed, I'll finish the composite texture framework and make it work with cloudmaps at first, everything at last, so not only you'll be able to create composite (probably random) cloud maps, but also any other kind of textures (ships, terrain, whatever).

FYI: I already managed to get 200 ships at a time with little performance impact when they're scattered across the entire system. When they get together, it slows to a crawl (1-5 FPS). The challenge is to avoid that slowdown - not easy, not sure it's possible either. Mostly since every unit has subunits, so we're talking probably about 1000 or 2000 units actually (most of them were big capships with tons of turrets - clydesdales, oxes, etc... - VS, just picture that in WCU - pretty).
Sounds too good to be true. Let me know if you need any help, like little classes or patterns you need designed, I'm good at that kind of thing.