Difference between revisions of "IC Python API:Smooth Camera Follow"

From Reallusion Wiki!
Jump to: navigation, search
m
m
Line 5: Line 5:
  
 
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.
 
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.
 
{{Single_Illustration|Camera_WIKI_Code_Route.png}}
 
  
 
=== Learn How to ===
 
=== Learn How to ===
Line 18: Line 16:
 
* Smooth Camera Follow Python script
 
* Smooth Camera Follow Python script
 
* Extensions Python script
 
* Extensions Python script
 +
 +
=== 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.
 +
 +
{{Single_Illustration|Camera_WIKI_Code_Route.png}}
 +
  
 
=== Steps to Take ===
 
=== Steps to Take ===

Revision as of 17:52, 14 April 2019

Main article: RL Python Samples.

Smooth Camera Follow

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.

Learn How 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.
  • Set timer and event callbacks and attach commands.

Required Files

  • iClone scene with camera and animated prop
  • Smooth Camera Follow Python script
  • Extensions Python script

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.

Camera WIKI Code Route.png


Steps to Take

  1. Unzip the contents of Smooth Camera Follow.zip into the iClone install directory ...\Bin64\OpenPlugin.
  2. Load the script into the project from the menu: Plugins > Python Samples > Smooth Camera Follow.
  3. Follow the instructions in the subsequent dialog window.

Modules Used

main.py

Extensions.py