light scattering & day night/cycle system ?

Questions techniques liées à l’utilisation d'Unity (et n'entrant pas dans le cadre d'une des sections suivantes)
alban69000
Messages : 29
Inscription : 04 Oct 2013 20:09

light scattering & day night/cycle system ?

Message par alban69000 » 10 Oct 2013 16:25

Salut à tous, je viens d'acheter des une interface se nommant "light scattering & day night/cycle system" sur l'asset store. Ca a l'air très bien d'ailleurs mais je ne comprends pas comment l'utiliser, il y a une scène d'exemple avec des scripts dans des objets, mais ils ne disent pas la même chose sur le readme, et je n'arrive à rien. Quelqun peut m'éclaircir s'il vous plait ?
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Scattering feature
Hoffman & Preetham light scattering is an algorithmic approach to model
how light will deflect off gas particles in the atmosphere.
The main goal of the algorithm is to define two angles of approach for
light particles entering the eye.
This package is a basic implementation of the algorithm and has some areas that need to be improved.

Day Night cycle
A second features of this package is accurate positioning of the sun based on time and location (latitude/longitude)

How-to use
- make sure there is a directional light in your scene (this will act as the sun)
- Add the sky dome and terrain mesh to your scene
- Create a gameobject and place the script "Atmosphere" on it.
- You will see that the sky dome change when you adjust your settings.

When you select the gameobject which has the scattering script on it you can set some settings :

Time
Choose you time (day month year) and enter a hour and minute value.
This will be used to calculate the sunrise and sunset.

location
You can pre-select an area code and press apply to load some Latitude and Longitude or you can enter them manually (you can get them from google-maps)

Light-scattering settings
Rayleigh coefficient : amount of effect with the Rayleigh phase has. (Recommended setting greater then 0.8)
Rayleigh scattering is caused by small molecules in the air, and it scatters light more heavily at the shorter wavelengths (blue first, then green, and then red).
The sky is blue because the blue light bounces all over the place, and ultimately reaches your eyes from every direction. The sun's light turns yellow/orange/red
at sunset because as light travels far through the atmosphere, almost all of the blue and much of the green light is scattered away before it reaches you, leaving just the reddish colors.

Mie coefficient : amount if effect the Mie phase has (recommended setting below 0.2)
Mie scattering is caused by larger particles in the air called aerosols (such as dust and pollution), and it tends to scatter all wavelengths of light equally.
On a hazy day, Mie scattering causes the sky to look a bit gray and causes the sun to have a large white halo around it.

G : is the anisotropy factor which controls the sun's appearance in the sky. The closer this value gets to -1.0,
the sharper and smaller the sun spot will be. Higher values cause more fuzzy and bigger sun spots.

Turbidity : is the cloudiness or haziness

Height : is a offset you can apply to the horizon.

Output
You can choose to output to be HDR or LDR
if you choose HDR you need to apply a tone mapping screen filter on your camera, cause the output is HDR. I have included a custom tone mapping script ‘Custom tone mapper’ which you can use. This effect is also visible in the editor.

if you do not choose HDR you can change the exposure (default 0.15).

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Le soucis ce ne sont pas les réglages, mais l'apparition du ciel comme dans la scène, je n'ai aucune idée de comment placer quoi que ce soit. Quand je suis le tuto, je place une sphère dans la scene, comme ils le disent, sans précision, je place une lumière directionelle, je créer un gameobject, je place le script, en effet l'ile devient sombre si je change l'heure, mais le reste ? L'apparence du ciel ne change pas il reste des scripts, je trouve ca tres mal fait comme tuto...

merci :s

Avatar de l’utilisateur
axel
Messages : 1924
Inscription : 26 Avr 2012 09:10
Localisation : Lille - Dunkerque
Contact :

Re: light scattering & day night/cycle system ?

Message par axel » 11 Oct 2013 09:36

Il n'y a pas des prefabs pour le ciel ou le soleil fournis, plutôt que de refaire une sphère et une lumière?
C'est étonnant.
Tu peux mettre une capture d'écran de ta fenêtre project pour voir les fichiers fournis?

Répondre

Revenir vers « Unity le logiciel »