Setting camera transform ?

115 views
Skip to first unread message

Nicholas Yue

unread,
Sep 7, 2020, 7:37:37 PM9/7/20
to alembic-discussion
Hi,

  I am trying to set the transformation matrix of a OCamera but not sure what I should be calling to set the matrix. I dump out an existing alembic camera exported from Houdini and I can see the values I put in in some property call .xform

  When I query my simple camera, I only have one property call .geom

  Do I set transform via creating properties or is there some higher level call where I can pass in a M44d matrix ?

==============

Example dump from a Houdini exported Alembic camera.


/:
AbcGeom_Xform_v3                   cam1 {
                                    schema=AbcGeom_Xform_v3
                                    schemaObjTitle=AbcGeom_Xform_v3:.xform
                                   }
ScalarProperty      uint32_t       1.samples[1]
1
/cam1:
AbcGeom_Camera_v1                  cameraProperties {
                                    schema=AbcGeom_Camera_v1
                                    schemaObjTitle=AbcGeom_Camera_v1:.geom
                                   }
CompoundProperty                   .xform {schema=AbcGeom_Xform_v3}
ScalarProperty      int8_t         visible[1]
-1
/cam1/.xform:
ScalarProperty      bool_t         .inherits[1]
1
ScalarProperty      uint8_t        .ops[1]
48
ScalarProperty      float64_t[16]  .vals[1]
0.707107, 0, -0.707107, 0, -0.353553, 0.866025, -0.353553, 0, 0.612372, 0.5, 0.612372, 0, 3, 2, 4, 1
ScalarProperty      bool_t         isNotConstantIdentity[1]
1
/cam1/cameraProperties:
CompoundProperty                   .geom {schema=AbcGeom_Camera_v1}
/cam1/cameraProperties/.geom:
ScalarProperty      float64_t[16]  .core[1]
50, 4.14214, 0, 2.32995, 0, 1, 0, 0, 0, 0, 5.6, 5, 0, 0.0208333, 0.122916, 4554.3
CompoundProperty                   .userProperties
ScalarProperty      string         .filmBackOps[1]
swinsize
ScalarProperty      float64_t[2]   .filmBackChannels[1]
1, 1
/cam1/cameraProperties/.userProperties:
ScalarProperty      float32_t      resx[1]
1280
ScalarProperty      float32_t      resy[1]
720



Cheers

Lucas Miller

unread,
Sep 7, 2020, 7:43:06 PM9/7/20
to alembic-d...@googlegroups.com
Put the xform in a separate OObject as many DCCs can't handle the 3d xform and the camera together.

--
You received this message because you are subscribed to the Google Groups "alembic-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alembic-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/alembic-discussion/0399130f-af3a-42d2-9a31-52f9dd84ac53n%40googlegroups.com.

Nicholas Yue

unread,
Sep 7, 2020, 8:19:07 PM9/7/20
to alembic-discussion
Thanks Lucas. I got it working.




--
Nicholas Yue
Graphics - Arnold, Alembic, RenderMan, OpenGL, HDF5
Custom Dev - C++ porting, OSX, Linux, Windows
http://au.linkedin.com/in/nicholasyue
https://vimeo.com/channels/naiadtools
Reply all
Reply to author
Forward
0 new messages