RedSDK Global Environments



RedSDK supports three global Environment types:


  • Plain
  • Environment Map
  • Sky



Plain


Plain sets the background a selected color.


  • Color Slider - Use the slider to adjust the Hue/Value ratio
  • Color Button - Click the Color button to open the Select Color dialog.



Environment Map


The Environment map use two components, both optional.
Cube Map - This generates a 3 dimensional image projected surround the center of the drawing at an infinite distance.
Background - This generates a virtual image which is used to generate background imagery in reflective materials.

PARAMETERS


  • Cube Map File Name – Name and Location of the Cube image.
  • Cube Map Projection Type – Type of the environment to project.
    • SPHERICAL – Environment mapping type for The source image must be a latitude / longitude spherical map. The (u,v) = (0,0.5) texture map point intersects the X axis of the cube map; the (u,v) = (0,1) texture map point intersects the Z axis of the cube map.
    • CYLINDRICAL – Environment mapping type for The source image is wrapped as a cylinder to define the cube map. The cylinder axis is aligned with the Z axis of the cube map. The (u,v) = (0,0.5) point is mapped along the X axis of the cube map.
    • HEMISPHERICAL – Environment mapping type for The source image must be a latitude / longitude hemispherical map. This is similar to the ENV_SPHERICAL mapping considering only the part of the map above the line of horizon. The (u,v) = (0,0) texture map point intersects the X axis of the cube map; the (u,v) = (0,1) texture map point intersects the Z axis of the cube map.
  • Cube Map Size – Size in pixels of the cube map faces (must be power of two).
  • Cube Map Border Color – Border color of the source image.
  • Cube Map U Wrap Mode –U wrap mode of the source image.
    • REPEAT – Repeat the texture pattern out of the texture's limits.
    • MIRRORED REPEAT – Repeat the texture pattern with an inversion of the texture out of the texture's limits.
    • CLAMP – The texture sampling result is zero outside of the texture's limits.
    • CLAMP TO_EDGE – The texture sampling results remain slightly inside the texture when it's out of the texture's limits.
    • CLAMP TO_BORDER – The texture sampling results are set to the texture's border color when it's out of the texture's limits.
  • Cube Map V Wrap Mode –V wrap mode of the source image.
    • REPEAT – Repeat the texture pattern out of the texture's limits.
    • MIRRORED REPEAT – Repeat the texture pattern with an inversion of the texture out of the texture's limits.
    • CLAMP – The texture sampling result is zero outside of the texture's limits.
    • CLAMP TO EDGE – The texture sampling results remain slightly inside the texture when it's out of the texture's limits.
    • CLAMP TO BORDER – The texture sampling results are set to the texture's border color when it's out of the texture's limits.
  • Cube Map Format – Pixel format of to be used in calculating the Cube.
    • RGBA – 8 bits per component, 32 bits per pixel, RGBA in memory.
    • RGB – 8 bits per component, 24 bits per pixel, RGB in memory.
    • FLOAT – s1e8m23 IEEE floating point format. 32 bits per pixel.
    • FLOAT RGBA – 1 float per component, 128 bits per pixel, RGBA in memory.
    • FLOAT RGB – 1 float per component, 96 bits per pixel, RGB in memory.
    • L8 – 8 bits per component, 8 bits per pixel, L in memory. Loaded as a (L,L,L,1) texture on the GPU.
    • A8 – 8 bits per component, 8 bits per pixel, A in memory. Loaded as a (0,0,0,A) texture on the GPU.
    • RGBA DXT1 – Compressed image format (lossy). Uses one bit for alpha values. It is the largest compressed form along with RGB DXT1
    • RGBA DXT3 – Compressed image format (lossy). Uses a better encoding for alpha values. Uses more memory than RGBA DXT1
    • RGBA DXT5 – Compressed image format (lossy). Uses the best alpha encoding that is available for these compressed formats. Uses the same memory amount as the RGBA DXT3
    • RGB DXT1 – Compressed image format (lossy). It is the largest compressed form along with  RGBA DXT1.
    • HALF FLOAT – Half-float format. 16 bits per pixel.
    • HALF FLOAT RGBA – Half-float RGBA format. 16 bits per component, 48 bits per pixel.
    • HALF FLOAT RGB – Half-float RGB format. 16 bits per component, 64 bits per pixel.
    • FLOAT RGBA AA – Float RGBA format for anti-aliased images. 128 bits per pixel.
  • Background File Name – Name and Location of the Background image.
  • Background U Wrap Mode – Pixel U wrap mode of the source image.
  • Background V Wrap Mode – Pixel V wrap mode of the source image. 


