Difference between revisions of "Development:Orbital Planet Surfaces"

From VsWiki
Jump to: navigation, search
m (Planet textures required)
(External References: Fix link)
 
(60 intermediate revisions by 7 users not shown)
Line 8: Line 8:
 
* Development of procedural surfaces
 
* Development of procedural surfaces
  
=References=
+
=Textured Surfaces=
References apply both to textured and procedural approaches if not stated otherwise.
 
  
==Wiki References==
+
==Texture Requirements==
 
 
Planets and Systems
 
*Listing and description of planet types: [[Manual:Planet_types]]
 
*Editing Systems using milky_way or system files: [[HowTo:Edit_Systems]]
 
 
 
Development Roadmap
 
*Improved planet textures (Higher quality/Fractal Enhanced?): [[Development:Roadmap#Aspects_for_consideration]]
 
 
 
==Forum References==
 
 
 
Texture Requirements
 
 
 
Development Tools
 
*[http://vegastrike.sourceforge.net/forums/viewtopic.php?t=7055 Tools for creating planet textures]
 
 
 
Examples, Including, Testing
 
*[http://vegastrike.sourceforge.net/forums/viewtopic.php?t=7116 Orbital planet surfaces: gas giants]
 
*[http://vegastrike.sourceforge.net/forums/viewtopic.php?t=3664 Orbital planet surfaces]
 
*[http://vegastrike.sourceforge.net/forums/viewtopic.php?t=5957 Some New Planets]
 
*[http://vegastrike.sourceforge.net/forums/viewtopic.php?t=4008 stand clear. planets coming through]
 
 
 
Submission Process
 
  
Development Needs and Tasks
+
===Generic Image Requirements===
*[http://vegastrike.sourceforge.net/forums/viewtopic.php?p=36698 Shady Planet...]
 
*[http://vegastrike.sourceforge.net/forums/viewtopic.php?t=6200 YASP (Yet Another Shady Planet) ;-)]
 
 
 
Improvement Proposals
 
*[http://vegastrike.sourceforge.net/forums/viewtopic.php?t=3543 Auto-Enhancing Textures]
 
*[http://vegastrike.sourceforge.net/forums/viewtopic.php?t=1970 Fractal Generation System]
 
*[http://vegastrike.sourceforge.net/forums/viewtopic.php?t=2371 More pretty stuff: atmospheres and planet surfaces]
 
 
 
==External References==
 
 
 
===Gas Giant Surfaces===
 
 
 
*[http://www.daviddarling.info/encyclopedia/J/Jupiter.html#Atmosphere Jupiter Atmosphere]
 
*[http://en.wikipedia.org/wiki/Jupiter_(planet)#Atmosphere Jupiter (planet)]
 
*[http://antwrp.gsfc.nasa.gov/apod/ap970920.html The Clouds of Jupiter]
 
*[http://www.sbg.ac.at/geo/idrisi/remote_sensing_tutorial/rst.gsfc.nasa.gov/sect19/sect19_15.html Planetary Remote Sensing - Jupiter]
 
*[http://opensourceschools.org/article.php?story=20030428204319316 Atmospheres of the Gas Giants]
 
*[http://www.solstation.com/stars/jupiter.htm Solstation Jupiter]
 
*[http://vims.artov.rm.cnr.it/data/res-jup.html The Cassini Instruments - Jupiter]
 
  
===Image References===
+
Please read this [[Development:Graphics_Requirements]] page before continuing to the specific requirements.
*[http://www.cosmiclight.com/imagegalleries/images/space/jupiter-io.jpg Io over Jupiter]
 
*[http://www.celestiamotherlode.net/catalog/images/screenshots/jupiter/4kjupiter__johnvanvliet.jpg Celestia Jupiter Map]
 
*[http://www.celestiamotherlode.net/catalog/images/screenshots/neptune/neptune__tcorbin.jpg Celestia Neptune Map]
 
*[http://www.mmedia.is/bjj/data/jupiter_css/jupiter_css.jpg Bjorn Jonsson's Planetary Maps]
 
  
=Textured Surfaces=
+
===Specific Image Requirements===
 +
===Summary of Texture Requirements===
 +
Textures ready for submission should fulfill:
 +
* Codec: dds DXT1 with mipmaps for diffuse textures; dds DXT3 with mipmaps for citylight textures
 +
* Extension: .texture
 +
* Ratio (horizontal:vertical): 2:1
 +
* Size: following the POT rule (power-of-two)
 +
* Resolution: min 2048x1024
 +
* Tilable (seamless): horizontally and vertically
 +
* Quality: RQ or CQ
  
==Texture Requirements==
+
===Image Resolution, Formats, and Quality===
===Image Resolution and Formats===
+
The planet surface graphics format currently recommended for the game is '''dds''' format with dxt1 compression, with filenames ending in '''.texture'''. (Before May 2008, DDS textures were stored in files named .png, because of references to filenames in other places.)
The planet surface graphics format recommended for the game is currently '''2048x1024''' in '''png''' or '''jpg''' format.
 
  
The '''image ratio''' horizontal:vertical must be 2:1, since the texture is wrapped aroud the planet sphere horizontaly around 360 degrees and vertically around 180 degrees.
+
The '''image ratio''' horizontal:vertical must be 2:1 (assuming pixel ratio of the map is 1:1), since the texture is wrapped around the planet sphere horizontally around 360 degrees and vertically around 180 degrees.
Necesserily, in order for the surface not to appear distorted, your '''pixel ratio''' of the generated texture must be 1.0, i.e. a circle must show as a circle when viewing the texture in an image viewer.
+
Necessarily, in order for the surface not to appear distorted, your '''pixel ratio''' of the generated texture must be 1.0, i.e. a circle must show as a circle when viewing the texture in an image viewer, on a monitor with square pixels.
  
 
The vertical and horizontal sizes should be a '''power of two''' (POT).
 
The vertical and horizontal sizes should be a '''power of two''' (POT).
Line 82: Line 44:
 
Keeping original high resolution image (e.g. 8192x4096 or 4096x2048) versions in stock helps maintaining quality and scalability as game development progresses or typical screen resolutions rise in the future with better hardware available to the players.
 
Keeping original high resolution image (e.g. 8192x4096 or 4096x2048) versions in stock helps maintaining quality and scalability as game development progresses or typical screen resolutions rise in the future with better hardware available to the players.
  
Most of the surface textures included in data4.x have a horizontal resolution of 1024 or below. Committed textures are classified as:
+
Most of the surface textures included in data have a horizontal resolution of 1024 or below. Committed textures are classified as:
* DQ - Development Quality: textures with horizontal resolution of 1024 or below
+
* DQ - Development Quality: textures with horizontal resolution of 1024 or below and low degree of realism
* RQ - Release Quality: textures with horizontal resolution of 2048 or above
+
* RQ - Release Quality: textures with horizontal resolution of 2048 or above and medium degree of realism
 
* CQ - Cinematographic Quality: textures with horizontal resolution of 2048 or above and high degree of realism
 
* CQ - Cinematographic Quality: textures with horizontal resolution of 2048 or above and high degree of realism
  
Line 94: Line 56:
 
===Planet textures required===
 
===Planet textures required===
 
[source: klauss]
 
[source: klauss]
*Diffuse color map as usual.
+
*Diffuse color map (the actual planet texture)
 +
*Night map (with city lights); needs to have alpha channel for the transparent areas. Compression type must be DXT3.  
 
*Specular map as usual.
 
*Specular map as usual.
*Night map (with city lights) as usual.
 
 
*Cloudmap... not so usual. The cloudmap contains color in the color data - but base, unlit color. Until now, I couldn't find a case where the color portion of the texture wasn't uniform, so I might drop color "texture" for a uniform color "parameter" - but in any case, the texture contains the cloud's basic color in the color portion (fully white for earthish textures), and "thickness" in the alpha channel. What I did to create the current cloudmaps: transfer the color (grayscale) channel to the alpha channel, adjust its "dynamic distribution", kind-of gamma correction, to avoid saturation of the alpha channel as much as possible (it looks bad), and filled the color channel with white. Thickness means that - the thickness of clouds. It indirectly translates to their height. All clouds are based on the same level (they usually are in reality, minus some exceptions), and grow upwards as much as the alpha channel tells it to.
 
*Cloudmap... not so usual. The cloudmap contains color in the color data - but base, unlit color. Until now, I couldn't find a case where the color portion of the texture wasn't uniform, so I might drop color "texture" for a uniform color "parameter" - but in any case, the texture contains the cloud's basic color in the color portion (fully white for earthish textures), and "thickness" in the alpha channel. What I did to create the current cloudmaps: transfer the color (grayscale) channel to the alpha channel, adjust its "dynamic distribution", kind-of gamma correction, to avoid saturation of the alpha channel as much as possible (it looks bad), and filled the color channel with white. Thickness means that - the thickness of clouds. It indirectly translates to their height. All clouds are based on the same level (they usually are in reality, minus some exceptions), and grow upwards as much as the alpha channel tells it to.
 
*Normalmap as usual (though normalmaps are presently not required, they aren't any different from unit normalmaps: RGB with normal data, Alpha with height data).
 
*Normalmap as usual (though normalmaps are presently not required, they aren't any different from unit normalmaps: RGB with normal data, Alpha with height data).
  
==Development Tools==
+
==Development Tools, Tutorials==
  
===2D Image Manipulation Programs===
+
===GIMP===
 
+
[[Links:Graphic_Applications#GIMP|GIMP - the GNU Image Manipulation Program]] is quite versatile; to work with texture files, you'll need DDS plugin (if it's not installed already).
====GIMP====
 
[http://www.gimp.org Gimp] is the GNU Image Manipulation Program. It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
 
 
 
Gimp already comes with a great variety of scripts and the library can be extended with your own C, Perl, Python, or Script-Fu plug-ins.
 
  
 
A good starting point for e.g. gas giant texture maps is the 'Solid Noise' filter.
 
A good starting point for e.g. gas giant texture maps is the 'Solid Noise' filter.
  
There is a way to make planetary twisters like Uranius or so, using the Gimp. First you must create the gas texture, and then apply the distort filter into Filters>Distortions>Deformation. Then set the deformation type to "counterclockwise swirl", and the make one or two swirls. This will geneare swirls at the surface.
+
There is a way to make planetary twisters like Uranus or so, using the Gimp. First you must create the gas texture, and then apply the distort filter into Filters>Distortions>Deformation. Then set the deformation type to "counterclockwise swirl", and the make one or two swirls. This will generate swirls at the surface.
 
 
On the other hand, if you like a huricane zone, like some gas planets at solar sistem, for example like the great red one at jupiter, you can do it very simply: first select a ecliptic small zone, who will be the future hurricane. Then apply the filter Filters>Distortions>Lens Crystal, and apply a bit crystal lens distortion. Then, deselect that selected zone, and apply Filters>Distortions>Deformation, and set the deformation to "move", and move the left and right sides of the eliptical form a bit, just to make the effect of undercloud.
 
 
 
===3D Rendering Software===
 
  
====POV-Ray====
+
On the other hand, if you like a hurricane zone, for example [http://en.wikipedia.org/wiki/Great_Red_Spot Jupiter's Great Red Spot], you can do it very simply: first select a ecliptic small zone, which will be the future hurricane. Then apply the filter Filters>Distortions>Lens Crystal, and apply a bit crystal lens distortion. Then, deselect that selected zone, and apply Filters>Distortions>Deformation, and set the deformation to "move", and move the left and right sides of the elliptical form a bit, just to make the effect of undercloud.
[http://www.povray.org POV-Ray (Persistence of Vision Raytracer)] is a high-quality, totally free tool for creating stunning three-dimensional graphics. It is available in official versions for Windows, Mac OS/Mac OS X and i86 Linux. The source code is available for those wanting to do their own ports.
 
  
With its unique scripting approach and through a large base of available texture, pigment, and material functions there are almost unlimited possibilities to creating surface maps.
+
===POV-Ray===
 +
[Links:3D_Applications#POV-Ray|POV-Ray (Persistence of Vision Raytracer)] with its unique scripting approach and through a large base of available texture, pigment, and material functions provides almost unlimited possibilities to creating surface maps.
  
 
Maps can be exported by using a spherical camera setting:
 
Maps can be exported by using a spherical camera setting:
 
''camera {spherical angle 360}''
 
''camera {spherical angle 360}''
  
====Blender====
+
===Blender===
[http://www.blender.org/ Blender] is the open source software for 3D modeling, animation, rendering, post-production, interactive creation and playback. Available for all major operating systems under the GNU General Public License.
+
[Links:3D_Applications#Blender|Blender 3D]
 +
 
 +
Scripts for blender can be created using Python. No application of blender for creation of planet surfaces is known to us currently. Submissions are appreciated.
  
Scripts for blender can be created using Python. No application of blender for creation of planet surfaces is known to the author. Sumbissions are appreciated.
+
===Tutorials===
 +
Some great tutorials can be found at [http://www.solarvoyager.com/tutorials.asp Solar Voyager]. They are geared toward 3dsmax and Photoshop, but are general enough in scope that they could be easily adapted to GIMP and POV-Ray.
  
 
==Including and Testing==
 
==Including and Testing==
Line 134: Line 91:
 
===Systems Substitution Testing===
 
===Systems Substitution Testing===
  
In the .systems file of the systems where you saved the game (data4.x/sectors/SectorName/), search for the planet that you want to test your texture on and replace the current texture in the 'file' statement with your texture, e.g.
+
In the .systems file of the systems where you saved the game (data/sectors/SectorName/), search for the planet that you want to test your texture on and replace the current texture in the 'file' statement with your texture, e.g.
 +
 
 +
*Take: <Planet name="Wiley" file="planets/rock.texture" ...>
 +
*Replace with: <Planet name="Wiley" file="planets/rocky_wiley.texture" ...>
 +
 
 +
Note: You can search in data dir using the command ''grep -R "rock_water.texture" sectors''
 +
 
 +
Should your planet texture not be listed in the sector definition files, you can edit the system config file "sectors/testsystems/planets.system" to change your texture on one of the existing planets and then run Vega Strike with the planet test mission:
 +
 
 +
''./vegastrike test/planets.mission''
 +
 
 +
===Editing Systems===
 +
 
 +
In some cases it is required to tweak the universe in order to add new textures.
 +
A very good HowTo explains the road to be taken here.
 +
* [[HowTo:Edit_Systems]] with
 +
** [[HowTo:Edit_Systems:Milkyway]]
 +
** [[HowTo:Edit_Systems:System_Files]]
 +
 
 +
==Selection and Vetting Process==
 +
 
 +
===Some Thoughts===
 +
While many textures are still with the DQ (development quality) status, it is important to quickly raise the quality of all textures to release status and beyond. In this stage, following the selection (or vetting) process might not be of the highest importance.
 +
However when replacing visually appealing textures or raising the overall quality to CQ (cinematographic) it is of advantage to share your decisions with the whole community. This is exactly the purpose of the selection and vetting process.
 +
 
 +
Enthusiasm, the strong motivation to contribute his own work, see it published in a release, and be part of the community, often brings the danger along of falling into the pitfall and want to contribute and replace too many textures at the same time.
 +
The more advanced in quality and visual appeal the textures become the more important it becomes to create a very distinct and personal look to the particular texture or even planet, since the ultimate goal is to have an individual surface for each planet.
 +
 
 +
Ultimately, nobody really knows how extra-solar planets look like but here are some references that might inspire you to create an individual, unique, and personal texture:
 +
* The planet name might give you some hints
 +
* The planet type says something about possible surface type
 +
* Analyze the essence of the existing texture in color, structure, area division
 +
* Inspire yourself by other works of art (paintings, computer generated art, astronomical sites, science-fiction movies)
 +
 
 +
And of course, push your tools to their limits.
 +
 
 +
Once you have chosen a replacement candidate and have one or more proposals...
 +
 
 +
===The Process===
 +
If you are not sure that your texture meets the basic requirements, then please open a forum topic posting your textures.
 +
Here's a summary of requirements:
 +
* Format: dds (with .texture extension)
 +
* Ratio (horizontal:vertical): 2:1
 +
* Size: following the POT rule (power-of-two)
 +
* Resolution: min 2048x1024
 +
* Tilable (seamless): horizontally and vertically
 +
* Quality: RQ or CQ
 +
 
 +
If a texture that you have created meets the above described requirements, then:
 +
* Open a poll for a reasonable period of time (e.g. 2 weeks) and describe:
 +
** which texture(s) you'd like to replace
 +
** show which are the candidates
 +
** describe briefly the method of creation
 +
** If you'd like to replace more than one texture, describe how you would assign the favorites of the poll to the individual textures
 +
 
 +
* After a set period of time
 +
** announce the winners
 +
** and call the poll closed
  
*Take: <Planet name="Wiley" file="planets/rock.png" ...>
+
* Then
*Replace with: <Planet name="Wiley" file="planets/rocky_wiley.png" ...>
+
** Submit the textures to svn (in case you have commit rights attributed), or
 +
** through the forum ask a developer with write access to submit them (e.g. the maintainer of this page, [[User:pyramid|pyramid]]).
  
 
==Submission Process==
 
==Submission Process==
  
 +
===Requirements===
 +
If you have svn commit access, then you will need nVidia's free texture tool nvcompress to transform your original textures to optimized dds textures.
 +
Get the tool here: [http://developer.nvidia.com/object/texture_tools.html NVIDIA Texture Tools]
 +
 +
The following applies to NVIDIA texture tools version 0.9.4. More recent versions have not yet been tested.
 +
 +
Due to a bug in handling 1 pixel mipmaps in the original version, you will be further required to patch the tools with safemode's patch. This can be obtained here: [http://signal-lost.homeip.net/files/nvidia-texture.patch save nvidia-texture.patch file]
 +
 +
Patch the texture tools, compile, and install them.
 +
 +
===Texture Optimization===
 +
Transform your original texture using nvcompress using the DXT1 format.
 +
 +
''nvcompress -bc1 textureoriginal1.png texture_dds.texture''
 +
 +
Verify the optimized texture either by opening it with the GIMP and making sure that 12 mipmap layers (for 2048x1024 resolution) are contained in the file, or by checking it with
 +
 +
''nvddsinfo texture_dds.texture''
 +
 +
Lightmap textures require the alpha channel to be included in the compressed texture. Use the DXT3 format to compress:
 +
 +
 +
''nvcompress -bc2 lightmap_master.png lightmap_texture_dds.texture''
 +
 +
===Committing to SVN===
 +
 +
If you have write access to svn then submit the textures after going through the community selection process.
 +
Otherwise, please call through a forum topic a developer with write access to submit them.
 +
 +
As of May 2008, svn has two directories for texture data:
 +
* /masters/textures that holds the original textures and also source files that were used to create the textures
 +
* /data/textures that holds the optimized dds/DXT1 textures
  
 
==Development Needs and Tasks==
 
==Development Needs and Tasks==
  
Proposed near-term development roadmap:
+
Proposed development roadmap:
*Phase 1: Replace existing textures with at least 2048x1024 textures (release quality)
+
*Phase 1 [91%]: Replace existing textures with at least 2048x1024 textures (release quality). Exceptionally sol textures should have minimum resolution of 1024x512 since hi resolution maps for solar system bodies are hard to find for all objects.
*Phase 2: Expand the set of textures to include more variety in milky_way.xml
+
*Phase 2 [ 0%]: Expand the set of textures to include more variety in milky_way.xml
*Phase 3: Develop cinematographic quality surface and atmosphere (cloud, weather) maps
+
*Phase 3 [ 0%]: Develop cinematographic quality surface (planet, lights) and atmosphere (cloud/weather) maps
  
List of tasks for textured surfaces: [[Development:2D_Images#Orbital_Planet_Surfaces]]
+
List of tasks for textured planet surfaces: [[Development:2D_Images#Orbital_Planet_Surfaces]]
  
 
=Procedural Surfaces=
 
=Procedural Surfaces=
  
At the time of writing (June 2006) no known implementation of procedural orbital planet surfaces exists in Vega Strike.
+
At the time of writing (February 2008) no known implementation of procedural orbital planet surfaces exists in Vega Strike.
 +
 
 +
However, an attempt has been started and you can find some more information in the following thread:
 +
* [http://forums.vega-strike.org/viewtopic.php?t=10520 seamless planetary descent with automatic mesh generation]
 +
 
 +
=References=
 +
References apply both to textured and procedural approaches if not stated otherwise.
 +
 
 +
==Software, Tools==
 +
For a comprehensive list of tools, please see:
 +
*[[Links:Graphic_Applications|Links:Graphic Applications]]
 +
*[[Links:3D_Applications|Links:3D Applications]]
 +
 
 +
==Wiki References==
 +
 
 +
Planets and Systems
 +
*Listing and description of planet types: [[Manual:Planet_types]]
 +
*Editing Systems using milky_way or system files: [[HowTo:Edit_Systems]]
 +
 
 +
Development Roadmap
 +
*Improved planet textures (Higher quality/Fractal Enhanced?): [[Development:Roadmap#Aspects_for_consideration]]
 +
*List of tasks for textured planet surfaces: [[Development:2D_Images#Orbital_Planet_Surfaces]]
 +
 
 +
==Forum References==
 +
 
 +
Texture Requirements
 +
*[http://forums.vega-strike.org/viewtopic.php?t=9160 4.4 release work]
 +
*[http://forums.vega-strike.org/viewtopic.php?t=9401 Artwork/data overhauls]
 +
 
 +
Development Tools
 +
*[http://forums.vega-strike.org/viewtopic.php?t=7055 Tools for creating planet textures]
 +
 
 +
Examples, Including, Testing
 +
*[http://forums.vega-strike.org/viewtopic.php?t=7116 Orbital planet surfaces: gas giants]
 +
*[http://forums.vega-strike.org/viewtopic.php?t=3664 Orbital planet surfaces]
 +
*[http://forums.vega-strike.org/viewtopic.php?t=5957 Some New Planets]
 +
*[http://forums.vega-strike.org/viewtopic.php?t=4008 stand clear. planets coming through]
 +
 
 +
Submission Process
 +
 
 +
Development Needs and Tasks
 +
*[http://forums.vega-strike.org/viewtopic.php?p=36698 Shady Planet...]
 +
*[http://forums.vega-strike.org/viewtopic.php?t=6200 YASP (Yet Another Shady Planet) ;-)]
 +
 
 +
Improvement and Development Proposals
 +
*[http://forums.vega-strike.org/viewtopic.php?t=3543 Auto-Enhancing Textures]
 +
*[http://forums.vega-strike.org/viewtopic.php?t=1970 Fractal Generation System]
 +
*[http://forums.vega-strike.org/viewtopic.php?t=2371 More pretty stuff: atmospheres and planet surfaces]
 +
 
 +
Planetary Flight Topics
 +
*[http://forums.vega-strike.org/viewtopic.php?t=4597 The official "Seamless Planetary Flight" thread]
 +
*[http://forums.vega-strike.org/viewtopic.php?t=9645 Theoretical planetside mode]
 +
 
 +
==External References==
 +
 
 +
===Gas Giant Surfaces===
 +
 
 +
*[http://www.daviddarling.info/encyclopedia/J/Jupiter.html#Atmosphere Jupiter Atmosphere]
 +
*[http://en.wikipedia.org/wiki/Jupiter_(planet)#Atmosphere Jupiter (planet)]
 +
*[http://antwrp.gsfc.nasa.gov/apod/ap970920.html The Clouds of Jupiter]
 +
*[http://fas.org/irp/imint/docs/rst/Sect19/Sect19_15.html Planetary Remote Sensing - Jupiter]
 +
*[http://opensourceschools.org/article.php?story=20030428204319316 Atmospheres of the Gas Giants]
 +
*[http://www.solstation.com/stars/jupiter.htm Solstation Jupiter]
 +
*[http://vims.artov.rm.cnr.it/data/res-jup.html The Cassini Instruments - Jupiter]
 +
 
 +
===Image References===
 +
*[http://i194.photobucket.com/albums/z305/owallgren/Vega%20Strike/PIA00144_ip.jpg Io and Europa over Jupiter]
 +
*[http://www.celestiamotherlode.net/catalog/images/screenshots/jupiter/4kjupiter__johnvanvliet.jpg Celestia Jupiter Map]
 +
*[http://www.celestiamotherlode.net/catalog/images/screenshots/neptune/neptune__tcorbin.jpg Celestia Neptune Map]
 +
*[http://www.mmedia.is/bjj/data/jupiter_css/jupiter_css.jpg Bjorn Jonsson's Planetary Maps]
 +
 
 +
===Tutorial References===
 +
* [https://web.archive.org/web/20150423145531/http://gallery.artofgregmartin.com/tuts_arts/making_a_planet.html "Make a planet" tutorial by Greg Martin]
 +
* [http://alyn.deviantart.com/art/Advanced-planet-creation-11885274 "Advanced planet creation" by alyn]
 +
 
 +
'''Author: [[User:pyramid|pyramid]]'''
  
=====Author: [[User:pyramid|pyramid]]=====
+
[[Category:Development]]

Latest revision as of 07:58, 31 May 2015

General

This page summarizes concepts and approaches to creating planet surfaces as seen from orbit. Topics of atmospheric entry and close-to-surface planetary topology and atmospheric effects or planetary flight should be covered in a separate document.

Two main topics are covered in this document:

  • Development of textured surfaces
  • Development of procedural surfaces

Textured Surfaces

Texture Requirements

Generic Image Requirements

Please read this Development:Graphics_Requirements page before continuing to the specific requirements.

Specific Image Requirements

Summary of Texture Requirements

Textures ready for submission should fulfill:

  • Codec: dds DXT1 with mipmaps for diffuse textures; dds DXT3 with mipmaps for citylight textures
  • Extension: .texture
  • Ratio (horizontal:vertical): 2:1
  • Size: following the POT rule (power-of-two)
  • Resolution: min 2048x1024
  • Tilable (seamless): horizontally and vertically
  • Quality: RQ or CQ

Image Resolution, Formats, and Quality

The planet surface graphics format currently recommended for the game is dds format with dxt1 compression, with filenames ending in .texture. (Before May 2008, DDS textures were stored in files named .png, because of references to filenames in other places.)

The image ratio horizontal:vertical must be 2:1 (assuming pixel ratio of the map is 1:1), since the texture is wrapped around the planet sphere horizontally around 360 degrees and vertically around 180 degrees. Necessarily, in order for the surface not to appear distorted, your pixel ratio of the generated texture must be 1.0, i.e. a circle must show as a circle when viewing the texture in an image viewer, on a monitor with square pixels.

The vertical and horizontal sizes should be a power of two (POT). Really, NPOT (non-power-of-two) textures are possible, but really, really, really troublesome. Don't use them. Just use POT. Love the POT. The POT is the mother, the POT is the father. Trust the POT.

That leaves few options:

  • 1024x512
  • 2048x1024
  • 4096x2048
  • 8192x4096

Keeping original high resolution image (e.g. 8192x4096 or 4096x2048) versions in stock helps maintaining quality and scalability as game development progresses or typical screen resolutions rise in the future with better hardware available to the players.

Most of the surface textures included in data have a horizontal resolution of 1024 or below. Committed textures are classified as:

  • DQ - Development Quality: textures with horizontal resolution of 1024 or below and low degree of realism
  • RQ - Release Quality: textures with horizontal resolution of 2048 or above and medium degree of realism
  • CQ - Cinematographic Quality: textures with horizontal resolution of 2048 or above and high degree of realism

Image Properties

Naturally, the images should be seamless (tilable) so that seams are not visible on the rotating planet, neither on the stitch nor at the poles.

3d rendering software with unwrap functions is recommended, since it is extremely inefficient and troublesome to create seamless textures in 2d programs.

Planet textures required

[source: klauss]

  • Diffuse color map (the actual planet texture)
  • Night map (with city lights); needs to have alpha channel for the transparent areas. Compression type must be DXT3.
  • Specular map as usual.
  • Cloudmap... not so usual. The cloudmap contains color in the color data - but base, unlit color. Until now, I couldn't find a case where the color portion of the texture wasn't uniform, so I might drop color "texture" for a uniform color "parameter" - but in any case, the texture contains the cloud's basic color in the color portion (fully white for earthish textures), and "thickness" in the alpha channel. What I did to create the current cloudmaps: transfer the color (grayscale) channel to the alpha channel, adjust its "dynamic distribution", kind-of gamma correction, to avoid saturation of the alpha channel as much as possible (it looks bad), and filled the color channel with white. Thickness means that - the thickness of clouds. It indirectly translates to their height. All clouds are based on the same level (they usually are in reality, minus some exceptions), and grow upwards as much as the alpha channel tells it to.
  • Normalmap as usual (though normalmaps are presently not required, they aren't any different from unit normalmaps: RGB with normal data, Alpha with height data).

Development Tools, Tutorials

GIMP

GIMP - the GNU Image Manipulation Program is quite versatile; to work with texture files, you'll need DDS plugin (if it's not installed already).

A good starting point for e.g. gas giant texture maps is the 'Solid Noise' filter.

There is a way to make planetary twisters like Uranus or so, using the Gimp. First you must create the gas texture, and then apply the distort filter into Filters>Distortions>Deformation. Then set the deformation type to "counterclockwise swirl", and the make one or two swirls. This will generate swirls at the surface.

On the other hand, if you like a hurricane zone, for example Jupiter's Great Red Spot, you can do it very simply: first select a ecliptic small zone, which will be the future hurricane. Then apply the filter Filters>Distortions>Lens Crystal, and apply a bit crystal lens distortion. Then, deselect that selected zone, and apply Filters>Distortions>Deformation, and set the deformation to "move", and move the left and right sides of the elliptical form a bit, just to make the effect of undercloud.

POV-Ray

[Links:3D_Applications#POV-Ray|POV-Ray (Persistence of Vision Raytracer)] with its unique scripting approach and through a large base of available texture, pigment, and material functions provides almost unlimited possibilities to creating surface maps.

Maps can be exported by using a spherical camera setting: camera {spherical angle 360}

Blender

[Links:3D_Applications#Blender|Blender 3D]

Scripts for blender can be created using Python. No application of blender for creation of planet surfaces is known to us currently. Submissions are appreciated.

Tutorials

Some great tutorials can be found at Solar Voyager. They are geared toward 3dsmax and Photoshop, but are general enough in scope that they could be easily adapted to GIMP and POV-Ray.

Including and Testing

Systems Substitution Testing

In the .systems file of the systems where you saved the game (data/sectors/SectorName/), search for the planet that you want to test your texture on and replace the current texture in the 'file' statement with your texture, e.g.

  • Take: <Planet name="Wiley" file="planets/rock.texture" ...>
  • Replace with: <Planet name="Wiley" file="planets/rocky_wiley.texture" ...>

Note: You can search in data dir using the command grep -R "rock_water.texture" sectors

Should your planet texture not be listed in the sector definition files, you can edit the system config file "sectors/testsystems/planets.system" to change your texture on one of the existing planets and then run Vega Strike with the planet test mission:

./vegastrike test/planets.mission

Editing Systems

In some cases it is required to tweak the universe in order to add new textures. A very good HowTo explains the road to be taken here.

Selection and Vetting Process

Some Thoughts

While many textures are still with the DQ (development quality) status, it is important to quickly raise the quality of all textures to release status and beyond. In this stage, following the selection (or vetting) process might not be of the highest importance. However when replacing visually appealing textures or raising the overall quality to CQ (cinematographic) it is of advantage to share your decisions with the whole community. This is exactly the purpose of the selection and vetting process.

Enthusiasm, the strong motivation to contribute his own work, see it published in a release, and be part of the community, often brings the danger along of falling into the pitfall and want to contribute and replace too many textures at the same time. The more advanced in quality and visual appeal the textures become the more important it becomes to create a very distinct and personal look to the particular texture or even planet, since the ultimate goal is to have an individual surface for each planet.

Ultimately, nobody really knows how extra-solar planets look like but here are some references that might inspire you to create an individual, unique, and personal texture:

  • The planet name might give you some hints
  • The planet type says something about possible surface type
  • Analyze the essence of the existing texture in color, structure, area division
  • Inspire yourself by other works of art (paintings, computer generated art, astronomical sites, science-fiction movies)

And of course, push your tools to their limits.

Once you have chosen a replacement candidate and have one or more proposals...

The Process

If you are not sure that your texture meets the basic requirements, then please open a forum topic posting your textures. Here's a summary of requirements:

  • Format: dds (with .texture extension)
  • Ratio (horizontal:vertical): 2:1
  • Size: following the POT rule (power-of-two)
  • Resolution: min 2048x1024
  • Tilable (seamless): horizontally and vertically
  • Quality: RQ or CQ

If a texture that you have created meets the above described requirements, then:

  • Open a poll for a reasonable period of time (e.g. 2 weeks) and describe:
    • which texture(s) you'd like to replace
    • show which are the candidates
    • describe briefly the method of creation
    • If you'd like to replace more than one texture, describe how you would assign the favorites of the poll to the individual textures
  • After a set period of time
    • announce the winners
    • and call the poll closed
  • Then
    • Submit the textures to svn (in case you have commit rights attributed), or
    • through the forum ask a developer with write access to submit them (e.g. the maintainer of this page, pyramid).

Submission Process

Requirements

If you have svn commit access, then you will need nVidia's free texture tool nvcompress to transform your original textures to optimized dds textures. Get the tool here: NVIDIA Texture Tools

The following applies to NVIDIA texture tools version 0.9.4. More recent versions have not yet been tested.

Due to a bug in handling 1 pixel mipmaps in the original version, you will be further required to patch the tools with safemode's patch. This can be obtained here: save nvidia-texture.patch file

Patch the texture tools, compile, and install them.

Texture Optimization

Transform your original texture using nvcompress using the DXT1 format.

nvcompress -bc1 textureoriginal1.png texture_dds.texture

Verify the optimized texture either by opening it with the GIMP and making sure that 12 mipmap layers (for 2048x1024 resolution) are contained in the file, or by checking it with

nvddsinfo texture_dds.texture

Lightmap textures require the alpha channel to be included in the compressed texture. Use the DXT3 format to compress:


nvcompress -bc2 lightmap_master.png lightmap_texture_dds.texture

Committing to SVN

If you have write access to svn then submit the textures after going through the community selection process. Otherwise, please call through a forum topic a developer with write access to submit them.

As of May 2008, svn has two directories for texture data:

  • /masters/textures that holds the original textures and also source files that were used to create the textures
  • /data/textures that holds the optimized dds/DXT1 textures

Development Needs and Tasks

Proposed development roadmap:

  • Phase 1 [91%]: Replace existing textures with at least 2048x1024 textures (release quality). Exceptionally sol textures should have minimum resolution of 1024x512 since hi resolution maps for solar system bodies are hard to find for all objects.
  • Phase 2 [ 0%]: Expand the set of textures to include more variety in milky_way.xml
  • Phase 3 [ 0%]: Develop cinematographic quality surface (planet, lights) and atmosphere (cloud/weather) maps

List of tasks for textured planet surfaces: Development:2D_Images#Orbital_Planet_Surfaces

Procedural Surfaces

At the time of writing (February 2008) no known implementation of procedural orbital planet surfaces exists in Vega Strike.

However, an attempt has been started and you can find some more information in the following thread:

References

References apply both to textured and procedural approaches if not stated otherwise.

Software, Tools

For a comprehensive list of tools, please see:

Wiki References

Planets and Systems

Development Roadmap

Forum References

Texture Requirements

Development Tools

Examples, Including, Testing

Submission Process

Development Needs and Tasks

Improvement and Development Proposals

Planetary Flight Topics

External References

Gas Giant Surfaces

Image References

Tutorial References

Author: pyramid