Component:ImageColorDistributionGraph: Difference between revisions

From Resonite Wiki
add example
add remaining info
 
(5 intermediate revisions by the same user not shown)
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=ImageColorDistributionGraphComponent.png
|Image=ImageColorDistributionGraphComponent.png
|Name=Image Color Distribution Graph
|Name=Image Color Distribution Graph
}}
}}
The '''ImageColorDistributionGraph''' component is used to make mesh data for a set of points with colors and sizes based on a provided image's pixels. The mesh needs to be used with Billboard geometry to be viewed properly.


<!--T:2-->
<!--T:2-->
Line 12: Line 12:
{{Table ComponentFields
{{Table ComponentFields
|HighPriorityIntegration|Bool|{{Asset HighPriorityIntegration Field}}
|HighPriorityIntegration|Bool|{{Asset HighPriorityIntegration Field}}
|OverrideBoundingBox|Bool|
|OverrideBoundingBox|Bool| {{Template:Override Bounding Box}}
|OverridenBoundingBox|BoundingBox|
|OverridenBoundingBox|BoundingBox| {{Template:Overridden Bounding Box}}
|Profile|ColorProfile|
|Profile|ColorProfile| {{Template:ProceduralMeshColorProfile}}
|Texture|{{RootFieldType|AssetRef`1|[[Type:Texture2D|Texture2D]]}}|TypeAdv4=true|
|Texture|{{RootFieldType|AssetRef`1|[[Type:Texture2D|Texture2D]]}}|TypeAdv4=true| The texture to analyze and use to generate the vertex graph for this mesh.
|ColorSpace|'''[[#Space|Space]]'''|TypeAdv5=true|
|ColorSpace|'''[[#Space|Space]]'''|TypeAdv5=true| The color space to use for X, Y, and Z coordinates on the graph for.
|MaxTextureSize|Int| The max size of the image on one axis that this image will use when making the graph
|MaxTextureSize|Int| The max size of the image on one axis that this image will use when making the graph. The image gets resized internally to fit this size.
|BaseSize|Float|
|BaseSize|Float| The size of any color point on the graph at minimum.
|AccumulateSize|Float|
|AccumulateSize|Float| How much to add to the size of a graph point if a color is repeated with the same RGB values.
|MaxSize|Float|
|MaxSize|Float| The maximum size a color point on the graph can be.
|Scale|Float3|
|Scale|Float3| How much to scale the graph up or down.
|AlphaThreshold|Float|
|AlphaThreshold|Float| if alpha is below this threshold, then don't add the color to the graph.
}}
 
== Sync Delegates ==
{{Table ComponentTriggers
|BakeMesh()|[[Type:Action|Action]]|{{Template:BakeMeshSyncMethod}}
}}
 
== Space ==
{{Table EnumValues
|RGB|0| Convert colors in the image into RGB (Red Green Blue) values and use them as the graphs's XYZ values.
|HSV|1| Convert colors in the image into HSV (Hue Saturation Value) values and use them as the graph's XYZ valuee.
}}
}}


<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
Attach this component to a slot, and place it into a [[Component:MeshRenderer|Mesh Renderer Component]] with an [[Component:UnlitMaterial|Unlit Material]] set to use billboard geometry to view the mesh and its graph points.


<!--T:4-->
<!--T:4-->
Line 35: Line 47:


<!--T:5-->
<!--T:5-->
== Related Components ==
== See Also ==
</translate>
</translate>
[[Category:ComponentStubs]]
 
[[Category:Components{{#translation:}}|Image Color Distribution Graph]]
[[Category:Components{{#translation:}}|Image Color Distribution Graph]]
[[Category:Components With Nested Enums{{#translation:}}|Image Color Distribution Graph]]
[[Category:Components With Nested Enums{{#translation:}}|Image Color Distribution Graph]]
[[Category:Components:Assets:Procedural Meshes{{#translation:}}|Image Color Distribution Graph]]
[[Category:Components:Assets:Procedural Meshes{{#translation:}}|Image Color Distribution Graph]]

Latest revision as of 19:59, 20 January 2025

Component image 
Image Color Distribution Graph component as seen in the Scene Inspector

The ImageColorDistributionGraph component is used to make mesh data for a set of points with colors and sizes based on a provided image's pixels. The mesh needs to be used with Billboard geometry to be viewed properly.

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.
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 Force the bounding box calculated from this component to use OverridenBoundingBox instead of calculating when requested.
OverridenBoundingBox BoundingBox the bounding box this component should say it has when OverrideBoundingBox is enabled. Useful for bounding box calculations with Flux, or changing the selection box for this component when rendered.
Profile ColorProfile The profile that the vertex colors for this mesh should be displayed in.
Texture Texture2D The texture to analyze and use to generate the vertex graph for this mesh.
ColorSpace Space The color space to use for X, Y, and Z coordinates on the graph for.
MaxTextureSize Int The max size of the image on one axis that this image will use when making the graph. The image gets resized internally to fit this size.
BaseSize Float The size of any color point on the graph at minimum.
AccumulateSize Float How much to add to the size of a graph point if a color is repeated with the same RGB values.
MaxSize Float The maximum size a color point on the graph can be.
Scale Float3 How much to scale the graph up or down.
AlphaThreshold Float if alpha is below this threshold, then don't add the color to the graph.

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.

Space

Values
Name Value Description
RGB 0 Convert colors in the image into RGB (Red Green Blue) values and use them as the graphs's XYZ values.
HSV 1 Convert colors in the image into HSV (Hue Saturation Value) values and use them as the graph's XYZ valuee.

Usage

Attach this component to a slot, and place it into a Mesh Renderer Component with an Unlit Material set to use billboard geometry to view the mesh and its graph points.

Examples

See Also