Issues.00507 - lordmundi/wikidoctest GitHub Wiki

00507: lunar soil and regolith effects

« 00506 | Issues | 00508 »

Summary: lunar soil and regolith effects

Created: 2014–03–19 16:49

Status: Released

Category: Request

From: frankie

Version: 2.3

Released_In: 2.4

Description:

this is a request for fractally defined craters and soil features on the moon that are defined further than the actual imagery.


Comments

frankie March 20, 2014, at 11:26 AM: This has been added. The various features can be enabled and disabled by tcl commands. In addition, the ground effects are implemented in the "new_moon" shaders in the shaders directory, so see those if you need to customize them further.

For customization, see "configs/planet2_moon.cfg". The new shaders are set in the "shaders" line for the layer. Be aware that the default is to use new_moon.fs, but if your moon definition includes a bmp_map layer, you need to switch to the commented out line that uses "new_moon_bmp.fs" so that the bmp map layer gets taken into account. Also, in configs/planet2_moon.cfg, the layer line also includes two new parameters for tesselation, which are documented in configs/planet2_earth.cfg.

The tcl commands are as follows:

# To enable the fractal soil and craters for close up views on the Moon
 doug.plugin dsp_planet2.parameter MOON.ground.effects_on set 1

 # To enable shadows able to be cast onto the planet surface
 doug.plugin dsp_planet2.option set -shadows 1

 # To enable tesselation of geometry for small craters (if video card supports it)
 doug.plugin dsp_planet2.option set -tesselation 1

 # To enable the planet itself to cast shadows onto itself and geometry (WARNING:
 # performance intensive!)
 doug.plugin dsp_planet2.option set -planetshadows 1

 # To get the current values:
 dsp_planet2.option get -shadows
 dsp_planet2.option get -planetshadows
 dsp_planet2.option get -tesselation 

If you want these effects to turn on and off across all connected clients and be saved in a state, tie the effects to flags on a MOON_EFFECTS node. Add in a node called "MOON_EFFECTS" in your customized planet2_moon.cfg, and then run a script that is something like:

doug.callback add update -nodes "MOON_EFFECTS" -tags "MOON_EFFECTS" {
	if { [doug.node MOON_EFFECTS test "HIDE"] == "1" } {
		doug.plugin dsp_planet2.parameter MOON.ground.effects_on set 0
		doug.plugin dsp_planet2.option set -shadows 0
		doug.plugin dsp_planet2.option set -tesselation 0
	} else {
		doug.plugin dsp_planet2.parameter MOON.ground.effects_on set 1
		doug.plugin dsp_planet2.option set -shadows 1
		if { [doug.node MOON_EFFECTS test "HIGHLIGHT"] == "1" } {
			doug.plugin dsp_planet2.option set -tesselation 1
		} else {
			doug.plugin dsp_planet2.option set -tesselation 0
		}
	}
}

« 00506 | Issues | 00508 »

Associated Commits

| commit | bb3750d1ddc20301f14119a0243e46965f91268d link5 | || | Author: | Frank Graffagnino | | Date: | Tue Apr 15 09:33:04 2014 -0500 | | Message: | [@Issue 00507: Added in MOON_EFFECTS node and tcl script @] |

Affected Files:

configs/planet2_moon.cfg |  2 ++
 gui/moon_effects.tcl     | 16 ++++++++++++++++
 2 files changed, 18 insertions(+)

| commit | c11131806534704b63b8ff0959f3d05d9cf1d44d link6 | || | Author: | Frank Graffagnino | | Date: | Mon Apr 14 14:58:17 2014 -0500 | | Message: | [@Issue 00507: Adding in shaders and texture files for lunar soil effects @] |

Affected Files:

shaders/new_moon.fs          | 265 +++++++++++++++++++++++++++++++++++++++++++
 shaders/new_moon.vs          | 105 +++++++++++++++++
 shaders/new_moon_bmp.fs      | 264 ++++++++++++++++++++++++++++++++++++++++++
 textures/crater_dispmap.png  | Bin 0 -> 132400 bytes
 textures/crater_nrmmap.png   | Bin 0 -> 194924 bytes
 textures/dirt_nrmmap.png     | Bin 0 -> 2956988 bytes
 textures/lunar2.png          | Bin 0 -> 1467464 bytes
 textures/regolith_imgmap.jpg | Bin 0 -> 5531135 bytes
 8 files changed, 634 insertions(+)

| commit | fcd44e9830e1c07d13fb367fb8f894df51b24f04 link7 | || | Author: | Frank Graffagnino | | Date: | Wed Mar 19 17:07:51 2014 -0500 | | Message: | [@Issue 00507: Added updates to planet2 and speedtest3 for lunar soil effects. @] |

Affected Files:

configs/planet2_earth.cfg          |   2 ±
 configs/planet2_moon.cfg           |   4 ++±
 plugin_Darwin/dsp_planet2.so       | Bin 457600 -> 518092 bytes
 plugin_Darwin/dsp_speedtest3.so    | Bin 728304 -> 725404 bytes
 plugin_Linux_FC3/dsp_planet2.so    | Bin 486140 -> 554367 bytes
 plugin_Linux_FC3/dsp_speedtest3.so | Bin 692350 -> 688615 bytes
 plugin_Win32/dsp_planet2.dll       | Bin 1308025 -> 1379977 bytes
 plugin_Win32/dsp_speedtest3.dll    | Bin 1022648 -> 1020757 bytes
 8 files changed, 4 insertions(+), 2 deletions(-)