Rock Factory  1.0
Unity3d component package for procedural rocks
 All Classes Functions Variables Enumerations Properties
RFRock Class Reference

Rock Factory main class. More...

List of all members.

Public Member Functions

bool TimeWithinLimits ()
void Randomize ()
 Randomizes rock by changing all seed values to a random value.
Texture2D GetDisplacementMap (int index, bool renderSamplerOverlay)
 Gets the displacement map of given side.
void ResetToFactoryDefault ()
 Resets to factory default.
void LogTime ()
void LogTime (string description)
void Rebuild ()
 Rebuild entire rock.

Public Attributes

MeshFilter meshFilter
 Reference to the mesh filter component instance.
MeshRenderer meshRenderer
 Reference to the mesh renderer component instance.
RFSettingsPro settings = new RFSettingsPro()
 Rock factory settings.
const bool isProVersion = true
RFSettings settings = new RFSettings()
RFRockSidesBool generateSides = new RFRockSidesBool()
 Enable sides
RFRockProc.RFRockPatchTypes patchType
 The type of geometry.
RFRockSidesInt delaunayPoints = new RFRockSidesInt()
 Used for patchType == Delaunay Number of points per side to distribute
RFRockSidesInt randomSeed = new RFRockSidesInt()
 Used for patchType == Delaunay Random seed of points distributed per side
RFIVector3 segments = new RFIVector3(3,3,3)
 Used for patchType == slicedEqually Number of slices per dimension
Vector3 size = Vector3.one
 The size. Note/Hack: Use negative sizes and spherize to flip normals
bool spherize = true
 Enable spherize subsystem
Vector3 spherizeEdgeSmooth
 Used for spherize == true Smooth edges. Experimental hidden feature. Only useful for long rocks.
Vector3 pivot = Vector3.zero
 Pivot offset: range -1 to 1
bool useUnityStandardNormalCalculation = false
 Use unity standard normal calculation. For debugging purposes. [default: false]
float splitVerticesAngle = 30f
 Threshold which determines when to switch between smooth and flat shaded faces. When angle between connecting triangles is above specified value, the vertex in question will be split and its normals will become perpendicular to the plane of the triangle.
RFRockProc.RFRockTextureCoordinates generateTextureCoordinates = RFRockProc.RFRockTextureCoordinates.Box
 Type of texture coordinates.
bool foldout_alternateTexture = false
 Use alternative secondary foldout mapping. A foldout map uses two textures. This option switches to the second texture.
bool foldout_tile = false
 Enable tiling on foldout sides.
Vector3 uvTiling = Vector3.one
 Axis aligned number of uv tiles
Vector3 uvOffset = Vector3.zero
 Axis aligned uv offset
bool displace = true
 Enable displacement subsystem
float amountOfDisplacement = 0.5f
 Global multiplier to change the amount of displacement
Texture2D[] displacementMaps
 Displacement maps (used for generating geometry) One displacement map per side
Texture2D[] displacementMapsWithOverlay
 Displacement maps with overlay applied (only used by inspector gui) One displacement map per side
bool enableEdgeWear = true
 Enable edge wear effect Only works when rock factory shader is used.
float erodeByNormalAngle = 60f
 Threshold to determine if edge wear effect should be applied to a vertex. Angle will be encoded in vertex colors to be used by the rock factory shader. Vertex color will be white when this threshold is reached
Color[] heightColors
 Contour line colors For in-editor identification or debugging purposes
bool showDebugInfo = false
 Show debug info in console.
float maxRebuildTime = 5f
 The max rebuild time.
float lastBuildDuration = 0f
RFRockDisplacementProc displacementProc
 Reference to the Rock Factory displacement processor

Properties

float buildTimeElapsed [get]
RFRockProc proc [get, set]
 Reference to the Rock Factory processor

Detailed Description

Rock Factory main class.


Member Function Documentation

Texture2D GetDisplacementMap ( int  index,
bool  renderSamplerOverlay 
)

Gets the displacement map of given side.

Returns:
The displacement map as a Texture2D.
Parameters:
indexIndex of side.
renderSamplerOverlayIf set to true: render sampler overlay.
void Randomize ( )

Randomizes rock by changing all seed values to a random value.

void Rebuild ( )

Rebuild entire rock.

void ResetToFactoryDefault ( )

Resets to factory default.


Member Data Documentation

float amountOfDisplacement = 0.5f

Global multiplier to change the amount of displacement

RFRockSidesInt delaunayPoints = new RFRockSidesInt()

Used for patchType == Delaunay Number of points per side to distribute

bool displace = true

Enable displacement subsystem

Texture2D [] displacementMaps

Displacement maps (used for generating geometry) One displacement map per side

Texture2D [] displacementMapsWithOverlay

Displacement maps with overlay applied (only used by inspector gui) One displacement map per side

RFRockDisplacementProc displacementProc

Reference to the Rock Factory displacement processor

bool enableEdgeWear = true

Enable edge wear effect Only works when rock factory shader is used.

float erodeByNormalAngle = 60f

Threshold to determine if edge wear effect should be applied to a vertex. Angle will be encoded in vertex colors to be used by the rock factory shader. Vertex color will be white when this threshold is reached

bool foldout_alternateTexture = false

Use alternative secondary foldout mapping. A foldout map uses two textures. This option switches to the second texture.

bool foldout_tile = false

Enable tiling on foldout sides.

RFRockSidesBool generateSides = new RFRockSidesBool()

Enable sides

RFRockProc.RFRockTextureCoordinates generateTextureCoordinates = RFRockProc.RFRockTextureCoordinates.Box

Type of texture coordinates.

Color [] heightColors
Initial value:
new Color[] {
new Color(1f,0f,0f,1f),
new Color(0f,1f,0f,1f),
new Color(0f,0f,1f,1f),
new Color(1f,1f,0f,1f),
new Color(1f,0f,1f,1f),
new Color(0f,1f,1f,1f),
new Color(1f,1f,1f,1f),
}

Contour line colors For in-editor identification or debugging purposes

float maxRebuildTime = 5f

The max rebuild time.

MeshFilter meshFilter

Reference to the mesh filter component instance.

MeshRenderer meshRenderer

Reference to the mesh renderer component instance.

The type of geometry.

Vector3 pivot = Vector3.zero

Pivot offset: range -1 to 1

RFRockSidesInt randomSeed = new RFRockSidesInt()

Used for patchType == Delaunay Random seed of points distributed per side

RFIVector3 segments = new RFIVector3(3,3,3)

Used for patchType == slicedEqually Number of slices per dimension

RFSettingsPro settings = new RFSettingsPro()

Rock factory settings.

bool showDebugInfo = false

Show debug info in console.

Vector3 size = Vector3.one

The size. Note/Hack: Use negative sizes and spherize to flip normals

bool spherize = true

Enable spherize subsystem

Vector3 spherizeEdgeSmooth

Used for spherize == true Smooth edges. Experimental hidden feature. Only useful for long rocks.

float splitVerticesAngle = 30f

Threshold which determines when to switch between smooth and flat shaded faces. When angle between connecting triangles is above specified value, the vertex in question will be split and its normals will become perpendicular to the plane of the triangle.

bool useUnityStandardNormalCalculation = false

Use unity standard normal calculation. For debugging purposes. [default: false]

Vector3 uvOffset = Vector3.zero

Axis aligned uv offset

Vector3 uvTiling = Vector3.one

Axis aligned number of uv tiles


Property Documentation

RFRockProc proc
getset

Reference to the Rock Factory processor


The documentation for this class was generated from the following file: