Mask out the mirroring/symmetry from math nodes (simple math problem?)

I have a very simple node setup (9 nodes)- I’m using an empty’s position to project a circle onto another object. The circle (the shape isn’t relevant) is formed using Power nodes, which work great, except due to the nature of that math, it creates two visual shapes. I only want the one closest to the empty/3D cursor.

I cannot for the life of me figure out how to mask the other one out or get rid of it. I’ve tried a wide variety of math nodes in different places and I’ve come to accept that I just don’t have the math understanding to fix this.

One thing that I thought would work, that doesn’t for some reason, is changing the mapping to Point from Texture:

It kind of works, but the shape is now locked to one axis, it will follow the empty up and down but not left and right. The shape is also weirdly distorted, although that’s something I can fix.

Anyway, I’m pretty sure there’s an incredibly simple solution to this that I’m just too dumb to figure out :sweat_smile: Here’s my blend file if anyone wants to take a crack at it:
empty_problem.blend (1.8 MB)

There is a possibility that I’m solving for Y when I have problem X here, so let me state my goal super clearly: I want a “shape” based on the object coordinates of an empty to be projected- in one place only- on a different object based on the placement of the empty

To expand on that point solution (that doesn't work), it doesn't create a solution on any combination of Mapping nodes- it either destroys the shape or locks it to one axis

This is a very blunt instrument, but it kinda works. hopefully it points you in a helpful direction:

1 Like

That looks promising! I’ll try that out, thanks :slight_smile: Is there a way to get that to work on all three axes? Would chaining more Sign > Multiply setups from the Y and Z into the Greater Than node work? I’m going to try that of course, I just wanted to know if you know off the top of your head

I believe it would.

I can’t help but feel like there’s got to be a better way to do this, though… I’ll keep noodling on it

1 Like

I’m quite confident there is, this seems way too clunky for a very simple task :thinking:

Your solution does indeed work on the X axis, but not on the other two, unfortunately. That also makes me think I’m going about this entirely wrong.

This would be super easy to do with mesh- I could just parent a plane to the empty, shrinkwrap the plane to the sphere, and voila. That’s not going to work here, but maybe there’s a way to replicate that process with shader nodes on just one object?

this is much simpler, but still a little wonky:

I’m attempting to convert the empty object texture coordinate to a normal, but it’s not a 1:1 conversion.

1 Like

Maybe this works for you:

empty_problem.blend (1.8 MB)

1 Like

Thanks for the input! :slight_smile:

It technically works. Is there any way to still use the object coordinates? Using this method always gives a perfect circle that ignores the surface curvature of the sphere. My method stretches the circle around the curvature, you can see how the corners of it are “pinched” in the initial screenshot. Unfortunately that pinching is pretty important to what I’m doing.

You get me in pinch there, that is too much math for me,
but you could maybe use this to mask your original version to get one stretched circle.

1 Like

Using @rigoletto 's idea, I tried this, which works some of the time, but doesn’t follow the position of the empty very well :thinking: it’s a start I suppose

ooh… that’s a really good idea, thank you

The masking idea worked really well, I wish there was a less clunky way to do this but what works, works :smiley: thanks to both of your for your help!

1 Like

Still wonder why you want it stretched, and thought maybe he want to simulate a spotlight that hits the surface.

But anyway you could get the stretching by size and rotating the empty. Its like an spotlight then if you control the angles and size of the empty. But i doubt the math for that are easier but it could give an unclunky solution.

So I can have a bunch that blend nicely with each other:

1 Like

Yes, very good idea. By controlling the empties you can make a lot of nice effects, a lot of possibilities.

1 Like

Yeah, I know it’s kind of a weird use case, I’m working on something very specific :sweat_smile: