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


<p>For better performance you should use the &quot;Trigger Once&quot; op on the mesh going into the Geom input. Check the example patch to see this being applied.</p>


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)

<p>Trigger In</p>

geom (Object)

<p>The shape that will be instanced</p>

Scale (Number)

<p>Global scale for all instances, disabled if scale array is used</p>

Limit Number of Instances

Limit Instances (Number:

<i>boolean</i>

)

<p>Enable to set a limit on how many instances are created</p>

Limit (Number:

<i>integer</i>

)

<p>If limit instances is enabled this number determines how many instances are created</p>

Parameters

positions (Array)

<p>Needs an XYZ array to determine the positions of each instance</p>

Scale Array (Array)

<p>Needs an XYZ array to determine the scale of each instance</p>

Rotations (Array)

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

Material blend mode index (Number:

<i>integer</i>

)

<p>Pick a material blend mode with an integer</p>

Material blend mode (String)

<p>Multiply, Add or Normal. Pick the blending mode the material for instances </p>

Colors (Array)

<p>Needs an RGBA array to determine the color of each instance.</p>

OUTPUT PORTS


Trigger Out (Trigger)

<p>Trigger Out</p>

Num (Number)

<p>Total number of instances/shapes</p>


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