Profile Picture

Spring Joints (February Sample Script)

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

Distinguished Member (10.0K reputation)Distinguished Member (10.0K reputation)Distinguished Member (10.0K reputation)Distinguished Member (10.0K reputation)Distinguished Member (10.0K reputation)Distinguished Member (10.0K reputation)Distinguished Member (10.0K reputation)Distinguished Member (10.0K reputation)Distinguished Member (10.0K reputation)

Group: Administrators
Last Active: Last Week
Posts: 459, Visits: 5.2K
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
4 Years Ago by Eric C (RL)
Kelleytoons
Kelleytoons
Posted 3 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)

Group: Forum Members
Last Active: 41 minutes ago
Posts: 9.1K, Visits: 21.8K
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 3 Years Ago
View Quick Profile
Junior Member

Junior Member (180 reputation)Junior Member (180 reputation)Junior Member (180 reputation)Junior Member (180 reputation)Junior Member (180 reputation)Junior Member (180 reputation)Junior Member (180 reputation)Junior Member (180 reputation)Junior Member (180 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 19, Visits: 406
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 3 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)

Group: Forum Members
Last Active: 41 minutes ago
Posts: 9.1K, Visits: 21.8K
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 3 Years Ago
View Quick Profile
Junior Member

Junior Member (180 reputation)Junior Member (180 reputation)Junior Member (180 reputation)Junior Member (180 reputation)Junior Member (180 reputation)Junior Member (180 reputation)Junior Member (180 reputation)Junior Member (180 reputation)Junior Member (180 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 19, Visits: 406
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
3 Years Ago by Tugpsx
Kelleytoons
Kelleytoons
Posted 3 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)

Group: Forum Members
Last Active: 41 minutes ago
Posts: 9.1K, Visits: 21.8K
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 3 Years Ago
View Quick Profile
Junior Member

Junior Member (180 reputation)Junior Member (180 reputation)Junior Member (180 reputation)Junior Member (180 reputation)Junior Member (180 reputation)Junior Member (180 reputation)Junior Member (180 reputation)Junior Member (180 reputation)Junior Member (180 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 19, Visits: 406
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
Ascensi
Ascensi
Posted 2 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (5.5K reputation)Distinguished Member (5.5K reputation)Distinguished Member (5.5K reputation)Distinguished Member (5.5K reputation)Distinguished Member (5.5K reputation)Distinguished Member (5.5K reputation)Distinguished Member (5.5K reputation)Distinguished Member (5.5K reputation)Distinguished Member (5.5K reputation)

Group: Forum Members
Last Active: Last Month
Posts: 247, Visits: 1.8K
Hi Eric, considering you might know the limitations of the Character Joints and what joints spring effects it is compatible with, is there any possible way for a CC3 character that has been modified to have additional joints along the spine between the head and Pelvis or hip can have spring effects enabled on them in CC4?

I know this works for the eyes, I've created extra joints for them and later applied spring effects - works awesome! but what about along the spine? does CC4 prevent bones from having Spring effects applied because of naming convention? ie "spine, neck or pelvis"?  I'd like to enable spring effects on custom bones and or potentially use constraints in iC8 to limit movement, thanks.

Store Page Link 
https://forum.reallusion.com/uploads/images/906a14b0-c792-4382-99ee-7dfe.jpg
AMD 4.5 GHz 16 Cores  | 128 GB | RTX 4090 | Window11 | Houdini FX 18.5 | Zbrush 2023 | Maya 2014 | Adobe CS6 | Sonar Producer X3 | iC8, CC4 | DTS Master Audio Suite | Perception Neuron 32 Alum Edition | Akeytsu 




Reading This Topic