5
$\begingroup$

I'm in need of creating a set up that has instances aligned along a spiral but are reflecting a central character's position based on the angle they are positioned relative to it. this is the central character around which the instances are revolving

This is what the set up looks like currently, all characters are revolved around the character in a radiating fashion/pattern up the spiral. enter image description here

Here is the node set up enter image description here

What I'd like for is something more like this... enter image description here If it helps, think of it like there is an invisible mirror between each character instance & the character. I don't know if this is possible but I hope there's a guru out there that knows some magical tree that can solve this.

This is the file with what I'm trying to replicate. If there's a way besides geometry nodes, I'm open to suggestions to those too.

Edit 2: Hey Markus & Quinellform ,After trying out the solutions you suggested these are the 2 files I came ups with. Didn't make any major changes to the node set up except to maintain things as before Here's the result with Markus's suggestion. enter image description here

Here's the result from Quinellform's suggestion. enter image description here

Markus' seems closer to what I'm going for except with the missing character's at the very tips of the sphere.

Edit 3: As Just an update, (sorry I've been a bit busy.) Both solutions work now. I've upvoted quenellform's solution because the node set up is simpler. But in truth, both @quenellform's & @Markus' solutions working fine. Thanks for your help! I owe you :-)!

$\endgroup$
2
  • $\begingroup$ You can share your blend-file at blend-exchange.com $\endgroup$
    – quellenform
    May 21, 2022 at 21:17
  • $\begingroup$ Thanks Quellenform $\endgroup$
    – Phill_R_O
    May 21, 2022 at 21:32

2 Answers 2

4
$\begingroup$

Now if I understand correctly, you just want all objects mirrored and instantiated around a center, right?

enter image description here

enter image description here

enter image description here

Have I mentioned it already? ...I love simple solutions!

  1. Subtract the positions of the spiral from the position of the object in the center. This will give you a direction vector pointing away from the center.

  2. Then reflect the vector pointing backwards from the center object (in this case $0, -1, 0$) on this direction vector. This will give you a mirrored direction.

  3. Then rotate the local Y-axis in the direction of this vector. With this you have your final rotation.

  4. So that the object is also instantiated mirror-inverted, you use the node Transform there and with it all instantiated objects should be arranged spirally and mirrored around the center.

enter image description here

$\endgroup$
10
  • $\begingroup$ Thanks again Quellenform, I used the node tree you suggested & It worked, albeit it's less dynamic than I expected. Correct me if I'm wrong but it seemed it's reliant on a fixed number of instances. Though I wouldn't really mind that. My question really was if it's possible to have the instances reflect the character around the sphere spiral. The method i used from @Markus worked but requires realizing the instances to achieve that. I'll keep trying but it's likely you'll come to a solution before me. I'll add some image to show where I am at right now. $\endgroup$
    – Phill_R_O
    May 21, 2022 at 23:58
  • 1
    $\begingroup$ Honestly, I'd say your results look better than mine, and whatever you got wrong, I got right by an accident. I'm afraid I might have been recreating the Reflect node, never used it (just like I use normalize + dot product + multiply and only recently decided to test around and see I'm recreating Project: i.imgur.com/gXjdK7A.png) BTW what's with the shadows in your animation? Something suspic about it. $\endgroup$ May 22, 2022 at 20:42
  • 1
    $\begingroup$ @MarkusvonBroady Wow, i have never tried to recreate the reflect-node, amazing! "what's with the shadows in your animation?" This has only to do with the stupid 2MB limit and the color reduction to 12 colors :-) $\endgroup$
    – quellenform
    May 22, 2022 at 21:03
  • 1
    $\begingroup$ @quellenform I often use Photoshop too, just the effect is not something I would expect from Photoshop's posterization options (you exported as legacy GIF?) with dithering or not. And if you want an easier worfklow, you can just export an image sequence, then drag those files to a tool like this: apngasm.sourceforge.net - and if I really need a GIF, then I just convert it online ezgif.com/apng-to-gif , just remember the smallest delay for GIF is 0.02 or 1/50, lower than that and the GIF actually becomes slower. $\endgroup$ May 23, 2022 at 11:10
  • 2
    $\begingroup$ Wow,you guys kept the discussion alive. Super cool! @quellenform, yes, you are right. What you did works. Sory I've been busy. But the solution you posted in the blend file does exactly that. So no, i don't think my question is confusing, you nailed it right on the head. Just so you know, I'm a noob at this, so there's really no way I could have guessed some of the solutions you came up with. Thanks a lot! $\endgroup$
    – Phill_R_O
    May 23, 2022 at 14:42
5
$\begingroup$

Similarly to Quellenform's answer...

3D

(third try)

I'm pretty sure it can be done without realizing instances, but I'm lazy as it's getting late...

For simplicity (also to make it simpler for myself), I removed the dependency on the Object's Location - I think it didn't work in the first version anyway. But it shouldn't be hard to make it work if need be.

3D instances update

Got close to it yesterday, it all comes down to realizing due to Euler XYZ order you need to rotate around Z first. A switch is there to show both approaches result in exactly the same effect, just the bottom doesn't realize instances. This means the bug mentioned in the comments is still there...

3D bug fix

The bug was very simple, somewhere along the way I accidentally removed Vector Multiply × 1; 1; 0. The idea with the setup around Arctan2 (the part that repeats for both solutions) is to take an angle between a horizontal line towards the Z axis, and the height (vertical line to the XY plane, the Z component of the position). So of course without removing the Z component on the first input of the arctan it can't work properly...

$\endgroup$
3
  • 1
    $\begingroup$ Thanks for your suggestion @Markus von Broady. Yes, you are right. This would definitely be less cumbersome on the computer without realising the instances. But other than that,it works great, even with the spherical spiral. Only difference I noticed was that unlike in the initial example I I can't seem to get the instances at the very tips of the the spirals. I thought it had something to do with the spiral point count. But increasing that had no effect. Any idea how i should do this? $\endgroup$
    – Phill_R_O
    May 21, 2022 at 23:49
  • $\begingroup$ @Phill_R_O I fixed both problems. :) $\endgroup$ May 22, 2022 at 10:21
  • $\begingroup$ This works without realizing the instances so that's quite a savior. @Markus von Broady ,thanks! By the way, I managed to get the objects to flip at the top & bottom of the sphere curve using the map range node. Not sure it's the best solution but it works for now. $\endgroup$
    – Phill_R_O
    May 22, 2022 at 19:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.