Dimitri Dochy

dimitri.dochy59

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Houdini / Pyhton how to set a target for a camera ? Dec. 12, 2019, 5:12 a.m.

Hello,

I'm working an a project to import some camera movement from a .txt containing data.
the txt contains : the coordinates of the camera and a target for every frame

I know how to create and make the camera and the object move at ever key frame ( I'm using the setKeyFrame function )

But know my problem is : how to set the camera target. I can't find anything on the Houdini/python documentation.

Do you have any idea/ any example of code ?

this is how I declare my camera and my target (which is a null object) :

g = hou.node('/obj').createNode('cam')
t = hou.node('/obj').createNode('null')


Thank you in advance !

Trying to move a camera according to some coordinate Dec. 2, 2019, 9:16 a.m.

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 ?

Trying to move a camera according to some coordinate Nov. 14, 2019, 4:01 a.m.

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!)