Profile Picture

Spring Joints (February Sample Script)

Posted By Eric C (RL) Last Year
You don't have permission to rate!
Author
Message
Eric C (RL)
Eric C (RL)
Posted Last Year
View Quick Profile
Distinguished Member

Distinguished Member (5.3K reputation)Distinguished Member (5.3K reputation)Distinguished Member (5.3K reputation)Distinguished Member (5.3K reputation)Distinguished Member (5.3K reputation)Distinguished Member (5.3K reputation)Distinguished Member (5.3K reputation)Distinguished Member (5.3K reputation)Distinguished Member (5.3K reputation)

Group: Administrators
Last Active: 2 hours ago
Posts: 429, Visits: 3.6K
Spring Joints ( Sample Script for February 2020)

In the previous Python of the Month, the Reallusion Python Team introduced the
PopcornFX Sequencer sample script exercise which introduces ways to easily and intuitively manage PopcornFX particle emit time and loop status without using the timeline. 

This time, we'd like to introduce our sixth Python of the Month:
 Spring Joints.  Through this course and its subsequent fundamental courses, you will learn how Spring Joints plugin works in animation, allowing you to apply spring physics to designated bones and props in the scene. The spring effect is calculated using an algorithm that takes into account several physics elements such as stiffness, bounciness, and damping. This plug-in is versatile and can turn any existing bone or prop hierarchy into an active physics spring chain. You can also create a prop chain by attaching various props together and apply spring physics using this plug-in.

*

Spring joints can be used to animated mounted drivers and passengers on moving vehicles.  This script operates and updates in near real-time.
  • You can download the script from the Marketplace
  • To explore how it works, please visit the Python Wiki.
  • To get the source code, please visit our GitHub.
Important Notice: iClone 7.7 is Required!
If you have any questions about the plug-in and the sample code, please feel free to let us know by replying to this post.

Relevant Fundamental Courses

Be sure to read this first to help you understand how this sample plug-in works.
You should familiarize yourself with the following fundamental lessons before you proceed:
  • Transform Math - Access recipes for 3D transformational math dealing with spatial calculations.
  • Rotation Math - Access recipes for 3D rotational math dealing with spatial calculations.
  • Error Handling - Learn to handle and debug show-stopping errors in code.
  • Handling Time - Learn to manage complex timeline features by making a special re-usable class.
  • Icons and Images - Learn to deploy icons and images inside a user interface.
For more courses and links to other Python of the Month activities, please visit here.

Enjoy!

Reallusion Python Team
Edited
Last Year by Eric C (RL)
Kelleytoons
Kelleytoons
Posted 6 Months Ago
View Quick Profile
Distinguished Member

Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)

Group: Forum Members
Last Active: 3 days ago
Posts: 8.4K, Visits: 19.2K
Eric,

I realize this was a while ago (like over a year ago) but I'm just now trying to understand this and clearly I do not.

I don't suppose you'd have time to take a glance at my project.  It's not set up correctly, that much is clear, but I tried to follow the video the best I could (in the video the vehicle is in two parts but I'm not really sure why that should make a difference, although I can make another part if need be).

https://mega.nz/file/F6ZgzRyC#RRYxTpaxFQnh4ndKpW8I4kJHaQOgczWA4emN17u82vM



Alienware Aurora R12, Win 10, i9-119000KF, 3.5GHz CPU, 128GB RAM, RTX 3090 (24GB), Samsung 960 Pro 4TB M-2 SSD, TB+ Disk space
Mike "ex-genius" Kelley
Tugpsx
Tugpsx
Posted 6 Months Ago
View Quick Profile
Junior Member

Junior Member (141 reputation)Junior Member (141 reputation)Junior Member (141 reputation)Junior Member (141 reputation)Junior Member (141 reputation)Junior Member (141 reputation)Junior Member (141 reputation)Junior Member (141 reputation)Junior Member (141 reputation)

Group: Forum Members
Last Active: 4 days ago
Posts: 15, Visits: 319
Looks like you have the character working. remember to select the dummies in order to activate them. Loading your scene and selecting simulation without confirming the node selections will not produce the effect you are looking for. once you select the parent nodes you will have the driver swaying as the jeep moves along.

Kelleytoons
Kelleytoons
Posted 6 Months Ago
View Quick Profile
Distinguished Member

Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)

Group: Forum Members
Last Active: 3 days ago
Posts: 8.4K, Visits: 19.2K
Sorry, but I really don't get what you are saying.

If I have the root dummy selected BEFORE I run the script and try to move it, it doesn't work.  If I then select the jeep and move it, it doesn't work.  If I try selecting it IN the script (highlighting the root dummy) it doesn't work.

Clearly I need the idiot mode instructions here -- can you say EXACTLY what you mean by "selecting the dummies".  I can't see how to select them anymore than I'm already doing.



Alienware Aurora R12, Win 10, i9-119000KF, 3.5GHz CPU, 128GB RAM, RTX 3090 (24GB), Samsung 960 Pro 4TB M-2 SSD, TB+ Disk space
Mike "ex-genius" Kelley
Tugpsx
Tugpsx
Posted 6 Months Ago
View Quick Profile
Junior Member

Junior Member (141 reputation)Junior Member (141 reputation)Junior Member (141 reputation)Junior Member (141 reputation)Junior Member (141 reputation)Junior Member (141 reputation)Junior Member (141 reputation)Junior Member (141 reputation)Junior Member (141 reputation)

Group: Forum Members
Last Active: 4 days ago
Posts: 15, Visits: 319
One sec will make a quick video
1) Select root
2) Launch Spring Joint Plugin
3) Expand Root_dummy
4) Select each dummy





iClone Spring Joint Test

Edited
6 Months Ago by Tugpsx
Kelleytoons
Kelleytoons
Posted 6 Months Ago
View Quick Profile
Distinguished Member

Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)

Group: Forum Members
Last Active: 3 days ago
Posts: 8.4K, Visits: 19.2K
Thanks!

For some reason I did NOT see the checkmark box so when you said "select" I didn't get where to select other than highlighting it.

Okay - now this old man FINALLY gets how it works.



Alienware Aurora R12, Win 10, i9-119000KF, 3.5GHz CPU, 128GB RAM, RTX 3090 (24GB), Samsung 960 Pro 4TB M-2 SSD, TB+ Disk space
Mike "ex-genius" Kelley
Tugpsx
Tugpsx
Posted 6 Months Ago
View Quick Profile
Junior Member

Junior Member (141 reputation)Junior Member (141 reputation)Junior Member (141 reputation)Junior Member (141 reputation)Junior Member (141 reputation)Junior Member (141 reputation)Junior Member (141 reputation)Junior Member (141 reputation)Junior Member (141 reputation)

Group: Forum Members
Last Active: 4 days ago
Posts: 15, Visits: 319
So now that you know you can add spring to the shocks of the jeep. Setup a bumpy road and have the jeep tires do collision detection to roll over a bump as your figure performs the physics related reactions. BigGrin



Reading This Topic