Geometry Nodes

@Poligonate, the value is indeed 2. I solved it by using another Attribute Math Node with the “Round” operation. Now it works perfectly. I believe this is something internal in Blender: it shows the number as being “2.000” (and there is no reason for it to be exactly that), but internally it probably stores something like 1.9999997536 or something to that effect.

Thanks!

Volume point distribute setup using raycast

9 Likes

I’m kinda stuck trying to figure out how to access the “inputs” of the geometry nodes modifier via python. Not necessarily the geometry input but other custom ones I create. this is easy to do for other modifiers but geometry nodes is just weird. any help?

EDIT: Got it with help from devtalk. Inputs of the modifier behaves just as custom properties of an object

Hi Bob,
Exactly what I am looking for …
You have a tutorial on this yet ? or perhaps share a GN tree setup to achieve this please ?

raycast_mask2.zip (703.6 KB)

HI!

You looking for a raycast mask setup?

@seemon Here’s the setup for the crowd. Enjoy

Hi Bob,
Think you miss attaching the nodes? or something to showcase the setup for the crowd? :slight_smile:

hi AlphaChannel,
I was referring to “point lights” … but I now understand you cannot use that as a particle. So I will look at your raycast mask setup instead and see it can provide similar effect of “light source” which looks very promising for “flood light” effects.

1 Like

Nice idea :+1: Do you think it could be made more effcient by using something like the dot product of the mesh normal and ray direction?

Something like this-

Think of it like this- if the ray from a point hits a backface, it is kept. And if it hits a front face, it is deleted.

3 Likes

Today i found out how outlines are made in computer graphics
Here’s one principle made in geometry nodes

New

the difference is that normally these tricks are done from a shader only visible by the viewer, the resulting data would not exist in the scene world (as it would be calculated from a gpu shader) and the programmer can set up sort of render pass booleans in post process (called StencilBuffer or ZBuffer not sure about this part)

25 Likes

Hi Bob and Zorro,

On this crowd facing GN setup … I tried with Geo nodes setup given by Zorro.
Hmm is not working in terms of individual “square face” (yellow) that suppose to follow the icon (red) in the centre when it moves left or right etc. See what I got and my GN setup.
Also it appears for the “point instance” … it only works for object and not collection. Am I missing somthing?


Here’s my blend file

How do I instance cylinders around the mesh circle’s points?

I do not think that is possible directly as of now (8/5/2021) in geometry nodes. You need to create your cylinder as a separate object/modifier combo.

It’s still in development…

https://developer.blender.org/D11841

Hi.

I have been trying to solve a problem all week, and even started my Blender scene from scratch a couple of times, but I can’t get Geometry Nodes to work properly. I need help. The following explanation may be a bit long and detailed, but I’m trying to make sure I’m not doing anything wrong, and the details may help figure where I’m bungling things up. (Also, forgive me if it gets confusing, at any point: English is not my primary language).

I saw this, done by a Twitter user named @Concinnus, (using other tools either than Blender) and I thought I’d implement something similar using Geometry Nodes:

The variation I’m going for uses the sine function of the X position to determine the Z position (I’ll have peaks AND valleys, but that’s OK: I believe it will look good). The sine function for each row is dislocated a bit, but it’s the same function.

I have a grid 2m x 4m, with 100 vertices in the X axis and 200 in the Y axis:

Parameters

Here’s my node tree, with the spreadsheet and the erroneous result (in orthogonal view):

  1. I start by separating the position in PosX, PosY and PosZ.
  2. Then I map PosX from 0 to 2π (it’s a blessing just being able to type “tau” in the float field and see Blender gets it right). I store it in PosXTau.
  3. I use the Frame ID to animate the curve, so I map it also from 0 to 2π and subtract it from PosXTau.

Here’s where things start to get weird:

  1. I use PosY to shift the curve for each row. For such, first I map PosY to 0 to 1.
  2. Then I create DeltaY, which is 1/200 of 2π, 200 being the number of rows in the Y direction.
  3. I then proceed to add Delta Y to PosXTau and leave the result in PosXTau.
  4. I calculate the sine of PosXTau and store the result in PosZ
  5. I recombine the position vector with PosX, PosY and PosZ

The result should be my sine function sinuously curving in the y direction as well as in the X direction, but that doesn’t happen, as can be seen in the 3D View Port. It curves correctly along the X axis, but is “flat” along the Y axis.

What gets me is that I can see with my own eyes that both PosZ and the z component of the position vector are, indeed varying along the Y axis, as can be seen in the spreadsheet but, alas, it remains flat in the 3D view:

Can anybody please explain what I’m doing wrong and help me get to the expected result?

Uhm… The values are changing correctly indeed…
Can you check the scale of the mesh? The PosZ is quite small (0.003, 0.004…) compared to other values but in the viewport it looks like is changing a lot in height. I could be wrong but check if the scale of the mesh is rotation, scale, etc are applied.

Or use brute force and try to multiply any of the PosX, PosY and PosZ values just to check if anything changes in the viewport (my desperate tactic when something doesn’t work in GN is multiplying random variables until I see changes lol)

I multiplied PosZ by 100. In the image, the distance in the X axis from the leftmost portion to the rightmost portion is 2m. The variation in Z should be π (3.141) on the back of the leftmost line. It isn’t: the line is flat on zero.

Great idea on multiplying attributes to see how their change in order of magnitude affects the result. Thanks for that tool! In this case, though, it doesn’t point in the direction of the problem or of a possible solution, I believe.

1 Like

Why? This results in your “PosYRel” being way too :pinching_hand: which is why you are not seeing any results. Why does the Y resolution even matter?

I think you might have to find sin x separately from sine y and combine that somehow. Mute this line:

In your node graph of cause (the fourth node from the group output) and see how little of an effect it is having on the entire wave