Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (AbrahamR, wdlmaster, 7th_zorro, dr_panther, 1 invisible), 764 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
"Default"-Helligkeit von Modells #70976
04/15/06 10:26
04/15/06 10:26
Joined: Oct 2002
Posts: 799
Germany->Bavaria->Nuremberg
C
Christian__A Offline OP
User
Christian__A  Offline OP
User
C

Joined: Oct 2002
Posts: 799
Germany->Bavaria->Nuremberg
Ja, evtl. kann mir ja jemand kurz sagen, wovon die Helligkeit bei im Level platzierten Mdls abhängig ist. Wir erhalten bei eigentlich genau gleichen Konstelationen total verschiedene Ergebnisse.

Gruß


MfG, Christian__A. Visit my Site: www.chris-a.de


Re: "Default"-Helligkeit von Modells [Re: Christian__A] #70977
04/15/06 10:54
04/15/06 10:54
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline
Expert
oliver2s  Offline
Expert

Joined: Aug 2002
Posts: 3,258
Mainz
Es hängt davon ab welche Helligkeit der Block unter der Entity hat.

Re: "Default"-Helligkeit von Modells [Re: Christian__A] #70978
04/15/06 10:56
04/15/06 10:56
Joined: Oct 2002
Posts: 4,753
Munich, Bavaria, South of Germ...
TripleX Offline
Expert
TripleX  Offline
Expert

Joined: Oct 2002
Posts: 4,753
Munich, Bavaria, South of Germ...
Die Engine benutzt ambient, diffuse, speular und emissive lichter von vorberechneten strahlungs volumen (PRV) und dynamischen lichtquellen, die genug Flexibilität für eine große Bandbreite von Licht-Situationen auch ohne Shader ermöglicht [...]
Ohne Shader wird die totale Helligkeit JEDES Vertex mit der folgenden Formel berechnet:

Totaler Lichteinfluss = Ambient Light + Diffuse Light + Specular Light + EmissiveLight

Ambient Light = Ambient (material) * (PRV + RGB vom Entitiy wenn Licht Flag gesetzt)

Diffuse Light = Diffuse (material)* (RGB der Sonne * (vertexnormale x Sonnenrichtung) * (PRV*Albedo des Materials) * (vertexnormale • Lichteinfalls richtung von bis zu 8 dynamischen Lichtern) * Licht dämpfung aller 8 dynamischer Lichter • Spotlightfaktoren aller 8 dynamischen Lichter

Specular Light = Specular des Materials * (Sonnen RGB * (Vertex Normale • "Halfway" Vektor)^Reflektionspower * (PRV + Albedo Material) + Summe aller 8 dynamischen lichte ( Farbe des nten Lichts * (Vertex Normale • Halfway Vektor) ^Reflektionspower * Lichtdämpfung * Spotlightfaktor des nten Lichts)

Emissive Light = Emissve des Materials..

Es hängt also grundsätzlich von Folgenden Faktoren ab
1) Sonne (Position, Stärke, Farbe)
2) Dynamische Lichter (Farbe, Reichweite & Spotlight)
3) Material eigenschaften (Emissive / Diffuse / Specular / Ambient / Albedo / Power)
4) Vertexnormalen des Vektors
5) Ambient der Kamera
6) Helligkeit des Blocks unter dem Entity (floor_range) - Das ist dieses PRV (statische Lichter) Jedes Entity bekommt seinen PRV Wert von den nähsten "Radiance Plane" unter seinem Ursprung.

der gesammte Handbuch eintrag:

Quote:


The Lighting Engine
The engine uses ambient, diffuse, specular, and emissive light from precomputed radiance volumes (PRV) and dynamic light sources, offering enough flexibility to solve a wide range of lighting situations even without using shaders. Shaders can be used to program a customized lighting engine; otherwise the total amount of light of every vertex is computed using the following equation:

Total Light = Ambient Light + Diffuse Light + Specular Light + Emissive Light
Ambient Light
Ambient light provides constant lighting for a scene. It lights all object vertices the same and is not dependent on any other lighting factors such as vertex normals, light direction, or camera position. The ambient lighting for a scene is described by the following equation.

