Download

DistanceToNearestSurface distance slider

Is there a way to change how far the DistanceToNearestSurface material node can reach before colliding? Right now the range seems to just be a little too small.

Bump!!!

How are you using this node? Currently we dont have enough information to know what you want.

Is this in a material?
Is this for a particle system?
What are you expecting to happen, and what do you mean by “range is too small”? The distance field should be 0 at any walls etc. You could use an add node in materials to bias this but I am not sure you would want to do that since it will either make things hit floating off or inside the wall.

Essentially, what I am using the Material node for is to make a force shield that will emit light near an area of contact before it hits. Image below:
je1YRaU.png

Here is the material setup I am using:
a322d08298bceb04830f33b8e073a3caf0362d1c.jpeg

What I want to adjust is the distance at which the material will detect the floor, walls etc.

I hope this clears up a few things.

A simple add using a scalar parameter should be all you need.

Thanks, but I seem to be getting odd grid-like artifacts from increasing the parameter
KnKqIus.png
Any way to fix this?

How are you doing the add?

I am talking about adding after sampling the value, like so:

offset.JPG

It should simply be shifting where the 0 boundary is. There should be no way for it to create artifacts or shapes that do not exist. Maybe you just need to use a negative number instead of a positive one? Negative numbers will push the field further away. Positive values will bring it closer.

It is possible you are seeing some clipmap artifact. Usually zooming the camera far away and then back fixes those.

The artifacts are still there, even with no other nodes in the material. The offset seems to make the artifacts more visible when the offset is underneath 0. It does not seem to be a clipmap artifact as zooming the camera far away did not fix this. Could it be something in the material or the rendering settings?

Ah I bet your sphere mesh itself is affecting the distance fields and it is getting its own distance field. Try making sure all affects distance field settings are disabled on your sphere mesh any anything else that might interfere.

Still, going negative with the offset should still have worked around the issue somewhat

Yea, that did it! I think it was the ship mesh that was interfering as well as the sphere itself. Thanks a ton!