Model
Models are what you see when you sculpt or play a game.Whether it is a ball, a cow or a space-ship, these are volumetric models made up of many primitives fused together.A model is actually an Entity with model data attached.
makeModel()
Make a new model in order to then add edits to it and form complex shapes, like a teddy bear, or a banana.
Return
Entity , a pointer to a model in the world
deinstance(entity)
Deinstance a cloned entity so that modifying it won't reflect on the source.
Arguments
entity: Entity, a pointer to an entity in the world.
getInstanceCount(entity)
Get the number of cloned instances for this entity.
Arguments
entity: Entity, a pointer to an entity in the world.
Return
int
getInstances(entity)
Get the number of cloned instances for this entity.
Arguments
entity: Entity, a pointer to an entity in the world.
Return
Entity , a pointer to an entity in the world, nil if the entity was not found.
setModelResolution(model, value)
Set the resolution of a model. Range is 1 to 7.
Arguments
model: Entity, a pointer to a model in the world.
value: number
getModelResolution(model)
Get get the resolution of a model. Range is 1 to 7.
Arguments
model: Entity, a pointer to a model in the world.
Return
int
setModelLooseness(model, value)
Set the looseness of a model. Range is 0..1
Arguments
model: Entity, a pointer to a model in the world.
value: number
getModelLooseness(model)
Get get the looseness of a model. Range is 0..1
Arguments
model: Entity, a pointer to a model in the world.
Return
float
setModelUnlit(model, value)
Set how much the lighting/shading gets removed (blend with albedo-only) for this model. Range is 0.0 to 1.0.
Arguments
model: Entity, a pointer to a model in the world.
value: number
getModelUnlit(model)
Get the "unlitness" of a model.
Arguments
model: Entity, a pointer to a model in the world.
Return
float
setModelMetalness(model, value)
Set how much metalness to give to a model. Range is 0.0 to 1.0.
Arguments
model: Entity, a pointer to a model in the world.
value: number
getModelMetalness(model)
Get the metalness of a model.
Arguments
model: Entity, a pointer to a model in the world.
Return
float
setModelRoughness(model, value)
Set how much roughness to give to a model. Range is 0.0 to 1.0.
Arguments
model: Entity, a pointer to a model in the world.
value: number
getModelRoughness(model)
Get the roughness of a model.
Arguments
model: Entity, a pointer to a model in the world.
Return
float
setModelEmission(model, value)
Set how much emission to give to a model.
Arguments
model: Entity, a pointer to a model in the world.
value: number
getModelEmission(model)
Get the emission of a model.
Arguments
model: Entity, a pointer to a model in the world.
Return
float , emission in range 0..1
setModelColorize(model, value)
Set a color to override the model's albedo with
Arguments
model: Entity, a pointer to a model in the world.
value: number
getModelColorize(model)
Get the colorization of a model.
Arguments
model: Entity, a pointer to a model in the world.
Return
vec4 , The xyz components are used for color and the w component is used for how much to colorize. All values in 0.0 to 1.0 range.
setModelSplatPattern(model, value)
Set which splat pattern to use for this model.
Splats can look like fur, grass or have abstract patterns.
Arguments
model: Entity, a pointer to a model in the world.
value: number
getModelSplatPattern(model)
Get get the index of the splat pattern.
Arguments
model: Entity, a pointer to a model in the world.
Return
int
setModelSplatScale(model, value)
Set splat scale. Range is 0.0 to 1.0.
Arguments
model: Entity, a pointer to a model in the world.
value: number
getModelSplatScale(model)
Get splat scale.
Arguments
model: Entity, a pointer to a model in the world.
Return
float
setModelSplatOpacity(model, value)
Set splat opacity. Range is 0.0 to 1.0.
Arguments
model: Entity, a pointer to a model in the world.
value: number
getModelSplatOpacity(model)
Get splat opacity.
Arguments
model: Entity, a pointer to a model in the world.
Return
float
setModelSplatDensity(model, value)
Set splat density. Range is 0.0 to 1.0.
Arguments
model: Entity, a pointer to a model in the world.
value: number
getModelSplatDensity(model)
Get splat density.
Arguments
model: Entity, a pointer to a model in the world.
Return
float
setModelSplatJitterPosition(model, value)
Set splat jitter position amount. Range is 0.0 to 1.0.
Arguments
model: Entity, a pointer to a model in the world.
value: number
getModelSplatJitterPosition(model)
Get splat jitter position amount.
Arguments
model: Entity, a pointer to a model in the world.
Return
float
setModelSplatJitterOrientation(model, value)
Set splat jitter orientation amount. Range is 0.0 to 1.0.
Arguments
model: Entity, a pointer to a model in the world.
value: number
getModelSplatJitterOrientation(model)
Get splat jitter orientation amount.
Arguments
model: Entity, a pointer to a model in the world.
Return
float
setModelSplatJitterScale(model, value)
Set splat jitter scale amount. Range is 0.0 to 1.0.
Arguments
model: Entity, a pointer to a model in the world.
value: number
getModelSplatJitterScale(model)
Get splat jitter scale amount.
Arguments
model: Entity, a pointer to a model in the world.
Return
float
setModelSplatJitterBrightness(model, value)
Set splat jitter brightness amount. Range is 0.0 to 1.0.
Arguments
model: Entity, a pointer to a model in the world.
value: number
getModelSplatJitterBrightness(model)
Get splat jitter brightness amount.
Arguments
model: Entity, a pointer to a model in the world.
Return
float
setModelSplatJitterHue(model, value)
Set splat jitter hue amount. Range is 0.0 to 1.0.
Arguments
model: Entity, a pointer to a model in the world.
value: number
getModelSplatJitterHue(model)
Get splat jitter hue amount.
Arguments
model: Entity, a pointer to a model in the world.
Return
float
setModelSplatJitterMetalness(model, value)
Set splat jitter metalness amount. Range is 0.0 to 1.0.
Arguments
model: Entity, a pointer to a model in the world.
value: number
getModelSplatJitterMetalness(model)
Get splat jitter metalness amount.
Arguments
model: Entity, a pointer to a model in the world.
Return
float
setModelSplatJitterBump(model, value)
Set splat jitter bump amount. Range is 0.0 to 1.0.
Arguments
model: Entity, a pointer to a model in the world.
value: number
getModelSplatJitterBump(model)
Get splat jitter bump amount.
Arguments
model: Entity, a pointer to a model in the world.
Return
float
setModelSplatFluff(model, value)
Set how fluffy are the splats. Range is 0.0 to 1.0.
Arguments
model: Entity, a pointer to a model in the world.
value: number
getModelSplatFluff(model)
Get how fluffy are the splats. Range is 0.0 to 1.0
Arguments
model: Entity, a pointer to a model in the world.
Return
float
setModelBorderVisible(model, state)
Set if this model has a visible border to highlight a selection.
Arguments
model: Entity, a pointer to a model in the world.
state: boolean
getModelBorderVisible(model)
Get if this model has a visible border.
Arguments
model: Entity, a pointer to a model in the world.
Return
bool
setShadowCaster(entity, state)
Set the shadow caster state for a model or an entire hierarchy from a root entity.
Arguments
entity: Entity, a pointer to an entity in the world.
state: boolean
getShadowCaster(entity)
Get shadow caster state of a model or entity, if a parent is shadow caster then also the children will inherit that state.
Arguments
entity: Entity, a pointer to an entity in the world.
Return
bool
setShadowReceiver(entity, state)
Set shadow receiver state for a model or an entire hierarchy from a root entity.
Arguments
entity: Entity, a pointer to an entity in the world.
state: boolean
getShadowReceiver(entity)
Get shadow receiver state of a model or entity, if a parent is shadow caster then also the children will inherit that state.
Arguments
entity: Entity, a pointer to an entity in the world.
Return
bool