Ambient Light = AmbientMtl * ( PRV + EntRGB )
Where:

Parameter Description
AmbientMtl Material ambient color.
EntRGB Red, Green, Blue color of the entity when its light flag is set.
PRV Precomputed radiance color (position dependent, see below).

Radiance volumes contain the precomputed light values for a grid of positions in the level, and are generated by the map compiler from static light sources and level geometry. The radiance colors are stored in radiance planes along the shaded level surfaces. Every entity gets its radiance color value from the nearest radiance plane below its origin. This way, entities are automatically lit in bright regions and dark in shadows. Note that you'll get wrong PRV lights when placing the entities' origin below the floor or into a solid block.

Diffuse Light
Diffuse Light depends on both the light direction and the object surface normal. It varies across the surface of an object as a result of the changing light direction and the changing surface normal vector. It shades objects using a Gouraud shading algorithm and gives them three-dimensional (3-D) depth.

After adjusting the light intensity for any attenuation effects, the lighting engine computes how much of the remaining light reflects from a vertex, given the angle of the vertex normal and the direction of the incident light. This step is skipped for sun light because it does not attenuate over distance. The system considers two reflection types, diffuse and specular, and uses a different formula to determine how much light is reflected for each. After calculating the amounts of light reflected, the engine applies these new values to the diffuse and specular reflectance properties of the current material. The resulting color values are the diffuse and specular components that the rasterizer uses to produce Gouraud shading and specular highlighting.

The sun light is multiplied with the PRV brightness value. This way, reflected sun light is dim indoors or within static shadows, and bright outside.

Diffuse lighting is described by the following equation.

Diffuse Light = DiffuseMtl * (SunRGB * (N • SunDir) * (PRV + AlbedoMtl)
+ Sum( Light[n] * (N • Ldir[n]) * Atten[n] * Spot[n] ))

Parameter Description
DiffuseMtl Diffuse material color.
PRV Precomputed radiance value.
SunRGB Color of the sun light.
SunDir Direction vector from object vertex to the sun.
AlbedoMtl Albedo value of the material.
Sum Sum over all dynamic lights (up to 7).
Light[n] Color of the n-th light.
N Vertex normal vector.
Ldir[n] Direction vector from object vertex to the n-th light.
Atten[n] Light attenuation of the n-th light (distance dependent).
Spot[n] Spotlight factor of the n-th light (distance and angle dependent).


Specular Light
Specular Lighting identifies the bright specular highlights that occur when light hits an object surface and reflects back toward the camera. It is more intense than diffuse light and falls off more rapidly across the object surface. It takes longer to calculate specular lighting than diffuse lighting, however the benefit of using it is that it adds significant detail to a surface.

Modeling specular reflection requires that the system not only know in what direction light is traveling, but also the direction to the camera. The system uses a simplified version of the Phong specular-reflection model, which employs a halfway vector to approximate the intensity of specular reflection. Specular Lighting is described by the following equation.

Specular Light = SpecularMtl * (SunRGB * (N • H)^p * (PRV + AlbedoMtl)
+ Sum( Light[n] * (N • H)^p * Atten[n] * Spot[n] )

Parameter Description
SpecularMtl Specular material color.
PRV Precomputed radiance value.
SunRGB Color of the sun light.
AlbedoMtl Albedo value of the material.
Sum Sum over all dynamic lights (up to 7).
N Vertex normal vector.
H Halfway vector.
p Specular reflection power. Range is 0 to +infinity.
Light[n] Color of the n-th light.
Atten[n] Light attenuation of the n-th light (distance dependent).
Spot[n] Spotlight factor of the n-th light (distance and angle dependent).

Emissive Light
Emissive Light looks as if emitted by the entity; for example, a glow (it does however not influence nearby surfaces like dynamic light that is really emitted!) It is set solely by the emissive material color,

Emissive Light = EmissiveMtl






Ich hoffe das hat dir geholfen,
mfg
Timo

Last edited by TripleX; 04/15/06 20:13.

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1