planets v0.2

Development of artwork, requests, suggestions, samples, or if you have artwork to offer. Primarily for the artists.
Message
Author
Daveybaby
Small Juggernaut
Posts: 724
Joined: Mon Sep 01, 2003 11:07 am
Location: Hastings, UK

#46 Post by Daveybaby »

pd wrote:daveybaby: would be interesting to compare the prerendered planets with the real time rendered ones :)
I dont see why they should look any worse than, i dunno, some of this stuff or, if you want to get *really* stupid... some of this stuff.

tzlaine wrote:Where's the patch?
Uh????

Are you saying you want me to code that lot up? I can do... but you'll be waiting a while for it - i'm VERY busy at work (ahemm... which is why i'm on these forums instead of actually progressing anything :wink: ) but i will see what i can bodge up.

Question for someone who knows OpenGL - i believe that there are standard OpenGL functions that will map a bitmap to a sphere - can someone confirm this?
The COW Project : You have a spy in your midst.

Marijn
Space Squid
Posts: 65
Joined: Thu Feb 19, 2004 10:26 am
Location: Nijmegen (NL)

#47 Post by Marijn »

from http://www.parallab.uib.no/SGI_bookshel ... /ch10.html
(I've usually found it more practical to calculate my own texture coords.)

void glTexGen{ifd}(GLenum coord, GLenum pname, TYPE param);
void glTexGen{ifd}v(GLenum coord, GLenum pname, TYPE *param);

Specifies the functions for automatically generating texture coordinates. The first parameter, coord, must be GL_S, GL_T, GL_R, or GL_Q to indicate whether texture coordinate s, t, r, or q is to be generated. The pname parameter is GL_TEXTURE_GEN_MODE, GL_OBJECT_PLANE, or GL_EYE_PLANE. If it's GL_TEXTURE_GEN_MODE, param is an integer (or, in the vector version of the command, points to an integer) that's either GL_OBJECT_LINEAR, GL_EYE_LINEAR, or GL_SPHERE_MAP. These symbolic constants determine which function is used to generate the texture coordinate. With either of the other possible values for pname, param is a pointer to an array of values (for the vector version) specifying parameters for the texture-generation function.

The different methods of texture-coordinate generation have different uses. Specifying the reference plane in object coordinates is best for when a texture image remains fixed to a moving object. Thus, GL_OBJECT_LINEAR would be used for putting a wood grain on a table top. Specifying the reference plane in eye coordinates (GL_EYE_LINEAR) is best for producing dynamic contour lines on moving objects. GL_EYE_LINEAR may be used by specialists in geosciences, who are drilling for oil or gas. As the drill goes deeper into the ground, the drill may be rendered with different colors to represent the layers of rock at increasing depths. GL_SPHERE_MAP is predominantly used for environment mapping. (See “Environment Mapping.”)

Daveybaby
Small Juggernaut
Posts: 724
Joined: Mon Sep 01, 2003 11:07 am
Location: Hastings, UK

#48 Post by Daveybaby »

Thanks. Yeah i was considering doing the spherical mapping by hand... just though it might save time to do it in OpenGL.
The COW Project : You have a spy in your midst.

User avatar
pd
Graphics Lead Emeritus
Posts: 1924
Joined: Mon Mar 08, 2004 6:17 pm
Location: 52°16'N 10°31'E

#49 Post by pd »

Can you give the planets DIFFERENT axis of rotation? Say one planet that got a highly inclined axis of ratoation like Uranus, or ones that are nearly vertical. And ofcorse reveresed images with the axis tilted in the counter clockwise direction (I am asuming you tilted the axis clockwise). 5-6 different tilts would seem to be a good mix.
i could do this, but i don't think it would look that good... it would even look strange in my mind, if some planets are tilted more or less. the 'problem' with pre rendered stuff is, that it's static... so if i decide to make Gas Giant 2 more tilted then normal, than this planet would always be tilted that much. i don't think this is a good idea.

daveybaby: well ok, i think prerendered looks much better *g*

_Robbob_
Krill Swarm
Posts: 12
Joined: Tue Jul 22, 2003 10:39 am

#50 Post by _Robbob_ »

Hey these are really impressive. Should add a lot to the visual stylings of FO.

Only thing I would say, is would it be possible to try a little backlighting to bring out the full sphere of the planet. Also possibly a small fill light for the dark side.

However, I am not a graphic designer, so feel free to put me in my place ;)

Daveybaby
Small Juggernaut
Posts: 724
Joined: Mon Sep 01, 2003 11:07 am
Location: Hastings, UK

#51 Post by Daveybaby »

pd wrote:daveybaby: well ok, i think prerendered looks much better *g*
GAH! Well, you have to bear in mind that those are rendered for maximum realism, and as such arent as sexed up as your renders (i.e. your renders have exaggerated atmospheric effects and (very VERY nice) heightmaps (the barren and radiated worlds).

You could certainly add enhanced atmosphere effects in a realtime rendering (its pretty static with the day/night effect) but the heightmap shadows along the day/night terminator would be impossible.
Can you give the planets DIFFERENT axis of rotation?
This wouldnt be a problem if real-time rendered /smug :wink:

Prerendered stuff will always look nicer (as long as the person doing it knows what theyre doing, and you certainly seem to). The flipside is that you lose flexibility with how planets are displayed, it eats up a lot of memory, its much harder for talentless plebs like me to create planets, and thus you get fewer unique planets to play with.

Question : How did you make the texture maps for your renders? Do you have separate surface/cloud/nightlight maps generated for them?
The COW Project : You have a spy in your midst.

User avatar
pd
Graphics Lead Emeritus
Posts: 1924
Joined: Mon Mar 08, 2004 6:17 pm
Location: 52°16'N 10°31'E

#52 Post by pd »

the point is, that planets are much more than mapped spheres and an atmosphere is more than a glow. and that's why real time rendered planets(those i've seen) don't look very realistic.

and of course my planets are sexed up, because it looks much more interesting.
...it eats up a lot of memory
very true *g*

my planets are build of 3 spheres. one for the surface, one for the clouds and one for the atmosphere.

the surface sphere is mapped usually by a diffuse map(color) a bump map(very very little bump, in most renderings of this resoluttion not noticable), and a self illumination map to light the dark side. the diffuse maps are painted from photos or generated procedural.

the cloud sphere is very similar to the surface sphere. but it's slightly larger and it's material has an additional opacity map.

the atmosphere is then mapped using falloff maps.(in this case, the falloff maps make the material only appear on the light side)

maybe it helps if i show you the material tree
Image

the planets itself don't have nightlights... i rendered them seperate on a sphere as big as the surface with an alpha map showing only the lights... this gets then simply layered over the planet frames.

to get more the look of a planet i had to change the shading to oren-nayar-blinn and chang the contrast settings of my light source.

if you could do all this stuff in realtime, it would look like my planets. i'm sure it will be possible in future, but not today ;)

Daveybaby
Small Juggernaut
Posts: 724
Joined: Mon Sep 01, 2003 11:07 am
Location: Hastings, UK

#53 Post by Daveybaby »

pd wrote:the planets itself don't have nightlights... i rendered them seperate on a sphere as big as the surface with an alpha map showing only the lights... this gets then simply layered over the planet frames.
Hmmm... if youre going to include nightlights then youre going to have to have separate renders for populated/unpopulated planets.
pd wrote:to get more the look of a planet i had to change the shading to oren-nayar-blinn and chang the contrast settings of my light source.
Yeah... that osama-bin-laden shading is the way to go*.
/nod sagely as if i know what youre talking about...
pd wrote:if you could do all this stuff in realtime, it would look like my planets. i'm sure it will be possible in future, but not today ;)
I suspect it is just about possible today, but only if you have a ninja level graphics card - so not a realistic option for FO just yet.


*Ooops - i just said a danger phrase - hello FBI bods! :roll:
The COW Project : You have a spy in your midst.

noelte
Juggernaut
Posts: 872
Joined: Fri Dec 26, 2003 12:42 pm
Location: Germany, Berlin

#54 Post by noelte »

Daveybaby wrote:Hmmm... if youre going to include nightlights then youre going to have to have separate renders for populated/unpopulated planets.
No, you simply don't render the nightlights for unpopulated planets. ;-)

drek
Designer Emeritus
Posts: 935
Joined: Thu Jun 26, 2003 8:07 am

#55 Post by drek »

pd wrote:if you could do all this stuff in realtime, it would look like my planets. i'm sure it will be possible in future, but not today ;)
I suspect it is just about possible today, but only if you have a ninja level graphics card - so not a realistic option for FO just yet.
I'm thinking any graphics card that supports pixelshaders could do it. And for cards of a lesser breed, could simply fall back to having a texture and a shadow map.

I'd say make it an elective. If someone comes up with a patch that (1) is close to the pre-rendered planets (2) gracefully provides lesser options for lesser cards (3) doesn't annhilate the framerate then FO uses it. But there's obviously no fire here...

I'd hold on on citylights though...wait for when and if we've got real-time rendered planets to start adding traits that change over the course of gameplay.

noelte
Juggernaut
Posts: 872
Joined: Fri Dec 26, 2003 12:42 pm
Location: Germany, Berlin

#56 Post by noelte »

Hmm, i'm begin thinking of Daveybaby's real time rendering suggestion more serious. If anybody has some good (high quality) samples of mapping textures to spheres at hand, i would like getting a pm about that.

But for now, i think we can life with the memory load drawback.

drek
Designer Emeritus
Posts: 935
Joined: Thu Jun 26, 2003 8:07 am

#57 Post by drek »

noelte wrote: If anybody has some good (high quality) samples of mapping textures to spheres at hand.
Seems GLU library has a built-in function for this.

quick google search produced a tutorial at gametutorials.com:

Code: Select all

// Instead of generating the U V coordinates of a Quadric, it does it for us.
// This is REALLY helpful and easy to work with.  We need to tell OpenGL that we intend
// for it to turn on texturing for our particular Quadric.  All we need to do this is
 // pass in our object, and then a "true" which says we want texturing.

    gluQuadricTexture(pObj, true);

Tyreth
FreeOrion Lead Emeritus
Posts: 885
Joined: Thu Jun 26, 2003 6:23 am
Location: Australia

#58 Post by Tyreth »

Code: Select all

  quadratic=gluNewQuadric();
  gluQuadricNormals(quadratic, GLU_SMOOTH);
  gluQuadricTexture(quadratic, GL_TRUE);
  glEnable(GL_CULL_FACE);

  glBindTexture(GL_TEXTURE_2D, video->tList[texturenum]);

  gluSphere(quadratic, size, 32, 32);
That's some code from an old project of mine that draws a sphere with a planet image (the ones from NASA) on it. It looks cool in wireframe mode :)

User avatar
pd
Graphics Lead Emeritus
Posts: 1924
Joined: Mon Mar 08, 2004 6:17 pm
Location: 52°16'N 10°31'E

#59 Post by pd »

i can provide you with textures for the surface and clouds, if you wanna give this a try...

too bad that the current solution needs that much memory, it looks really cute, the lights too.

drek
Designer Emeritus
Posts: 935
Joined: Thu Jun 26, 2003 8:07 am

#60 Post by drek »

pd wrote:too bad that the current solution needs that much memory, it looks really cute, the lights too.
I remember being concerned about the memory issues; this is one case where it sucks to be right. The current planets do look fairly cool.

Post Reply