Env skypaint: Difference between revisions
Jump to navigation
Jump to search

Important:The name of the skybox must be
Note:The colors are in color1 format instead of color255. In order to convert color255 to color1, divide each value by 255 (ex: 200/255=0.78).
Warning:Not to be confused with env_sun.
(Created page with "{{cleanup}} {{stub}} left|link= <code>env_skypaint</code> is a point entity available in {{GMOD}}Garry's Mod. It allows to create custom dy...") |
(Added new keyvalue and inputs from latest Garry's Mod updates.) |
||
| (13 intermediate revisions by 7 users not shown) | |||
| Line 1: | Line 1: | ||
{{ | {{LanguageBar}} | ||
{{ | {{this is a|logical entity|name=env_skypaint|notext=1|game=Garry's Mod}} | ||
It allows the creation of custom dynamic skyboxes (Both [[HDR]] and [[LDR]]). It can be overridden by the Sky Editor ([[edit_sky]]) entity spawned by the player in game. | |||
[[ | [[File:Construct_sky.jpg|thumb|gm_construct uses env_skypaint]] | ||
[[File:Construct_sky.jpg|thumb|gm_construct | [[File:Flatgrass_sky.jpg|thumb|gm_flatgrass also uses env_skypaint]] | ||
[[File:Flatgrass_sky.jpg|thumb|gm_flatgrass | {{important|The name of the skybox must be <code>painted</code> in order for this entity to work}} | ||
{{note|1=The colors are in [[color1]] format instead of [[color255]]. In order to convert color255 to color1, divide each value by 255 (ex: 200/255=0.78).}} | |||
{{ | |||
==Sky creation== | ==Sky creation== | ||
# Place <code>env_skypaint</code> somewhere in your map | # Place <code>env_skypaint</code> somewhere in your map. | ||
# Change sky name to <code>painted</code> | # Change sky name to <code>painted</code>. | ||
# Compile and run map | # Compile and run map. | ||
# Go to | # Using the spawnmenu, spawn the Sky Editor entity somewhere in your map (in the Entities tab under "Editors"). | ||
# When your done, | # Go to entity's properties and edit the values as you wish. | ||
# Compile map again. DONE | # When your're done, copy the values to your <code>env_skypaint</code>. | ||
# Compile the map again. DONE | |||
== env_skypaint example values == | == env_skypaint example values == | ||
{| class="standard-table" style="width: 100%; text-align: center;" | {| class="standard-table" style="width: 100%; text-align: center;" | ||
| Line 21: | Line 20: | ||
|- | |- | ||
| gm_construct | | gm_construct | ||
| {{vec3|0.22|0.51|1}} || {{vec3|0.919|0.929|0.992}} | | style="background:#3883ff;color:black"|{{vec3|0.22|0.51|1}} | ||
| style="background:#eaedfd;color:black"| {{vec3|0.919|0.929|0.992}} | |||
| 0.1 | |||
| 0 | |||
| {{vec3|0|0|1}} | |||
| Automatic | |||
| style="background:#000000;"| {{vec3|0|0|0}} | |||
| 0.5 | |||
| 2 | |||
| style="background:#ffffff;color:black"|{{vec3|1|1|1}} | |||
| Yes | |||
| skybox/clouds | |||
| 2 | |||
| 0.5 | |||
| 0.03 | |||
| 0.56 | |||
|- | |- | ||
| gm_flatgrass | | gm_flatgrass | ||
| {{vec3|0|0.6|1}} || {{vec3|0.9|0.95|1}} | | style="background:#0099ff;color:black"|{{vec3|0|0.6|1}} | ||
| style="background:#e6f2ff;color:black"|{{vec3|0.9|0.95|1}} | |||
| 0.5 | |||
| 0 | |||
| {{vec3|0|0|1}} | |||
| Automatic | |||
| style="background:#000000;"|{{vec3|0|0|0}} | |||
| 0 | |||
| 0 | |||
| style="background:#000000;"|{{vec3|0|0|0}} | |||
| Yes | |||
| skybox/clouds | |||
| 2 | |||
| 0.5 | |||
| 0.02 | |||
| 0.60 | |||
|} | |} | ||
==Keyvalues== | ==Keyvalues== | ||
{{KV | {{KV Targetname}} | ||
{{KV|Sky Top Color|topcolor| | {{KV|Sky Top Color|intn=topcolor|color1|The colour of the top of the sky.}} | ||
{{KV|Sky Bottom Color|bottomcolor| | {{KV|Sky Bottom Color|intn=bottomcolor|color1|The colour of the bottom of the sky.}} | ||
{{KV|Sky Fade Bias|fadebias| | {{KV|Sky Fade Bias|intn=fadebias|float|Controls the bias of the fade between top/bottom. (1.0 is even)}} | ||
{{KV|Sun Size|sunsize| | {{KV|Sun Size|intn=sunsize|float|Controls the size of the sun glow.}} | ||
{{warning| | {{warning|Not to be confused with [[env_sun]].}} | ||
{{KV|Sun Normal|sunnormal}} | {{KV|Sun Normal|intn=sunnormal|vector|The position of the sun, expressed as a normal from the center of the world.}} | ||
{{KV|Sun Position Method| | {{KV|Sun Position Method|intn=sunposmethod|choices|How should we determine the position of the sun?}} | ||
{{KV|Sun Color|suncolor| | :* 0: Custom - Use the Sun Normal to position the sun | ||
{{KV|Dusk Scale|duskscale| | :* 1: Automatic - Find a env_sun entity and use that (Uses [[env_sun]] values) | ||
{{KV|Dusk Intensity|duskintensity|How powerful the dusk effect is.}} | {{KV|Sun Color|intn=suncolor|color1|The color of the sun glow. (this is additive)}} | ||
{{KV|Dusk Color|duskcolor| | {{KV|Dusk Scale|intn=duskscale|float|The size of the dusk effect. (colouring of the horizon)}} | ||
{{KV|Draw Stars|drawstars| | {{KV|Dusk Intensity|intn=duskintensity|float|How powerful the dusk effect is.}} | ||
{{note| | {{KV|Dusk Color|intn=duskcolor|color1|The color of the dusk effect.}} | ||
{{KV|Stars Texture|starstexture| | {{KV|Draw Stars|intn=drawstars|choices|Whether to draw the star/cloud texture at all.}} | ||
{{KV|Stars Scale|starsscale| | :* 0: No - Don't draw stars | ||
{{KV|Star Fade|starsfade|Fade the star texture towards the horizon.}} | :* 1: Yes - Draw the stars please | ||
{{KV|Stars Speed|starsspeed|How fast the star texture should scroll across the sky.}} | :{{note|Drawn using [[additive]] translucency.}} | ||
{{KV|HDR Scale|hdrscale|When rendering your skybox in HDR mode, output will be scaled by this amount.}} | {{KV|Stars Texture|intn=starstexture|string|The star texture.}} | ||
== | {{KV|Stars Scale|intn=starsscale|float|How big the star texture should be.}} | ||
{{ | {{KV|Star Fade|intn=starsfade|float|Fade the star texture towards the horizon.}} | ||
{{ | {{KV|Stars Speed|intn=starsspeed|float|How fast the star texture should scroll across the sky.}} | ||
{{ | {{KV|Star Layers|intn=starlayers|float|From 1 to 3, how many layers should the star texture be repeated over.}} | ||
== | {{KV|HDR Scale|intn=hdrscale|float|When rendering your skybox in HDR mode, output will be scaled by this amount.}} | ||
{{ | ==Inputs== | ||
{{I|SetTopColor|Sets the colour of the top of the sky.|param=color255}} | |||
{{I|SetBottomColor|Sets the colour of the bottom of the sky.|param=color255}} | |||
{{I|SetFadeBias|Sets the bias of the fade between top/bottom. (1.0 is even)|param=float}} | |||
{{I|SetSunSize|Sets the size of the sun glow.|param=float}} | |||
{{I|SetSunNormal|Sets the position of the sun, expressed as a normal from the center of the world.|param=vector}} | |||
{{I|SetSunColor|Sets the color of the sun glow. (this is additive)|param=color255}} | |||
{{I|SetDuskScale|Sets the size of the dusk effect. (colouring of the horizon)|param=float}} | |||
{{I|SetDuskIntensity|Sets how intense the dusk effect is.|param=float}} | |||
{{I|SetDuskColor|Sets the color of the dusk effect.|param=color255}} | |||
{{I|StarTexture|Sets the star texture.|param=string}} | |||
{{I|StarScale|Sets how big the star texture should be.|param=float}} | |||
{{I|StarFade|Sets the fading term of the star texture towards the horizon.|param=float}} | |||
{{I|StarSpeed|Sets how fast the star texture should scroll across the sky.|param=float}} | |||
{{I|StarLayers|Sets how many layers should the star texture be repeated over. (1 to 3)|param=float}} | |||
{{I|HDRScale|Sets the amount by which output will be scaled in HDR mode.|param=float}} | |||
Latest revision as of 23:14, 26 September 2025
env_skypaint is a logical entity available in
Garry's Mod.
It allows the creation of custom dynamic skyboxes (Both HDR and LDR). It can be overridden by the Sky Editor (edit_sky) entity spawned by the player in game.
painted in order for this entity to workSky creation
- Place
env_skypaintsomewhere in your map. - Change sky name to
painted. - Compile and run map.
- Using the spawnmenu, spawn the Sky Editor entity somewhere in your map (in the Entities tab under "Editors").
- Go to entity's properties and edit the values as you wish.
- When your're done, copy the values to your
env_skypaint. - Compile the map again. DONE
env_skypaint example values
| Map | Sky Top Color | Sky Bottom Color | Sky Fade Bias | Sun Size | Sun Normal | Sun Position Method | Sun Color | Dusk Scale | Dusk Intensity | Dusk Color | Draw Stars | Star Texture | Star Scale | Star Fade | Star Speed | HDR Scale |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| gm_construct | 0.22 0.51 1 | 0.919 0.929 0.992 | 0.1 | 0 | 0 0 1 | Automatic | 0 0 0 | 0.5 | 2 | 1 1 1 | Yes | skybox/clouds | 2 | 0.5 | 0.03 | 0.56 |
| gm_flatgrass | 0 0.6 1 | 0.9 0.95 1 | 0.5 | 0 | 0 0 1 | Automatic | 0 0 0 | 0 | 0 | 0 0 0 | Yes | skybox/clouds | 2 | 0.5 | 0.02 | 0.60 |
Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentnameortarget).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- Sky Top Color (topcolor) <color1>
- The colour of the top of the sky.
- Sky Bottom Color (bottomcolor) <color1>
- The colour of the bottom of the sky.
- Sky Fade Bias (fadebias) <float>
- Controls the bias of the fade between top/bottom. (1.0 is even)
- Sun Size (sunsize) <float>
- Controls the size of the sun glow.
- Sun Normal (sunnormal) <vector>
- The position of the sun, expressed as a normal from the center of the world.
- Sun Position Method (sunposmethod) <choices>
- How should we determine the position of the sun?
- 0: Custom - Use the Sun Normal to position the sun
- 1: Automatic - Find a env_sun entity and use that (Uses env_sun values)
- Sun Color (suncolor) <color1>
- The color of the sun glow. (this is additive)
- Dusk Scale (duskscale) <float>
- The size of the dusk effect. (colouring of the horizon)
- Dusk Intensity (duskintensity) <float>
- How powerful the dusk effect is.
- Dusk Color (duskcolor) <color1>
- The color of the dusk effect.
- Draw Stars (drawstars) <choices>
- Whether to draw the star/cloud texture at all.
- 0: No - Don't draw stars
- 1: Yes - Draw the stars please
Note:Drawn using additive translucency.
- Stars Texture (starstexture) <string>
- The star texture.
- Stars Scale (starsscale) <float>
- How big the star texture should be.
- Star Fade (starsfade) <float>
- Fade the star texture towards the horizon.
- Stars Speed (starsspeed) <float>
- How fast the star texture should scroll across the sky.
- Star Layers (starlayers) <float>
- From 1 to 3, how many layers should the star texture be repeated over.
- HDR Scale (hdrscale) <float>
- When rendering your skybox in HDR mode, output will be scaled by this amount.
Inputs
- SetTopColor <color255>
- Sets the colour of the top of the sky.
- SetBottomColor <color255>
- Sets the colour of the bottom of the sky.
- SetFadeBias <float>
- Sets the bias of the fade between top/bottom. (1.0 is even)
- SetSunSize <float>
- Sets the size of the sun glow.
- SetSunNormal <vector>
- Sets the position of the sun, expressed as a normal from the center of the world.
- SetSunColor <color255>
- Sets the color of the sun glow. (this is additive)
- SetDuskScale <float>
- Sets the size of the dusk effect. (colouring of the horizon)
- SetDuskIntensity <float>
- Sets how intense the dusk effect is.
- SetDuskColor <color255>
- Sets the color of the dusk effect.
- StarTexture <string>
- Sets the star texture.
- StarScale <float>
- Sets how big the star texture should be.
- StarFade <float>
- Sets the fading term of the star texture towards the horizon.
- StarSpeed <float>
- Sets how fast the star texture should scroll across the sky.
- StarLayers <float>
- Sets how many layers should the star texture be repeated over. (1 to 3)
- HDRScale <float>
- Sets the amount by which output will be scaled in HDR mode.