3
$\begingroup$

I am working with geometry nodes in blender 2.93. I want different point distribute density depending on if the geo nodes are being used in the viewport preview or render. This is what I have so far: What I have so far Am I correct in thinking the "is viewport" node extracts a boolean if whether you are looking through the viewport or render? I don't know how to make an if-then statement driven by a boolean with two values so only one of them is sent based on the boolean.

$\endgroup$

1 Answer 1

6
$\begingroup$

Yup, that's correct. Here I'm scaling by isViewport, leading to instancing in viewport but not render:

enter image description here

Booleans will get cast to floats just fine, as you can see. True gets cast to 1.0, false gets cast to 0.0.

For your purposes, you should probably run your isViewport through a map range node. Then you can have a viewport max density (the max value, corresponding to isViewport = 1) and a render max density (the min value, corresponding isViewport = 0.)

I'd be awfully wary of this though. Different behavior in render and viewport is difficult to debug.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .