Guan Lian

guan9287

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

About camera animation in solaris July 9, 2024, 12:08 a.m.

eikonoklastes
guan9287
hope this can provide some help
This works, thanks, and without introducing a time dependency.

Can you clarify why you split the camera transforms into separate Transform LOPs and recommended only adjusting the Z transform on the Camera LOP itself? This seems to work correctly without needing to do that.

This is just my usage and not standard practice. This build is easier to control when making non-free camera animations

About camera animation in solaris July 8, 2024, 1:40 a.m.

eikonoklastes
Hopefully you don't have an animated focus target, because good luck with that.

Honestly, you're likely way better off importing an animated camera from /obj than attempting to animate it in Solaris.
hope this can provide some help

How to set the camera focus distance using expression? Jan. 2, 2024, 8:25 p.m.

When using the transform to move the camera, the method mentioned above becomes ineffective. I used the 'wrangle' with the help of ChatGPT, and the following is the code:


matrix cameraTransform = usd_worldtransform(0,"/cameras/camera1");
matrix targetTransform = usd_worldtransform(1,"/pig/target_FD");


vector4 cameraPosHomogeneous = set(0, 0, 0, 1);
vector4 targetPosHomogeneous = set(0, 0, 0, 1);
cameraPosHomogeneous = cameraTransform * cameraPosHomogeneous;
targetPosHomogeneous = targetTransform * targetPosHomogeneous;
vector cameraPos = set(cameraPosHomogeneous, cameraPosHomogeneous, cameraPosHomogeneous);
vector targetPos = set(targetPosHomogeneous, targetPosHomogeneous, targetPosHomogeneous);



float distance = distance(cameraPos, targetPos);


usd_setattrib(0,"/cameras/camera1", "focusDistance", distance);