Alembic Export: Camera resolution parameters not included. (resx, resy) #116375

Closed
opened 2023-12-20 13:21:03 +01:00 by Yonatan-Bary · 7 comments

System Information
MacOS 12.2.1

Blender Version
4.0.0

The Problem:
Blender's cameras don't have specific resolution configured to them, instead they use the scene's resolution.
This is a problem when exporting a camera using Alembic. Other software (like Houdini) expects the resolution parameters on the camera itself.

Possible solution:
Store the scene's resolution on each camera that is exported.
The needed parameters looks like this (found using abcecho):

CompoundProperty name=.userProperties;schema=
ScalarProperty name=resx;interpretation=;datatype=float32_t;arraysize=1;numsamps=1
ScalarProperty name=resy;interpretation=;datatype=float32_t;arraysize=1;numsamps=1

Two alembic files attached:
One without the resx,resy parameters, exported from Blender.
The other with, exported from Houdini.

Thanks for the awesome work anyways!

**System Information** MacOS 12.2.1 **Blender Version** 4.0.0 **The Problem:** Blender's cameras don't have specific resolution configured to them, instead they use the scene's resolution. This is a problem when exporting a camera using Alembic. Other software (like Houdini) expects the resolution parameters on the camera itself. **Possible solution:** Store the scene's resolution on each camera that is exported. The needed parameters looks like this (found using abcecho): `CompoundProperty name=.userProperties;schema=` ` ScalarProperty name=resx;interpretation=;datatype=float32_t;arraysize=1;numsamps=1` ` ScalarProperty name=resy;interpretation=;datatype=float32_t;arraysize=1;numsamps=1` **Two alembic files attached:** One without the resx,resy parameters, exported from Blender. The other with, exported from Houdini. Thanks for the awesome work anyways!
Yonatan-Bary added the
Type
To Do
label 2023-12-20 13:21:03 +01:00
Member

Can check on this

Can check on this
Philipp Oeser self-assigned this 2023-12-20 13:46:04 +01:00
Philipp Oeser added the
Interest
Alembic
Status
Confirmed
Module
Pipeline, Assets & IO
labels 2023-12-20 13:46:33 +01:00
Member

Ah, misread this (these are implemented as userProperties in Houdini -- maybe Maya, too?, dont think they are part of the concept of a camera in alembic or USD itself... see https://docs.alembic.io/python/abcg.html#alembic.AbcGeom.CameraSample)

So this then looks like it is questionable to support these?

@dr.sybren : do you recall if we support userProperties outside the spec just to be compatible with other software?

Ah, misread this (these are implemented as `userProperties` in Houdini -- maybe Maya, too?, dont think they are part of the concept of a camera in alembic or USD itself... see https://docs.alembic.io/python/abcg.html#alembic.AbcGeom.CameraSample) So this then looks like it is questionable to support these? @dr.sybren : do you recall if we support `userProperties` outside the spec just to be compatible with other software?
Philipp Oeser removed their assignment 2023-12-20 14:18:10 +01:00
Philipp Oeser added
Status
Needs Info from Developers
and removed
Status
Confirmed
labels 2023-12-20 14:18:18 +01:00
Author

I found these userProperties in the alembic from Blender:
CompoundProperty name=.userProperties;schema=
ScalarProperty name=stereoDistance;interpretation=;datatype=float32_t;arraysize=1;numsamps=1
ScalarProperty name=eyeSeparation;interpretation=;datatype=float32_t;arraysize=1;numsamps=1
Don't know if this helps

I found these userProperties in the alembic from Blender: `CompoundProperty name=.userProperties;schema=` ` ScalarProperty name=stereoDistance;interpretation=;datatype=float32_t;arraysize=1;numsamps=1` ` ScalarProperty name=eyeSeparation;interpretation=;datatype=float32_t;arraysize=1;numsamps=1` Don't know if this helps

@dr.sybren : do you recall if we support userProperties outside the spec just to be compatible with other software?

Last time I worked on USD we didn't, but I haven't been involved with that for a while now. USD is a way more sensible standard than Alembic, though. Much of Alembic is only standardised at the lowest level, and how to store things is often left to whatever application writes the files. There we do have some compatibility stuff, if it's clear enough how to write them.

The problem with adding these kind of compatibility options for proprietary applications is that it's hard to impossible to test whether it's done properly (unless someone sponsors, and keeps sponsoring, developers with Houdini licenses). In this particular case I don't think it'll hurt much to just include some .userProperties on the camera, though.

Other software (like Houdini) expects ...

@Yonatan-Bary what other packages than Houdini expect this?

> @dr.sybren : do you recall if we support `userProperties` outside the spec just to be compatible with other software? Last time I worked on USD we didn't, but I haven't been involved with that for a while now. USD is a way more sensible standard than Alembic, though. Much of Alembic is only standardised at the lowest level, and how to store things is often left to whatever application writes the files. There we do have some compatibility stuff, if it's clear enough how to write them. The problem with adding these kind of compatibility options for proprietary applications is that it's hard to impossible to test whether it's done properly (unless someone sponsors, and keeps sponsoring, developers with Houdini licenses). In this particular case I don't think it'll hurt much to just include some `.userProperties` on the camera, though. > Other software (like Houdini) expects ... @Yonatan-Bary what other packages than Houdini expect this?
Member

OK, so will look into it.

@Yonatan-Bary : would still be good to know if Maya, Houdini (possibly others?) are compatible in that sense, do they all expect (on import) and provide (on export) these values in the same way?

/cam1/cam1Camera/.userProperties:
ScalarProperty      float32_t      resx[1]
ScalarProperty      float32_t      resy[1]
OK, so will look into it. @Yonatan-Bary : would still be good to know if Maya, Houdini (possibly others?) are compatible in that sense, do they all expect (on import) and provide (on export) these values in the same way? ``` /cam1/cam1Camera/.userProperties: ScalarProperty float32_t resx[1] ScalarProperty float32_t resy[1] ```
Philipp Oeser added
Status
Confirmed
and removed
Status
Needs Info from Developers
labels 2024-01-04 11:44:44 +01:00
Philipp Oeser self-assigned this 2024-01-04 11:44:50 +01:00
Member

@Yonatan-Bary : I made a PR implementing this, see !116782

There will also be be builds to test this (see link in the PR), testing this out would be highly appreciated, thx in advance!

@Yonatan-Bary : I made a PR implementing this, see !116782 There will also be be builds to test this (see link in the PR), testing this out would be highly appreciated, thx in advance!
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2024-01-04 17:49:44 +01:00
Member

@Yonatan-Bary : committed 5412bd48a9

So you should be able to verify it works in tomorrows 4.1 build from https://builder.blender.org/download/daily/

@Yonatan-Bary : committed 5412bd48a9ef7395b0841906200c028f05994f03 So you should be able to verify it works in tomorrows 4.1 build from https://builder.blender.org/download/daily/
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#116375
No description provided.