Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

Community
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

New Position Controller: Line-Plane Intersection

New Position Controller: Line-Plane Intersection

3ds max needs a proper native controller to get the position of the intersection between a line (two points) and a plane. This is highly useful in mechanical rigs for example.

 

This concept is illustrated in the GIF below, which is rigged using a position script controller on the yellow point object:

3dsmax_nbTs1qjfYT.gif

So the imagined controller for this idea is a Position Controller.

  • In it you can specify two positions that forms a line. It will be the positions of two picked objects.
  • You then specify the position of your "plane", which doesn't need to be an actual plane object, and then you select which object axis should make out the plane normal. For the plane object in the illustration above the normal is the Z axis.

The point where the line and the plane intersects will be the output position value of the controller.

 

An option could also be added so that the object where the controller sits automatically adopts the rotation of the plane object if desired, similar to how the "Follow" mode of Paths Constraints override rotation despite being a Position Controller:
Object adopting the rotation of the plane.Object adopting the rotation of the plane.

3 Comments
dswahn
Advocate

It has been pointed out that you can achieve a similar functionality using the Ray To Surface Position.
I argue that it can be beneficial not having to rely on a finite mesh to check for the intersection. In my example the plane is virtual, meaning it does not rely on any kind of scene geometry. That means objects like point helpers can directly drive plane, which means less objects cluttering the rigs.

 

The point is to have a controller that requires less objects and manual setup to get this functionality. 

 

3dsmax_SJmPhMZ8g4.gif

nice idea!

MartinBeh
Collaborator

This idea made me curious so I wrote a little Script Controller to do this type of line-plane-intersection constraint.

You can take a look at this at https://scripts.breidt.net/line-plane-intersection_max2023.max

The scene does use a Plane object because it is easier so understand what is going on, but really it only uses the object's coordinate system to define a plane. I also added an option to constrain the result to stay on the line between the two points, or to virtually extend the line to infinity.

 

A bit unclear (to me) is what should happen if line and plane are parallel; for now I just use either the plane's origin, or the position of the first of the two line points, to keep things simple.

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea  

Autodesk Design & Make Report