Component:CameraPortal: Difference between revisions

From Resonite Wiki
Automated: create new component page
 
add mega info, why was this page not filled? We use this every day when playing Resonite lol!
Line 3: Line 3:
|Name=Camera Portal
|Name=Camera Portal
}}
}}
{{stub}}
Camera Portal, Also known as: Mirror, Portal, Gateway, Non Euclidean, and Bigger on the inside thing. This component allows for making a flat surface appear to have something on the other side.
 
 


== Usage ==
== Usage ==
{{Table ComponentFields
{{Table ComponentFields
|Renderer|{{RootFieldType|RelayRef`1|[[Component:MeshRenderer|MeshRenderer]]}}|TypeAdv0=true|
|Renderer|{{RootFieldType|RelayRef`1|[[Component:MeshRenderer|MeshRenderer]]}}|TypeAdv0=true| The renderer that the geometry is being used for the effect. This really only works best with flat surfaces, so use a quad in the target mesh renderer.
|ReflectionTexture|{{RootFieldType|AssetRef`1|[[Type:RenderTexture|RenderTexture]]}}|TypeAdv1=true|
|ReflectionTexture|{{RootFieldType|AssetRef`1|[[Type:RenderTexture|RenderTexture]]}}|TypeAdv1=true| The render texture that this component should render what it wants to display to. This texture should be used in an unlit material that goes on the <code>Render</code>'s mesh.
|PlaneOffset|Float|
|PlaneOffset|Float| How far away from the surface the mirror or portal should render from. This doesn't need to be touched for a mirror, and causes some weird effects.
|PlaneNormal|Float3|
|PlaneNormal|Float3| Rotates what the mirror is rendering. this can can cause some very strange effects for Mirrors and Portals, and is best understood by playing with it.
|RenderMode|'''[[#Mode|Mode]]'''|TypeAdv4=true|
|RenderMode|'''[[#Mode|Mode]]'''|TypeAdv4=true| Whether this CameraPortal should act as a Mirror (Silver mirror) or as a Portal (Gateway, Non Euclidean, Tardis, ETC)
|PortalTarget|Slot|
|PortalTarget|Slot| The slot that should be used as a position to render from. When using Mirror <code>RenderMode</code>, keep this as the same slot as <code>Renderer</code>. When using Portal <code>RenderMode</code>, set the slot as the thing you're trying to make a gateway to visually (for a tardis, this would be the interior entrance somewhere else in the world)
|OverrideClear|'''[[Type:Nullable`1|Nullable`1]]&lt;[[Type:CameraClearMode|CameraClearMode]]&gt;'''|TypeAdv6=true|
|OverrideClear|'''[[Type:Nullable`1|Nullable`1]]&lt;[[Type:CameraClearMode|CameraClearMode]]&gt;'''|TypeAdv6=true| The type of color to clear when rendering. Functionally identical to the OverrideClear on a [[Component:Camera|Camera]]
|ClearColor|ColorX|
|ClearColor|ColorX| If using "Color" for <code>OverrideClear</code> use this color.
|DisablePerPixelLights|Bool|
|DisablePerPixelLights|Bool| Disables lighting from points or spots in the projected image, which helps performance.
|DisableShadows|Bool|
|DisableShadows|Bool| Disable lights casting shadows in the projected image, which helps performance.
|OverrideFarClip|'''[[Type:Nullable`1|Nullable`1]]&lt;[[Type:Float|Float]]&gt;'''|TypeAdv10=true|
|OverrideFarClip|'''[[Type:Nullable`1|Nullable`1]]&lt;[[Type:Float|Float]]&gt;'''|TypeAdv10=true| Override the default farclip from 4096 to this value when enabled.
|OverrideNearClip|'''[[Type:Nullable`1|Nullable`1]]&lt;[[Type:Float|Float]]&gt;'''|TypeAdv11=true|
|OverrideNearClip|'''[[Type:Nullable`1|Nullable`1]]&lt;[[Type:Float|Float]]&gt;'''|TypeAdv11=true| Override the default nearclip from ~0 to this value when enabled.
}}
}}


== Behavior ==
== Behavior ==
This component does not allow for recursion (So you cannot put two mirrors in front and behind and expect them to reflect each other, or portal each other).
Currently, this component does not support culling of objects via object layers, and captures everything the local user currently can render via their POV. there is no way of changing this at the current moment.


== Examples ==
== Examples ==
This component is used in mirrors to make what is behind you appear to be on the other side like a mirror, and it is also useful for portals or making a T.A.R.D.I.S.


== See Also ==
== See Also ==
[[Component:Camera|Camera]]


[[Category:Components:Rendering{{#translation:}}|Camera Portal]]
[[Category:Components:Rendering{{#translation:}}|Camera Portal]]
[[Category:Components{{#translation:}}|Camera Portal]]
[[Category:Components{{#translation:}}|Camera Portal]]
[[Category:Components With Nested Enums{{#translation:}}|Camera Portal]]
[[Category:Components With Nested Enums{{#translation:}}|Camera Portal]]
[[Category:ComponentStubs]]

Revision as of 17:33, 15 October 2024

Component image 
Camera Portal component as seen in the Scene Inspector

Camera Portal, Also known as: Mirror, Portal, Gateway, Non Euclidean, and Bigger on the inside thing. This component allows for making a flat surface appear to have something on the other side.


Usage

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.
Renderer direct RelayRef`1<MeshRenderer> The renderer that the geometry is being used for the effect. This really only works best with flat surfaces, so use a quad in the target mesh renderer.
ReflectionTexture RenderTexture The render texture that this component should render what it wants to display to. This texture should be used in an unlit material that goes on the Render's mesh.
PlaneOffset Float How far away from the surface the mirror or portal should render from. This doesn't need to be touched for a mirror, and causes some weird effects.
PlaneNormal Float3 Rotates what the mirror is rendering. this can can cause some very strange effects for Mirrors and Portals, and is best understood by playing with it.
RenderMode Mode Whether this CameraPortal should act as a Mirror (Silver mirror) or as a Portal (Gateway, Non Euclidean, Tardis, ETC)
PortalTarget Slot The slot that should be used as a position to render from. When using Mirror RenderMode, keep this as the same slot as Renderer. When using Portal RenderMode, set the slot as the thing you're trying to make a gateway to visually (for a tardis, this would be the interior entrance somewhere else in the world)
OverrideClear Nullable`1<CameraClearMode> The type of color to clear when rendering. Functionally identical to the OverrideClear on a Camera
ClearColor ColorX If using "Color" for OverrideClear use this color.
DisablePerPixelLights Bool Disables lighting from points or spots in the projected image, which helps performance.
DisableShadows Bool Disable lights casting shadows in the projected image, which helps performance.
OverrideFarClip Nullable`1<Float> Override the default farclip from 4096 to this value when enabled.
OverrideNearClip Nullable`1<Float> Override the default nearclip from ~0 to this value when enabled.

Behavior

This component does not allow for recursion (So you cannot put two mirrors in front and behind and expect them to reflect each other, or portal each other).

Currently, this component does not support culling of objects via object layers, and captures everything the local user currently can render via their POV. there is no way of changing this at the current moment.

Examples

This component is used in mirrors to make what is behind you appear to be on the other side like a mirror, and it is also useful for portals or making a T.A.R.D.I.S.

See Also

Camera