Cannot set camera fovy in sg file
Closed this issue · 2 comments
When I try to specify camera fovy
in sg file, the given value is not taken into account in ospStudio.
The simple file attached below illustrates the issue. It contains only a camera and a light (sunsky). In the camera definition, fovy
is set to 90. But in ospStudio, its value remains 60 (default value, presumably).
Project.zip
Could you please tell me what is wrong? Thanks!
Hi, I don't have a solution for you just yet, but I have been spending some time getting to know your FreeCAD-render
interface layer to have a better understanding of the big picture.
At present, the .sg file itself doesn't contain everything you are looking for. Currently, the extra camera information is intended for glTF type cameras - embedded in the scene hierarchy. This is just temporary, as we need to place more into the default camera itself - as you attempted.
A workaround for you would be to generate a glTF camera - as you do for the imagelight - and reference that as the default camera. I'll see if I can quickly create an simple example for you.
Oh, btw, the HDRI (imagelight) can exist completely in the .sg file now - no glTF temp file necessary. That line in JSONDefs.h refers to the textures attached to materials. If you're able to create/save a scene in the UI with an HDRI, you can see how that is specified. If not, I can probably help out there, soon-ish.
(Can we have a conversation outside the scope of this issue and talk about the entire OSPRay/FreeCAD-render
integration? I have some ideas here.)
Hello,
Thank you for your answer!
A workaround for you would be to generate a glTF camera
Oh yes, good trick! I'll see what I can do with that.
Oh, btw, the HDRI (imagelight) can exist completely in the .sg file now - no glTF temp file necessary.
Yes, I had noticed this evolution. However, the glTF works fine, so reintegrate it in the sg is in low priority for me...