Component:Light: Difference between revisions

From Resonite Wiki
add remaining info
m typo & touchups
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
|Name=Light
|Name=Light
}}
}}
The '''Light''' component is used to illumate the render scene beyond skybox illumination. This component can be used for suns, spots, and points, but not area lights.
The '''Light''' component is used to illuminate the render scene beyond skybox illumination. This component can be used for suns, spots, and points, but not area lights.


== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|LightType|LightType| The type of light, which can be directional or point to name a couple.
|LightType|LightType| The type of light. Can be Point, Directional, or Spot.
|Intensity|Float| how intense the light is. This is a multiplier.
|Intensity|Float| How intense the light is. This is a multiplier.
|Color|ColorX| the color of the light this source should project
|Color|ColorX| The color of the light this source should project.
|ShadowType|ShadowType| The type of shadow this light should use
|ShadowType|ShadowType| The type of shadow this light should use. Can be None, Hard, or Soft.
|ShadowStrength|Float| How dark the shadows are.
|ShadowStrength|Float| How dark the shadows are.
|ShadowNearPlane|Float| How far away shadows will render for this point light.
|ShadowNearPlane|Float| How far away shadows will render for this point light.
Line 16: Line 16:
|ShadowBias|Float| added to the distance in the shadow map to ensure that pixels on the borderline definitely pass the comparison as they should.
|ShadowBias|Float| added to the distance in the shadow map to ensure that pixels on the borderline definitely pass the comparison as they should.
|ShadowNormalBias|Float| Makes surrounding lit areas encroach upon the center shadow, making the encroached area lit too.
|ShadowNormalBias|Float| Makes surrounding lit areas encroach upon the center shadow, making the encroached area lit too.
|Range|Float| How far for the light to shine in meters, where the range represents the point where the falloff stops.
|Range|Float|How far for the light to shine in meters, where the range represents the point where the falloff stops.
|SpotAngle|Float| The angle from 0-180 when on spot light mode to project the light at. 0 is no light, 60 is like car headlights, and 180 is extreme and unrealistic.
|SpotAngle|Float| The angle from 0-180 when on spot light mode to project the light at. 0 is no light, 60 is like car headlights, and 180 is extreme and unrealistic.
|Cookie|{{RootFieldType|AssetRef`1|[[Type:ITexture2D|ITexture2D]]}}|TypeAdv11=true| The cookie texture is used to limit the light area of a spot light from a circle to a custom shape.
|Cookie|{{RootFieldType|AssetRef`1|[[Type:ITexture|ITexture]]}}|TypeAdv11=true| The cookie texture is used to limit the light area of a spot light from a circle to a custom shape.
}}
}}



Latest revision as of 05:11, 13 May 2025

Component image 
Light component as seen in the Scene Inspector

The Light component is used to illuminate the render scene beyond skybox illumination. This component can be used for suns, spots, and points, but not area lights.

Fields

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't.
LightType LightType The type of light. Can be Point, Directional, or Spot.
Intensity Float How intense the light is. This is a multiplier.
Color ColorX The color of the light this source should project.
ShadowType ShadowType The type of shadow this light should use. Can be None, Hard, or Soft.
ShadowStrength Float How dark the shadows are.
ShadowNearPlane Float How far away shadows will render for this point light.
ShadowMapResolution Int How detailed the resolution for shadows is in pixels.
ShadowBias Float added to the distance in the shadow map to ensure that pixels on the borderline definitely pass the comparison as they should.
ShadowNormalBias Float Makes surrounding lit areas encroach upon the center shadow, making the encroached area lit too.
Range Float How far for the light to shine in meters, where the range represents the point where the falloff stops.
SpotAngle Float The angle from 0-180 when on spot light mode to project the light at. 0 is no light, 60 is like car headlights, and 180 is extreme and unrealistic.
Cookie ITexture The cookie texture is used to limit the light area of a spot light from a circle to a custom shape.

Usage

This article or section is a Stub. You can help the Resonite Wiki by expanding it.

Examples

Example showing a Cookie set on a Light with a StaticTexture2D

See Also