Original Addon: https://kindeyegames.itch.io/c3-3dobject-alpha SDKv1 only (for now).
Requires Fraglight 8: https://kindeyegames.itch.io/c3-3d-effects
New features:
- Per-material environment mapping
- Per-material emissive surfaces
- Per-material roughness/specular
Reference manual for all Actions, Conditions, and Expressions.
Set gpu skinning (static geometry must be enabled).
| Parameter | Description |
|---|---|
| Enable | Enable gpu skinning. |
Rotate object around a specific axis.
| Parameter | Description |
|---|---|
| Angle | Rotate object by a number of degrees |
| Axis | Axis to rotate object around. |
Set z elevation (world z axis, depth component).
| Parameter | Description |
|---|---|
| Zelevation | Zelevation (z axis, depth) |
Set the local center of the 3DObject in the model files coordinate system.
| Parameter | Description |
|---|---|
| X | X local coordinate of center |
| Y | Y local coordinate of center |
| Z | Z local coordinate of center |
Set scale from original object size.
| Parameter | Description |
|---|---|
| Scale | The size to scale from the original size. |
Set z height, used for viewport clipping.
| Parameter | Description |
|---|---|
| Z height | The z height of the object, used for viewport clipping. |
Set rotation of object from the original position, with rotation order.
| Parameter | Description |
|---|---|
| X | X angle of rotation. |
| Y | Y angle of rotation. |
| Z | Z angle of rotation. |
| Rotation order | Order to rotate object around axes. |
Play animation by name.
| Parameter | Description |
|---|---|
| Animation | The animation name to play. |
| Loop | Loop animation. |
Pause playing animation.
Unpause playing animation.
Set animation rate (FPS).
| Parameter | Description |
|---|---|
| Rate | Rate (FPS). |
Set animation speed.
| Parameter | Description |
|---|---|
| Speed | Speed (multiplier). |
Set animation time.
| Parameter | Description |
|---|---|
| Time | Animation time (seconds). |
Set X scale.
| Parameter | Description |
|---|---|
| X scale | X scale. |
Set Y scale.
| Parameter | Description |
|---|---|
| Y scale | Y scale. |
Set Z scale.
| Parameter | Description |
|---|---|
| Z scale | Z scale. |
Update bounding box based on current 3D animation.
Load model from path.
| Parameter | Description |
|---|---|
| Gltf path | Gltf/glb project file name or URL to Gltf/glb file (with URL, it will not show in the editor). |
Load material from path.
| Parameter | Description |
|---|---|
| Image path | Image project filename or URL to material (.png) file. |
| Material name | Material name. |
Load material from sprite.
| Parameter | Description |
|---|---|
| Sprite UID | Sprite instance UID. |
| Material name | Material name. |
Unload material from sprite.
| Parameter | Description |
|---|---|
| Material name | Material name. |
Set node to use a material.
| Parameter | Description |
|---|---|
| Node name | Node name to set material to. |
| Material name | Material name (existing or the material name used when loading). |
Enable or disable node for render.
| Parameter | Description |
|---|---|
| Node name | Node name to enable or disable. |
| Enable | Enable or disable node for render. |
Enable all nodes for render.
Disable all nodes for render.
Release material (remove from GPU memory).
| Parameter | Description |
|---|---|
| Material name | Material name (existing or the material name used when loading). |
Set origin X (Normalized value, 0.5 is center).
| Parameter | Description |
|---|---|
| X origin | X origin (Normalized value, 0.5 is center). |
Set origin Y (Normalized value, 0.5 is center).
| Parameter | Description |
|---|---|
| Y origin | Y origin (Normalized value, 0.5 is center). |
Set bounding box scale.
| Parameter | Description |
|---|---|
| Scale | Scale factor for bounding box. |
Enable or disable wireframe render.
| Parameter | Description |
|---|---|
| Enable | Enable or disable node wireframe render. |
Set wireframe X, y, Z widths.
| Parameter | Description |
|---|---|
| X width | X wireframe width. |
| Y width | Y wireframe width. |
| Z width | Z wireframe width. |
Set camera vector and position.
| Parameter | Description |
|---|---|
| Vector X | X vector. |
| Vector Y | Y vector. |
| Vector Z | Z vector. |
| Camera X | X position. |
| Camera Y | Y position. |
| Camera Z | Z position. |
Offset a nodes UV texture coordinates.
| Parameter | Description |
|---|---|
| Node name | Node name to offset UVs. |
| U Offset | U Offset (-1.0 to 1.0). |
| V Offset | V Offset (-1.0 to 1.0). |
Offset material UV texture coordinates.
| Parameter | Description |
|---|---|
| Material name | Material name to offset UVs. |
| U Offset | U Offset (-1.0 to 1.0). |
| V Offset | V Offset (-1.0 to 1.0). |
Rotate material UV texture coordinates around point.
| Parameter | Description |
|---|---|
| Material name | Material name to rotate UVs. |
| Angle | Angle in degrees. |
| X | Center X to rotate around (0-1). |
| Y | Center Y to rotate around (0-1). |
Set light direction.
| Parameter | Description |
|---|---|
| X | Set X light direction. |
| Y | Set Y light direction. |
| Z | Set Z light direction. |
Set view position for specular lighting.
| Parameter | Description |
|---|---|
| X | Set X view position. |
| Y | Set Y view position. |
| Z | Set Z view position. |
Load model from prefab instance of object.
| Parameter | Description |
|---|---|
| Prefab uid | Prefab uid of instance to load model from, prefab must already be loaded. |
Set animation blend time.
| Parameter | Description |
|---|---|
| Blend time | Blend time in seconds. |
Enable lights
| Parameter | Description |
|---|---|
| Enable | Enable. |
Update light.
| Parameter | Description |
|---|---|
| Update | Update light. |
Add light.
| Parameter | Description |
|---|---|
| Name | Light name. |
| Enable | Enable. |
| Color | Color, use RgbEx(). |
| X | X. |
| Y | Y. |
| Z | Z. |
| Enable spot | Enable spot light. |
| Dir X | Direction X. |
| Dir Y | Direction Y. |
| Dir Z | Direction Z. |
| Spot cone angle | Spot light cone angle. |
| Soft edge | Soft edge (0-1). |
| Attenuation constant | Constant attenuation (1.0+). |
| Attenuation linear | Linear distance attenuation. |
| Attenuation square | Square distance attenuation. |
| Specular enable | Enable specular light. |
| Specular attenuation | Attenuate specular light. |
| Specular shininess | Shiniess of specular light (1-128). |
Enable light.
| Parameter | Description |
|---|---|
| Name | Light name. |
| Enable | Enable light. |
Delete light
| Parameter | Description |
|---|---|
| Name | Light name. |
Set ambient color
| Parameter | Description |
|---|---|
| Color | Color value, use rgbaEx(). |
DEPRECATED - Use 'Enable vertex lighting' instead. This action is kept for backward compatibility.
| Parameter | Description |
|---|---|
| Enable | Whether to enable vertex lighting mode |
Enable or disable vertex lighting mode (per-vertex instead of per-pixel)
| Parameter | Description |
|---|---|
| Enable | Whether to enable vertex lighting |
Enable normal visualization for debugging vertex lighting
| Parameter | Description |
|---|---|
| Enable | Whether to show normals as RGB colors |
Set node morph target weight.
| Parameter | Description |
|---|---|
| Node name | Node name. |
| Target | Target index. |
| Weight | Target weight. |
Delete node morph target weight.
| Parameter | Description |
|---|---|
| Node name | Node name. |
| Target | Target index. |
Set vertex rounding (typically 1, 2, 3, etc.).
| Parameter | Description |
|---|---|
| Round | Round value, typically an integer. |
Set static geometry.
| Parameter | Description |
|---|---|
| Enable | Enable static geometry. |
Set blend mode.
| Parameter | Description |
|---|---|
| Blend mode | Blend mode. |
Set quaternion for rotation (JSON array string).
| Parameter | Description |
|---|---|
| Quaternion | Quaternion (JSON array string). |
| Offsey X | Offset X - beware gimbal lock of offsets! |
| Offsey Y | Offset Y - beware gimbal lock of offsets! |
| Offsey Z | Offset Z - beware gimbal lock of offsets! |
Enable quaternion for rotation.
| Parameter | Description |
|---|---|
| Enable | Enable quaternion for rotation. |
Enable fragment light mode for fragment light effect.
| Parameter | Description |
|---|---|
| Enable | Enable fragment light mode. |
| Enable Phong | Enable phong lighting, requires model normals. |
Set target to position.
| Parameter | Description |
|---|---|
| X | X. |
| Y | Y. |
| Z | Z. |
| Up X | Up X. |
| Up Y | Up Y. |
| Up Z | Up Z. |
True if node is enabled.
| Parameter | Description |
|---|---|
| Node | Enter the name of node to check if enabled. |
Triggers when 3DObject has completed loading the 3D model.
True if the 3DObject has loaded its 3D model.
True if the animation has finished (only true if not looping).
Triggers when the animation has finished (only triggered if not looping).
Triggers when the named animation has finished (only triggered if not looping).
| Parameter | Description |
|---|---|
| Name | Enter the name of animation to check if playing. |
True if model is renered as wireframe.
Is the named animation playing.
| Parameter | Description |
|---|---|
| Animation | Enter the name of animation to check if playing. |
Get animation names as JSON string.
Get Z elevation-0.
Get the current animation name.
Get current animation time.
Get the current animation frame.
Get scale.
Get X scale.
Get Y scale.
Get Z scale.
Get mesh names.
Get material names.
Get x angle.
Get Y angle.
Get Z angle.
Get X bounding box min.
Get Y bounding box min.
Get Z bounding box min.
Get X bounding box max.
Get y bounding box max.
Get z bounding box max.
X wireframe line width.
Y wireframe line width.
Z wireframe line width.
U offset on node.
| Parameter | Description |
|---|---|
| Node name | Node name of offset U. |
V offset on node.
| Parameter | Description |
|---|---|
| Node name | Node name of offset V. |
U offset on node.
| Parameter | Description |
|---|---|
| Material name | Material name of offset U. |
V offset on material.
| Parameter | Description |
|---|---|
| Material name | Material name of offset V. |
Rotation angle of material.
| Parameter | Description |
|---|---|
| Material name | Material name of rotate angle. |
Rotation center X of material.
| Parameter | Description |
|---|---|
| Material name | Material name of rotation center x. |
Rotation center Y of material.
| Parameter | Description |
|---|---|
| Material name | Material name of rotation center Y. |
Material list in JSON string format.
Node point position, as JSON string, {x:,y:,z:}.
| Parameter | Description |
|---|---|
| Node name | Node name. |
| Point index | Point index. |
Length of the nodes meshs vertex array.
| Parameter | Description |
|---|---|
| Node name | Node name. |
Animation blend time in seconds.
Light color value.
| Parameter | Description |
|---|---|
| name | Color name. |
Lights data as JSON string.
Animation speed.
Total triangles to be rendered.
Total triangles culled.
Node bounding box.
| Parameter | Description |
|---|---|
| Node name | Node name. |
Get the current gltf/glb file path.