Trying to move a camera according to some coordinate

   1203   3   1
User Avatar
Member
3 posts
Joined: Nov. 2019
Offline
Hello,

I'm trying to make a camera follow certain coordinates through time. Coordinate I'm able to collectfrom a txt file, organized like this :

POINTS 417 SPEED 25 TIME 16
Frame XV YV ZV XT YT ZT Roll
1 163.80832 307.56781 -265.75311 175.96983 68.3157 -251.33968 23.58062
2 163.80823 307.56772 -265.75305 175.96985 68.3157 -251.33965 23.58044
3 163.80757 307.56699 -265.75275 175.96989 68.31568 -251.33946 23.5787

417 163.80757 307.56699 -265.75275 175.96989 68.31568 -251.33946 23.5787



I'm able to collect every information I need, such as : the number of key frames, speed, time, every coordinates ….
(XV, YV, ZV are the coordinate of my camera, and XT, YT and ZT are the coordinates of a object I'm looking at)


I'm also able to create a camera :
g = hou.node('/obj').createNode('cam')

and to access some of her parameters
eg : tx = g.parm('tx')

The problem I'm dealing with is about the key frames, and how to change coordinates of my camera every time I create a new key frames.

Do you have any ideas ?
Thank you
(Sorry if they are any English mistakes, I'm not fluent!)
User Avatar
Member
201 posts
Joined: July 2015
Offline
This is basically your own file format. So you would need to create some python code that could interpret your .txt into useful information.
Then its only up to interpolate between the values of your .txt via hou.time() or hou.frame().

Good luck!
Manuel Köster - Senior Technical Artist @Remedy Entertainment

https://www.remedygames.com/ [www.remedygames.com]
http://shadesoforange.de/ [shadesoforange.de]
https://twitter.com/ShadesOfOrange_ [twitter.com]
User Avatar
Staff
3455 posts
Joined: July 2005
Offline
you might try the Table SOP…?
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
3 posts
Joined: Nov. 2019
Offline
Hello, thanks for responding ( and sorry for the late answer )

@shadesoforange : I already know how to interpret the .txt into useful information !

Do you have any example to use hou.time/hou.frame with a camera node. I've been looking on internet, but could not find any useful stuff / working example


@goldfarb : https://www.sidefx.com/docs/houdini/nodes/sop/tableimport.html [www.sidefx.com]
Are you referring to this ?
  • Quick Links