3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1] 2 3

Author Topic: Planet shader - FINISHED!  (Read 5690 times)

« on: April 09, 2010, 04:26:20 PM »
This is a flexible planet shader for space related projects
It is a multipass SM2 shader which uses 6 textures :

- Diffusemap - default colormap
- Normalmap - and its bump
- Glowmap - for cities
- Specularmap - oceans shine
- Cloudmap - for moving clouds
- Wavemap - noise in the oceans

Included one full texture set for an earth like planet using 2048x1024 textures.
Example project ( PlanetDemo1.3dr ) - a v6.45 compatible project containing the shader.

For designing new planets I highly recommend Lunarcell plugin from Flamingpear (works on PSPX and PS)

Tweakables for the shader are these :
Code: [Select]
//-------------------------------------
//Cloud Settings
//-------------------------------------
float cloudSpeed           = 0.0025f; 
float cloudHeight          = 0.001f;
float cloudShadowIntensity = 0.75f;
float cloudLum             = 2.0f;

//-------------------------------------
//Atmosphere settings
//-------------------------------------
float outerSize   = 2.75f;     //How far out will outer athmosphere go
float innerSize   = 0.002f;    //How far out will inner athmosphere go

float innerStrength  = 0.75f;  //Amount of light emitting in inner athmosohere 
float innerSpread    = 0.25f;  //Amount of light spreading in inner athmosphere
float outerStrength  = 3.5f;   //Amount of light emitting in outer athmosphere
float outerSpread    = 3.5f;   //Amount of light spreading throughout the outer athmosphere

float atmosR = 0.4f;   //Amount of Red
float atmosG = 0.7f;    //Amount of Green
float atmosB = 1.0f;   //Amount of Blue
float atmosA = 1.0f;    //Amount of Alpha

//----------------------------------------------------------------------------------------------------------------------
//     Texture         Filename                                               //Mapname from Lunarcelll
//----------------------------------------------------------------------------------------------------------------------
string DiffuseTX     = ".\\3DRad_res\\fxTextures\\planets\\3_diffuse.dds";    //map color
string DiffuseNM     = ".\\3DRad_res\\fxTextures\\planets\\3_bump.dds";       //bump w/o oceans (convert into normalmap)
string CloudsTX      = ".\\3DRad_res\\fxTextures\\planets\\3_clouds.png";     //cloudmask (needs to be transparent)
string GlowTX        = ".\\3DRad_res\\fxTextures\\planets\\3_cities.dds";     //cities
string SpecularTX    = ".\\3DRad_res\\fxTextures\\planets\\3_reflection.dds"; //oceanmask (invert this)
string WavesTX       = ".\\3DRad_res\\fxTextures\\planets\\WaterRipples.dds";

Have fun :)
« Last Edit: April 14, 2010, 04:07:18 PM by shadmar »
« Reply #1 on: April 09, 2010, 04:34:18 PM »
nice! reminds of and xna example I saw once, good job!
using 3Drad 7.22

system specs:
Windows 7 Home Premium 64-bit
Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz (4 CPUs), ~3.2Ghz
8 gig ram
Geforce GTX 650 1024 MB GDDR5
DirectX 11
« Reply #2 on: April 09, 2010, 04:39:01 PM »
It is actually an XNA shader I converted, good catch Gene :)
« Reply #3 on: April 09, 2010, 05:29:47 PM »
Great stuff!  :)
Roll out!
http://www.youtube.com/watch?v=VD8MvMaPNO4

Do you have kids between the ages of 3 and 9?

http://www.amazon.com/dp/B007K1EFC6
« Reply #4 on: April 09, 2010, 07:29:34 PM »
that looks really awesome

Currently using 7.22

psikotropico

« Reply #5 on: April 09, 2010, 09:06:01 PM »
nice background
« Reply #6 on: April 11, 2010, 05:57:01 AM »
A couple of more
All maps made in PSPX using flamingpears lunarcell plugin.
Also added a sun flare.
« Reply #7 on: April 11, 2010, 02:56:16 PM »
Good stuff!

I'm looking forward to seeing this finished. Don't spose I could get a copy of that skycube shadmar?
« Reply #8 on: April 11, 2010, 03:14:49 PM »
Good stuff!

I'm looking forward to seeing this finished. Don't spose I could get a copy of that skycube shadmar?
Chebob, if you got 20 bucks, then these look pretty tight!
http://www.gamebeep.com/textures/Space-Themed-Skybox-Pack
« Reply #9 on: April 11, 2010, 03:17:06 PM »
They do look rather nice. Not sure I'm willing to pay for skyboxes though!
« Reply #10 on: April 11, 2010, 09:36:56 PM »
looking great Shad!
using 3Drad 7.22

system specs:
Windows 7 Home Premium 64-bit
Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz (4 CPUs), ~3.2Ghz
8 gig ram
Geforce GTX 650 1024 MB GDDR5
DirectX 11
« Reply #11 on: April 13, 2010, 03:29:56 PM »

Alien planet (made in lunarcell+pspx) in my game project consept using the shader.

@chebob69, skybox attached.

« Reply #12 on: April 13, 2010, 03:37:42 PM »
fantastic Shad! really brings out a great atmosphere, 5*!
using 3Drad 7.22

system specs:
Windows 7 Home Premium 64-bit
Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz (4 CPUs), ~3.2Ghz
8 gig ram
Geforce GTX 650 1024 MB GDDR5
DirectX 11
« Reply #13 on: April 13, 2010, 05:24:26 PM »
This is awesome shad!  Any tutorials on how you did the skybox?
« Reply #14 on: April 14, 2010, 06:19:52 AM »
Thanks Gene. :)


Seems like the skybox is the main focus here.....
I used spacscape written by petrocket.
http://sourceforge.net/projects/spacescape/
« Last Edit: April 14, 2010, 06:22:45 AM by shadmar »
Pages: [1] 2 3