Sky


This environment generates a sky and if desired a light source that cast light from a dome surrounding the scene.  

PARAMETERS


  • Visible - toggles the visibility of the sky
  • Environment Map - Select the environment map - either None or Sky Texture 3D
  • Background - Select the background - either None or Sky Texture 2D
  • Sky Model - This is always locked to the Physical Sky Model which will be used to generate Physical Sky effect if these are used for the Environment Map or Background


Environment Map: Sky Texture 3D



  • Size in pixels - Width of the output texture. Must be a multiple of 2.
  • Source - Image or Physical sky.
    • File Name - file and location of the image file if image is selected.  
  • Hemispherical - true if the generated map should cover an hemisphere, false to cover the whole sphere
  • Horizon Direction - Sets the horizon direction within the drawing.
  • Zenith Direction - Sets the zenith direction within the drawing.
  • Gray Scale - Render the sky in gray.


Background: Sky Texture 2D


This can be set to Wrapped Image or Physical Sky

If set to Wrapped Image parameters must be set.


  • File Name - file and location of the image file if image is selected. 
  • U Wrap Mode –U wrap mode of the source image.
    • REPEAT – Repeat the texture pattern out of the texture's limits.
    • MIRRORED REPEAT – Repeat the texture pattern with an inversion of the texture out of the texture's limits.
    • CLAMP – The texture sampling result is zero outside of the texture's limits.
    • CLAMP TO_EDGE – The texture sampling results remain slightly inside the texture when it's out of the texture's limits.
    • CLAMP TO_BORDER – The texture sampling results are set to the texture's border color when it's out of the texture's limits.
  • V Wrap Mode –V wrap mode of the source image.
    • REPEAT – Repeat the texture pattern out of the texture's limits.
    • MIRRORED REPEAT – Repeat the texture pattern with an inversion of the texture out of the texture's limits.
    • CLAMP – The texture sampling result is zero outside of the texture's limits.
    • CLAMP TO EDGE – The texture sampling results remain slightly inside the texture when it's out of the texture's limits.
    • CLAMP TO BORDER – The texture sampling results are set to the texture's border color when it's out of the texture's limits.


Physical Sky



  • Convert emitter units to meters - Scaling factor to convert scene units to meters.
  • Extra scale - a multiplier applied to the scaling.
  • View height in meters - Height of the viewer in atmosphere in meters (0, +).
  • Turbidity – The amount of molecules in the atmosphere (0, 100). The higher, the more foggy. Default value of 20 is good for European countries.
  • Albedo – The amount of sun light reaching the ground which is reflected back to the sky per RGB color component [0, 1]. A default value of 0.3 per component is good.
  • Aerosols Albedo – The amount of sun light reaching the aerosols which is reflected back to the sky [0, 1]. The light which is not reflected is absorbed by aerosols.
  • Asymmetry Factor - Controls the anisotropy of the light reflection due to aerosols [-1, 1]. 0 is for fully isotropic aerosols, 1 is anisotropic (towards the viewer), -1 is anisotropic (towards the source).
  • Sun Dir - Direction towards the sun (does not need to be a unit direction) from the center of the earth.
  • Sun dir by geo-location - Set the suns location by the geo-location and time of the drawing.
  • Sun Radius Scale - Sun radius scaling (set it to 1.0 to get the real sun size).
  • Sun Intensity Multiplier - sun intensity multiplier (set it to 1.0 to get the real sun intensity).
  • Moon Dir - direction towards the moon (does not need to be a unit direction) from the center of the earth.
  • Moon dir by geo-location - Set the moons location by the geo-location and time of the drawing.
  • Moon Radius Scale - Moon radius scaling (set it to 1.0 to get the real moon size).
  • Moon Intensity Multiplier - moon intensity multiplier (set it to 1.0 to get the real moon intensity).
  • Stars Intensity Multiplier - Stars intensity multiplier (set it to 1.0 to get the real stars intensities).
  • Width - Width of the output texture. Must be a multiple of 2
  • Saturation - saturation factor applied to the whole model. If saturation is set to 1.0, colors are returned as computed by the model. For other values, returned colors will look more greyish. The valid range of values is [0, 1].
  • Sky Multiplier - Sky multiplier applied to each pixel in the texture. Set it to 1.0 to create a physically accurate texture of the sky. Lower values can be used to simulate the effect of clouds or environment on the sky intensity.
  • Include sun - true to render the sun into the texture, false otherwise.