Component:LightningMesh: Difference between revisions

From Resonite Wiki
StrikeProperties nested type
Add info
 
(6 intermediate revisions by 2 users not shown)
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=LightningMeshComponent.png
|Image=LightningMeshComponent.png
|Name=Lightning Mesh
|Name=Lightning Mesh
}}
}}
The '''LightingMesh''' component generates geometry of a procedural lighting bolt for use with a [[Component:MeshRenderer]]


<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|HighPriorityIntegration|Bool|
|HighPriorityIntegration|Bool|{{Asset HighPriorityIntegration Field}}
|OverrideBoundingBox|Bool|
|OverrideBoundingBox|Bool|
|OverridenBoundingBox|BoundingBox|
|OverridenBoundingBox|BoundingBox|
|Profile|ColorProfile|
|Profile|ColorProfile|
|Seed|Int|
|Seed|Int| Used to generate a sudo random variant of a lighting bolt mesh
|Points|Int|
|Points|Int| how much detail the lighting bolt should have.
|Topology|Topology|
|Topology|Topology| The Topology setting for the lighting bolt
|Shading|Shading|
|Shading|Shading| The shading for the lighting bolt geometry. Like smooth or flat for example.
|Ends|Ends|
|Ends|Ends| how to handle the geometry at the beginning and end of lines in the lighting bolt
|DualSided|Bool|
|DualSided|Bool| whether the lighting bolt is visible from the inside.
|Point0|Float3|
|Point0|Float3| the start point of the lightning bolt
|Point1|Float3|
|Point1|Float3| the end point of the lightning bolt
|StrikeLevels|{{RootFieldType|SyncList`1|[[#StrikeProperties|StrikeProperties]]}}|TypeAdv12=true|
|StrikeLevels|{{RootFieldType|SyncList`1|[[#StrikeProperties|StrikeProperties]]}}|TypeAdv12=true| A list of different branch variants and bends in the lighting bolt.
}}
 
== Sync Delegates ==
{{Table ComponentTriggers
|BakeMesh()|[[Type:Action|Action]]|{{Template:BakeMeshSyncMethod}}
}}
}}


<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
Attach to a slot and insert into a [[Component:MeshRenderer]] to view the geometry it generates. Don't forget to use a [[Material]].


== StrikeProperties ==
== StrikeProperties ==
 
Generates a group of lines that shoot out at random bent angles with multiple segments. The start and end of these forks in the lighting mesh can be controlled via its settings.
{{stub}}
 
=== Fields ===
{{Table TypeFields
{{Table TypeFields
|Segments|Int|
|Segments|Int| The detail of this fork group
|StartWidth|Float|
|StartWidth|Float| the width of the start of the forks of this fork segment.
|EndWidth|Float|
|EndWidth|Float| the width of the end of the forks of this fork segment.
|MinOffset|Float|
|MinOffset|Float| the minimum offset from the start of the lighting bolt for this fork group
|MaxOffset|Float|
|MaxOffset|Float| the maximum offset from the start of the lighting bolt for this fork group
|ChildCount|Int|
|ChildCount|Int| The amount of forks in this fork group
|MinChildTargetDistanceRatio|Float|
|MinChildTargetDistanceRatio|Float| the minimum distance of the children of this fork group from the center bolt.
|MaxChildTargetDistanceRatio|Float|
|MaxChildTargetDistanceRatio|Float| the maximum distance of the children of the fork group from the center bolt.
|MinChildTargetOffset|Float|
|MinChildTargetOffset|Float| The minimum target offset for children of this fork group.
|MaxChildTargetOffset|Float|
|MaxChildTargetOffset|Float| the maximum target offset for children of this fork group.
}}
}}


<!--T:4-->
<!--T:4-->
== Examples ==
== Examples ==
{{stub}}


<!--T:5-->
<!--T:5-->
== Related Components ==
== See Also ==
</translate>
</translate>
[[Category:ComponentStubs]]
 
[[Category:Components{{#translation:}}|Lightning Mesh]]
[[Category:Components{{#translation:}}|Lightning Mesh]]
[[Category:Components:Assets:Procedural Meshes{{#translation:}}|Lightning Mesh]]
[[Category:Components:Assets:Procedural Meshes{{#translation:}}|Lightning Mesh]]
[[Category:Components With Nested Types]]
[[Category:Components With Nested Types{{#translation:}}|Lightning Mesh]]

Latest revision as of 03:20, 12 November 2024

Component image 
Lightning Mesh component as seen in the Scene Inspector

The LightingMesh component generates geometry of a procedural lighting bolt for use with a Component:MeshRenderer

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.
HighPriorityIntegration Bool If true, integrating this asset (e.g. processing procedural assets) gets higher priority than assets with this flag off. An example is user laser procedural meshes.
OverrideBoundingBox Bool
OverridenBoundingBox BoundingBox
Profile ColorProfile
Seed Int Used to generate a sudo random variant of a lighting bolt mesh
Points Int how much detail the lighting bolt should have.
Topology Topology The Topology setting for the lighting bolt
Shading Shading The shading for the lighting bolt geometry. Like smooth or flat for example.
Ends Ends how to handle the geometry at the beginning and end of lines in the lighting bolt
DualSided Bool whether the lighting bolt is visible from the inside.
Point0 Float3 the start point of the lightning bolt
Point1 Float3 the end point of the lightning bolt
StrikeLevels list of StrikeProperties A list of different branch variants and bends in the lighting bolt.

Sync Delegates

Triggers
Method Name Method type and Arguments. Description
BakeMesh() Action Bake meshes is a sync method that creates a static mesh component with this component, replaces all references to this component with the static mesh component, then deletes this component.

Usage

Attach to a slot and insert into a Component:MeshRenderer to view the geometry it generates. Don't forget to use a Material.

StrikeProperties

Generates a group of lines that shoot out at random bent angles with multiple segments. The start and end of these forks in the lighting mesh can be controlled via its settings.

Fields
Name Type Description
Segments Int The detail of this fork group
StartWidth Float the width of the start of the forks of this fork segment.
EndWidth Float the width of the end of the forks of this fork segment.
MinOffset Float the minimum offset from the start of the lighting bolt for this fork group
MaxOffset Float the maximum offset from the start of the lighting bolt for this fork group
ChildCount Int The amount of forks in this fork group
MinChildTargetDistanceRatio Float the minimum distance of the children of this fork group from the center bolt.
MaxChildTargetDistanceRatio Float the maximum distance of the children of the fork group from the center bolt.
MinChildTargetOffset Float The minimum target offset for children of this fork group.
MaxChildTargetOffset Float the maximum target offset for children of this fork group.


Examples

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


See Also