PDA

View Full Version : Instancer question



Tim Parsons
10-25-2018, 11:54 AM
I want to take one cube into Layout and use the instancer to lay them out to the side and back with an offset. See attached.
143210
The Uniform offset moves the all of them together and the Random offset naturally randomizes everything. So how do I get each one to move in a uniform way? I think this should be pretty simple but I am not a Node guru at all and maybe there is a easy way to get this effect.

Thanks for any help.

MonroePoteet
10-25-2018, 06:23 PM
The node setup for this is pretty simple: in the Node editor you get an Instance Index (called ID Index) which is a zero-based integer for each successive Instance. You can then Multiply this by 1/2 the size of your Cube for the X offset, 1.0 times the size of your cube for the Z offset, use Make Vector to make a vector and feed it into the Instancer's Offset:

143213

It is important to note that any Instancer parameter you want to control with the Node network must be set to Uniform in the Instancer panel. Simply connecting a node to the parameter in the node network doesn't override random placement!

143214

In the LW2015 sample scene, I used a 1m cube so the X and Z multipliers are simply 0.5 and 1.0. If your cube isn't 1m square, then you'd need to calculate your multipliers accordingly. LW2018 provides a Mesh Part node from which the bounding box of the object can be calculated (and appropriate X,Z offset), but LW2015 doesn't have this node.

mTp

P.S. Another (perhaps preferable) method would be to create a point array in Modeler with the desired positions for each cube's pivot point, save it as an object and use it as the Instancer base with the Instancer type set to Points.

Tim Parsons
10-25-2018, 07:18 PM
Thanks MonroePoteet!! I figured it was something mathematical and simple. Its just that I'm node dead and math isn't one of my strengths. Thanks for the tips what the nodal network won't override. That kind of surprises me.

Ma3rk
10-25-2018, 09:36 PM
mTp

P.S. Another (perhaps preferable) method would be to create a point array in Modeler with the desired positions for each cube's pivot point, save it as an object and use it as the Instancer base with the Instancer type set to Points.

Thanks for the example. I was looking for something along these lines a week or so ago to do some floor grating. The model I started with was just using a simple poly with transp mapping. Looks fine in many situations but not if you want to light from below the floor. Pretty sure I could have figured it out using instancing & your method or some OD tools, but decided to just try brute force with arrayed geometry. Suprisingly, even with all the added geometry, the rendering hit was minimal, like maybe a couple seconds longer. So, I just stuck with that.

MonroePoteet
10-26-2018, 07:47 AM
Thanks MonroePoteet!! I figured it was something mathematical and simple. Its just that I'm node dead and math isn't one of my strengths. Thanks for the tips what the nodal network won't override. That kind of surprises me.

Glad to help. Nodes aren't very difficult to learn and apply on a node-by-node basis, but the node network in its entirety can get quite convoluted for complex operations. I spend the time to try to organize the node networks I construct into "logical paths / groups" for clarity. One thing I wish the LW Node editor had was a visual "container box" with a color and label so I could surround a set of nodes with the "container box", give it a color and a label to clarify (and remind *myself*!) what some subset of the node network does. Compound nodes offer this "containerization" function, but having a simple visual container would be nice.

If you have plans to migrate to LW2018, or even if you stick with LW2015, building up a nodal capability will expand your horizons greatly. Start simple! :)

Yes, being *required* to set the Instancer panel parameter to Uniform isn't appropriate, IMO, and seems to be inconsistent with the other nodal capability in LW. All the others seem to override the panel parameters as soon as you connect a node to the output(s). If you're trying something with Instances and Nodes and it doesn't seem to be working, be sure to check that the panel is set to Uniform!!

mTp

MonroePoteet
10-26-2018, 07:54 AM
Thanks for the example. I was looking for something along these lines a week or so ago to do some floor grating. The model I started with was just using a simple poly with transp mapping. Looks fine in many situations but not if you want to light from below the floor. Pretty sure I could have figured it out using instancing & your method or some OD tools, but decided to just try brute force with arrayed geometry. Suprisingly, even with all the added geometry, the rendering hit was minimal, like maybe a couple seconds longer. So, I just stuck with that.

Yes, the Point "cloud" or "array" approach in Modeler for an Instancer is very powerful. Given a "base instance" (e.g. a floor grating panel), with the gangway / floor geometry in a background Layer you can just use Add Points (+) to place instances of the panel.

BTW, for floor grating with hard edges on the holes in it, a Clip Map might work as well or better than Transparency. As you found, adding plain geometry to LW scenes usually doesn't have a huge rendering overhead unless you have GI, reflections or other ray-tracing applied to the added geometry.

mTp

Tim Parsons
10-26-2018, 07:59 AM
Glad to help. Nodes aren't very difficult to learn and apply on a node-by-node basis, but the node network in its entirety can get quite convoluted for complex operations. I spend the time to try to organize the node networks I construct into "logical paths / groups" for clarity. One thing I wish the LW Node editor had was a visual "container box" with a color and label so I could surround a set of nodes with the "container box", give it a color and a label to clarify (and remind *myself*!) what some subset of the node network does. Compound nodes offer this "containerization" function, but having a simple visual container would be nice.

If you have plans to migrate to LW2018, or even if you stick with LW2015, building up a nodal capability will expand your horizons greatly. Start simple! :)

Yes, being *required* to set the Instancer panel parameter to Uniform isn't appropriate, IMO, and seems to be inconsistent with the other nodal capability in LW. All the others seem to override the panel parameters as soon as you connect a node to the output(s). If you're trying something with Instances and Nodes and it doesn't seem to be working, be sure to check that the panel is set to Uniform!!

mTp

I like your idea of the visual container box - would especially help when sharing node trees and fpr training purposes. We have upgraded to 2018 and of course that has caused us to get more into the nodes within the surfacing aspect and so far it's been pretty good. I have already made some reusable node trees that really help us with surfacing. Thanks for your help with this!

Ma3rk
10-26-2018, 02:34 PM
Yes, the Point "cloud" or "array" approach in Modeler for an Instancer is very powerful. Given a "base instance" (e.g. a floor grating panel), with the gangway / floor geometry in a background Layer you can just use Add Points (+) to place instances of the panel.
mTp


Forgot that was around actually. Played with in conjunction with Steve Hurley's Advance Placement.

So, a Clip map on a simple poly that has some depth?

I made the pattern in Illustrator so was 90% of the way to just extrude a vector file anyway. Nothing magnanimous; just something I found in the bowels of Poser or Daz & decided to fiddle surfacing & lighting in LW:

143220

MonroePoteet
10-27-2018, 07:16 AM
So, a Clip map on a simple poly that has some depth?
143220

No, a Clip Map won't provide any depth to the polygon(s) that are clipped. In the image you posted, there are places in the grating where the vertical sides of the holes reflect the subfloor light, which isn't feasible with a clip map. Even using Instancing to "pile up" the clipped geometry won't provide a specular / reflective vertical edge to the holes.

mTp

Ma3rk
10-28-2018, 01:04 AM
That's what I thought but you had me wondering if there was some aspect of a clip map I wasn't aware of. So, going with geometry was the better if not only way in this case it sounds.

The instancing I was considering was of an entire panel to a point array that I could edit so there were sections open. This worked well though w/o too much expenditure of thought.

jwiede
10-28-2018, 05:44 PM
The instancing I was considering was of an entire panel to a point array that I could edit so there were sections open. This worked well though w/o too much expenditure of thought.

Yeah, if you expect to do a few, having each little "hole section" be an instance, and then replicating in a rectangular/radial/whatever array or such can be efficient for generating such grilles of different dimensions where you need the "depth".