MeshInstancer_v3 Op

MeshInstancer

There is a newer version of this op!


This version will not receive any updates. It is recommended to use a newer version.

Current version: Ops.Gl.MeshInstancer_v4

Draw the same mesh multiple times on the GPU


For better performance you should use the "Trigger Once" op on the mesh going into the Geom input. Check the example patch to see this being applied.


Full Name
  • Ops.Gl.MeshInstancer_v3
Visibility
  • Core Op - Official cables op
License
  • MIT
Authorgithub


Example Patch mesh instancer

This patch demonstrates how we can generate 3 arrays of random numbers between 0-1. Using the arrayMultiply op allows us to smoothly change the range of each array going into the position, scale and rotation arrays.

Open In Editor

INPUT PORTS


exe (Trigger)

Trigger In

geom (Object)

The shape that will be instanced

Scale (Number)

Global scale for all instances, disabled if scale array is used

Limit Number of Instances

Limit Instances (Number: boolean)

Enable to set a limit on how many instances are created

Limit (Number: integer)

If limit instances is enabled this number determines how many instances are created

Parameters

positions (Array)

Needs an XYZ array to determine the positions of each instance

Scale Array (Array)

Needs an XYZ array to determine the scale of each instance

Rotations (Array)

Needs an XYZ array to determine the XYZ rotation of each instance. 0 - 360 degrees.

Material blend mode index (Number: integer)

Pick a material blend mode with an integer

Material blend mode (String)

Multiply, Add or Normal. Pick the blending mode the material for instances

Colors (Array)

Needs an RGBA array to determine the color of each instance.

OUTPUT PORTS


Trigger Out (Trigger)

Trigger Out

Num (Number)

Total number of instances/shapes


Patches using MeshInstancer_v3

  • Examples
  • Public
  • My Patches

Changelog


created opuser avatarcables - 2019-11-14 17:46
Ops.User.cables.MeshInstancer_v3 renamed to Ops.Gl.MeshInstancer_v3user avatarcables - 2019-11-14 19:03
added core lib: cgl_shadermodifieruser avatarpandur - 2020-07-22 14:45