ProtoFlux:Random Point On Cube: Difference between revisions

From Resonite Wiki
Created a page for the Random Point On Cube node.
 
template warning, clear misinformation
Line 1: Line 1:
{{#Invoke:ProtoFlux|GenerateUI
{{#Invoke:ProtoFlux|GenerateUI
|Name=Random Point On Cube
|Name=Random Point On Cube
Line 9: Line 8:
|}}
|}}


The '''Random Point On Cube''' node returns a random [[Type:float3|float3]] value of a point on a [https://en.wikipedia.org/wiki/Unit_cube unit cube]. Since the line is where the random generation occurs is on the cube shell, the X, Y, and Z will be in between <code>-1</code> and <code>1</code> (inclusive to the cube only).
The '''Random Point On Cube''' node returns a random [[Type:float3|float3]] value of a point on the shell of a [https://en.wikipedia.org/wiki/Unit_cube unit cube] centered at <code>[0; 0; 0]</code>.


{{Note|This node constantly changes its value every frame, if you want to use this value, make sure to either [[ProtoFlux:Write|Write]] to a [[ProtoFlux:Data Model Store|Variable]] or use it within that frame.|warning}}
{{ProtoFluxRandomNodeWarning}}


== Outputs ==
== Outputs ==
Line 17: Line 16:
=== * ([[Type:float3|float3]]) ===
=== * ([[Type:float3|float3]]) ===


The random result.
A random point on the shell of a unit cube. This will be a float3 where one value is <code>-0.5</code> or <code>0.5</code> and the other two values are between <code>-0.5</code> and <code>0.5</code>.


[[Category:ProtoFlux:Math:Random:Point]]
[[Category:ProtoFlux:Math:Random:Point]]

Revision as of 15:54, 14 April 2025

Random Point On Cube
*
Point

The Random Point On Cube node returns a random float3 value of a point on the shell of a unit cube centered at [0; 0; 0].

This node is a random node. Random nodes generate a new output every time they are accessed during an impulse chain, even if during the same frame. To reuse the same value for multiple impulse nodes, you must write the value to a Local, Store, or Data Model Store before operating on it.

Outputs

* (float3)

A random point on the shell of a unit cube. This will be a float3 where one value is -0.5 or 0.5 and the other two values are between -0.5 and 0.5.