Community
3ds Max Animation and Rigging
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max animation topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Trailer Rigging

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
truckexpert
1263 Views, 7 Replies

Trailer Rigging

Well, I'm looking for the same solution. I've drawn it up to help visualize it. 

 

Is there  a constraint that would allow the trailer wheels to follow the truck, not along the path of the truck, but rolling in the direction the trailer is headed. Is there a lateral constraint that will allow the wheels to follow at a fixed distance behind the trailer, while the length of the trailer to stay constant. In a curve, this will cause off-tracking, so that the rear wheels of the trailer are not following the path in a curve, but trailing behind at a constant distance in the direction the tires are rolling, just like a real trailer.

 

Any help would be greatly appreciated!

 

Thanks, and happy holidays to all.

Trailer Follower Problem - Drawing & Description.JPG

Peace,
Dave

System Information:
------------------------------
3DS Max 2023 and 2024
Microsoft Windows 11 Pro
Dell Precision 5820
Intel(R) Core(TM) i9-10920X CPU @ 3.50GHz, 3504 Mhz, 12 Core(s), 24 Logical Processor(s)
Display Adapter: NVIDIA RTX A4000
Adapter RAM (1,048,576) bytes
Installed Physical Memory (RAM) 64.0 GB
Total Physical Memory 63.7 GB
Available Physical Memory 45.6 GB
Total Virtual Memory 81.7 GB
Available Virtual Memory 56.5 GB
Page File Space 18.0 GB
7 REPLIES 7
Message 2 of 8
leeminardi
in reply to: truckexpert

Would the following sufficiently capture the trajectory for the trailer?

 

The red spline is the path of the truck.  The green arc has a radius equal to the distance from the hitch to the midpoint between the two trailer wheels (your distance L).  The truck's initial position is TRUCK-1 and the trailer's TRAILER-1. Positions 2 and 3 are subsequent positions some time later. The change in time (number of frames) could be adjusted as necessary.   The new position of the trailer is determined by finding the point of intersection of a line defined by the current position of the truck to its previous position (the yellow line)  and the green arc for the truck's current position.  As a result, the trailer's path is not the same as the truck's path which is how it is in reality.

 

I'm not sure I can write an transform script to capture the trailer's motion but I wanted to verify my understanding of the path before I try.  What do you think? 

 

image.png

lee.minardi
Message 3 of 8
leeminardi
in reply to: leeminardi

On further thought the new position of the trailer should be based on the previous position of the trailer (not the truck).

 

For example, position and alignment for TRALER-3 should be as follows.

image.png

lee.minardi
Message 4 of 8
domo.spaji
in reply to: leeminardi

Trailers should follow the track path, not killing other traffic participants.

 

In "normal" driving on normal roads.

 

Front and rear wheals on same vehicle don't always going exactly same path, but path constraint (with follow) is good enough for (not scientific) animations.

Message 5 of 8
truckexpert
in reply to: truckexpert

That’s the basic idea. Here is different diagram that might illustrate the geometry/trig in a different wayA55203FA-4E93-4143-BC9E-43ECF757B224.jpeg

Peace,
Dave

System Information:
------------------------------
3DS Max 2023 and 2024
Microsoft Windows 11 Pro
Dell Precision 5820
Intel(R) Core(TM) i9-10920X CPU @ 3.50GHz, 3504 Mhz, 12 Core(s), 24 Logical Processor(s)
Display Adapter: NVIDIA RTX A4000
Adapter RAM (1,048,576) bytes
Installed Physical Memory (RAM) 64.0 GB
Total Physical Memory 63.7 GB
Available Physical Memory 45.6 GB
Total Virtual Memory 81.7 GB
Available Virtual Memory 56.5 GB
Page File Space 18.0 GB
Message 6 of 8
truckexpert
in reply to: leeminardi

Thanks for working on this. I appreciate you and the others on the forum. I'd be at half capacity at all times without the help.
I thought about doing it this way, too (arc-to-spline) with some artistic license. For most cases this would be just fine, and I probably will try it to compare the "realness" factor.

 

Meanwhile, I stumbled on the solution on YouTube. Kudos to Realistic Animation for figuring it out and sharing it. I didn't expect it to be this hard to prevent wheels from rolling sideways, or it's so obvious as to be trivial, and I'm the only one who does not know how to do it. 😪

 

I've watched the video and I STILL can't figure it out, mostly because I'm slow, and there's no narration/explanation. Also, it's an older version of 3DS Max.

 

I'd appreciate any help understanding how this works.

https://youtu.be/7fq98UbXvAQ

Peace,
Dave

System Information:
------------------------------
3DS Max 2023 and 2024
Microsoft Windows 11 Pro
Dell Precision 5820
Intel(R) Core(TM) i9-10920X CPU @ 3.50GHz, 3504 Mhz, 12 Core(s), 24 Logical Processor(s)
Display Adapter: NVIDIA RTX A4000
Adapter RAM (1,048,576) bytes
Installed Physical Memory (RAM) 64.0 GB
Total Physical Memory 63.7 GB
Available Physical Memory 45.6 GB
Total Virtual Memory 81.7 GB
Available Virtual Memory 56.5 GB
Page File Space 18.0 GB
Message 7 of 8
leeminardi
in reply to: truckexpert

@truckexpert that's a very sophisticated solution!  I'm not sure I follow all of it.

 

I played around with the geometry reference you had in post #5.  I created a transform script for a point that locates the position of the trailer's rear wheels then used a LookAt constraint to orient the trailer. There are two key points to be determined,

1. The instantaneous center of curvature for the path at the location of the truck (pCen).  To approximate this point I found the intersection of the vector in the direction of the rear wheels of the truck (truckAT.row2) and the Y vector of a  dummy that follows slightly behind the truck (dummyA). To help in the debugging of the transform script, the point "pointCen" (blue) tracks the center of curvature as you scrub the time line and the truck (and dummyA) follow the path.  It's important that the center of curvature point stays outside the red circle that has a radius equal to the length of the trailer.   As pointCen gets closer to the truck the turns get tighter and more challenging for the trailer.

2.  Another point to calculate is the location of the rear wheels of the trailer.  This point is a distance L (40' in my example) from the truck's trailer pivot and at a point that is tangent to a line from pCen to the circle defined by the trailer length.  Which of the two tangent points to use is determined by whether the truck is turning clockwise or counter-clockwise.  The sign of the z component of the cross product of the direction vector of the truck with the vector going from the truck to pCen is used to determine the turn direction.

 

The results are a bit rough but look better when the path radii are much greater than the length of the trailer.

image.png

lee.minardi
Message 8 of 8
truckexpert
in reply to: leeminardi

Well, interesting approach. I didn't know MAX would do dot and cross products. Thanks for the help!

Peace,
Dave

System Information:
------------------------------
3DS Max 2023 and 2024
Microsoft Windows 11 Pro
Dell Precision 5820
Intel(R) Core(TM) i9-10920X CPU @ 3.50GHz, 3504 Mhz, 12 Core(s), 24 Logical Processor(s)
Display Adapter: NVIDIA RTX A4000
Adapter RAM (1,048,576) bytes
Installed Physical Memory (RAM) 64.0 GB
Total Physical Memory 63.7 GB
Available Physical Memory 45.6 GB
Total Virtual Memory 81.7 GB
Available Virtual Memory 56.5 GB
Page File Space 18.0 GB

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report