Autodesk / arnold-usd

Arnold components for USD
https://www.arnoldrenderer.com/
Other
243 stars 57 forks source link

Camera projection shader does not work #1935

Open xsisupport opened 3 months ago

xsisupport commented 3 months ago

Describe the bug In the Solaris viewport, the camera projection shader always uses the render camera. An exported USD file has the wrong camera name for the projection shader ("/stage/projection_camera" instead of "/cameras/projection_camera"). An HDARNOLD_DEBUG_SCENE ass file has no an empty camera_projection.camera parameter.

To Reproduce Steps to reproduce the behavior:

  1. You can load the attached Houdini scene. Or kick the attached usd file.

camera_projection_test.zip

Used Software Versions

BigRoy commented 3 months ago

Is this a regression recently?

I recall in Houdini 20.0.590 with HtoA 6.2.5.2 to be able to do camera shader projections - however one had to manually disable some of the default expressions the materials would make in LOP material networks because it'd always assume you want geometry level objects but I believe specifying actually USD prim paths did work fine in our renders at the time?

autodesk-oss-arnold-bot[bot] commented 3 months ago

Issue synced internally to ARNOLD-15174

cpichard commented 3 months ago

Hi, it looks like the projection is working fine, however the Arnold Camera Projection houdini node is taking an operator for its camera value instead of a stage path. The aspect ratio also seems wrong at a first glance.

cpichard commented 3 months ago
Screenshot 2024-06-26 at 15 20 30
cpichard commented 3 months ago

It is using the classic htoa way of selecting cameras, we need to translate somehow the operator path to the stage path. I moved this ticket to HTOA: HTOA-2635

BigRoy commented 3 months ago

The aspect ratio also seems wrong at a first glance.

Ah yes, that's correct - we removed the expression and just entered the valid USD path. So it's mostly "cosmetic" on the Houdini side - the actual render translation logic does work.

Basically: