Component:Camera: Difference between revisions

From Resonite Wiki
add rest of info for now
cleanup and specify vertical fov
 
Line 1: Line 1:
<languages></languages>
<languages></languages>
<translate>
<!--T:1-->
<!--T:1-->
{{Infobox Component
{{Infobox Component
Line 6: Line 5:
|Name=Camera
|Name=Camera
}}
}}
The component represents a [https://docs.unity3d.com/ScriptReference/Camera.html Unity Camera] which is centered on the slot and facing in the forward (+z) [[Direction]].
 
<translate>The '''Camera''' component represents a [https://docs.unity3d.com/ScriptReference/Camera.html Unity Camera] which is centered on the slot and facing in the forward (+z) [[Direction]].</translate>


<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|DoubleBuffered|Bool|Determines if [https://en.wikipedia.org/wiki/Multiple_buffering#Double_buffering_in_computer_graphics DoubleBuffering] is applied or not.
|DoubleBuffered|Bool|Determines if [https://en.wikipedia.org/wiki/Multiple_buffering#Double_buffering_in_computer_graphics DoubleBuffering] is applied or not.
Line 15: Line 16:
|Projection|CameraProjection|Determines whether it's [https://en.wikipedia.org/wiki/Perspective_(graphical) perspective] or [https://en.wikipedia.org/wiki/Orthographic_projection orthographic]
|Projection|CameraProjection|Determines whether it's [https://en.wikipedia.org/wiki/Perspective_(graphical) perspective] or [https://en.wikipedia.org/wiki/Orthographic_projection orthographic]
|OrthographicSize|Float|The size of the render-output in orthographic view. (Only active when <code>Projection</code> is set to <code>Orthographic</code>
|OrthographicSize|Float|The size of the render-output in orthographic view. (Only active when <code>Projection</code> is set to <code>Orthographic</code>
|FieldOfView|Float|The size of the render-output in perspective view. (Only active when <code>Projection</code> is set to <code>Perspective</code>
|FieldOfView|Float|The vertical field of view of the camera. (Only active when <code>Projection</code> is set to <code>Perspective</code>
|NearClipping|Float|The point in units where the camera ignores near objects.
|NearClipping|Float|The point in meters where the camera ignores near objects.
|FarClipping|Float|The point in units where the camera ignores far objects.
|FarClipping|Float|The point in meters where the camera ignores far objects.
|UseTransformScale|Bool|Determines if the scale of the camera should be taken into account.
|UseTransformScale|Bool|Determines if the scale of the camera should be taken into account.
|Clear|CameraClearMode| See [[Type:CameraClearMode|Camera Clear Mode]] for what this does.
|Clear|CameraClearMode| See [[Type:CameraClearMode|Camera Clear Mode]] for what this does.
Line 34: Line 35:
<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
Put the component onto a slot, and position the slot. The produced image can either be accesed through a [[Component:RenderTextureProvider|RenderTextureProvider]] component or by creating a [[Texture2D]] asset using the [[ProtoFlux:Render To Texture Asset|Render To Texture Asset]] Protoflux node.
 
<translate>Put the component onto a slot, and position the slot. The produced image can either be accesed through a [[Component:RenderTextureProvider|RenderTextureProvider]] component or by creating a [[Texture2D]] asset using the [[ProtoFlux:Render To Texture Asset|Render To Texture Asset]] Protoflux node.</translate>


<!--T:4-->
<!--T:4-->
== Examples ==
== Examples ==
Security cameras, drones, picture takers, layered texture bakers, scanners, and more.
 
<translate>Security cameras, drones, picture takers, layered texture bakers, scanners, and more.</translate>


<!--T:5-->
<!--T:5-->
== Related Components ==
== See Also ==
[[Component:CameraPortal|Camera Portal (mirror)]]
 
</translate>
* [[Component:CameraPortal|Camera Portal (mirror)]]
 
[[Category:Components{{#translation:}}|Camera]]
[[Category:Components{{#translation:}}|Camera]]
[[Category:Components:Rendering{{#translation:}}|Camera]]
[[Category:Components:Rendering{{#translation:}}|Camera]]

Latest revision as of 15:24, 4 April 2025

Component image 
Camera component as seen in the Scene Inspector


The Camera component represents a Unity Camera which is centered on the slot and facing in the forward (+z) Direction.

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.
DoubleBuffered Bool Determines if DoubleBuffering is applied or not.
ForwardOnly Bool Determine whether the render technique is only forward.
Projection CameraProjection Determines whether it's perspective or orthographic
OrthographicSize Float The size of the render-output in orthographic view. (Only active when Projection is set to Orthographic
FieldOfView Float The vertical field of view of the camera. (Only active when Projection is set to Perspective
NearClipping Float The point in meters where the camera ignores near objects.
FarClipping Float The point in meters where the camera ignores far objects.
UseTransformScale Bool Determines if the scale of the camera should be taken into account.
Clear CameraClearMode See Camera Clear Mode for what this does.
ClearColor ColorX If CameraClearMode is set to Color.
Viewport Rect 2D rectangular where the camera is allowed to render
Depth Float Whether this camera should be rendered before or after other cameras render.
RenderTexture RenderTexture The RenderTextureProvider input in order to get a ITexture2D
Postprocessing Bool Determines if post processing is allowed.
ScreenSpaceReflections Bool Determines if ScreenSpaceReflections are rendered.
MotionBlur Bool Determines if MotionBlur is rendered or not.
RenderShadows Bool Determines if shadows are rendered or not.
SelectiveRender direct AutoSyncRefList`1<Slot> A list of SyncReferences to slots the camera is allowed to render.
ExcludeRender direct AutoSyncRefList`1<Slot> A list of SyncReferences to slots the camera is NOT allowed to render.

Usage

Put the component onto a slot, and position the slot. The produced image can either be accesed through a RenderTextureProvider component or by creating a Texture2D asset using the Render To Texture Asset Protoflux node.

Examples

Security cameras, drones, picture takers, layered texture bakers, scanners, and more.

See Also