Difference between revisions of "IC Python API:Smooth Camera Follow"
Chuck (RL) (Talk | contribs) m (→Code Flow) |
Chuck (RL) (Talk | contribs) m (→Steps to Take) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{TOC}} | {{TOC}} | ||
− | {{Parent|IC_Python_API | + | {{Parent|IC_Python_API#Python_of_the_Month|Python of the Month}} |
== Demo Video == | == Demo Video == | ||
Line 25: | Line 25: | ||
*[[ iC_Python_API:Float_Slider| Float Slider ]] | *[[ iC_Python_API:Float_Slider| Float Slider ]] | ||
− | == | + | == Takeaway Lessons == |
− | * | + | * Learn to drive the motion of the camera according to the animation of a prop. |
* Populate drop down menus/combo boxes with elements from the scene. | * Populate drop down menus/combo boxes with elements from the scene. | ||
Line 39: | Line 39: | ||
To acquire and view the source code, please visit [https://github.com/reallusion/iClone/tree/master/SmoothCameraFollow Reallusion GitHub]. | To acquire and view the source code, please visit [https://github.com/reallusion/iClone/tree/master/SmoothCameraFollow Reallusion GitHub]. | ||
− | == | + | == Usage Instructions == |
# Clone or download the Reallusion/iClone GitHub. | # Clone or download the Reallusion/iClone GitHub. |
Latest revision as of 20:09, 19 October 2020
- Main article: Python of the Month.
Demo Video
Description
This script lets the user pick a camera/view and a prop/target to follow. The camera will always be facing the direction of the target prop with delay as an adjustable factor. The Offset values creates a distance between the view and the target. Use the Delay value to create a lag between the view and the target.
Course Prerequisites
You should be familiarize yourself with the following fundamental articles before you proceed:
Takeaway Lessons
- Learn to drive the motion of the camera according to the animation of a prop.
- Populate drop down menus/combo boxes with elements from the scene.
Required Files
- iClone scene with camera and animated prop
- Smooth Camera Follow Python script
- Extensions Python script
You can download this plugin from the Reallusion Marketplace. To acquire and view the source code, please visit Reallusion GitHub.
Usage Instructions
- Clone or download the Reallusion/iClone GitHub.
- Copy SmoothCameraFollow folder into the iClone install directory > ...\Bin64\OpenPlugin.
- Load the script into the project from the menu: Plugins > Python Samples > Smooth Camera Follow.
- Follow the instructions in the subsequent dialog window.
Code Flow
Given a target prop and a target camera, the script will also require the inputs for the camera movement delay and offset position from the target prop. The code creates a new movement animation for the camera transformations by applying keys in the timeline. The final result is a camera that smoothly follows the target prop at the designated offset position with a certain degree of lag time decided by the user.
APIs Used
You can research the following references for the modules deployed in this code.