How to create camera HDA?

   1733   10   2
User Avatar
Member
3 posts
Joined: March 2019
Offline
I would like to know how to create an HDA that plays a role on a scene like a camera (light/null).
I can't find where to set the Object Type in the Create Digital Asset section.
How should I define it for my own HDA?

Thanks.
User Avatar
Member
38 posts
Joined: June 2019
Offline
I don't understand clearly, if you want to create an hda from a camera, create it from the camera as any other object you would create a HDA from...
User Avatar
Member
3 posts
Joined: March 2019
Offline
frBorges34
I don't understand clearly, if you want to create an hda from a camera, create it from the camera as any other object you would create a HDA from...
thank you. However, creating an HDA directly from a camera object simply replaces the contents of the camera object with the geometry type, making it invisible to the viewport as a camera.
I want to create an HDA as a camera that can also be reflected in the viewport.

Attachments:
test.png (87.7 KB)

User Avatar
Member
130 posts
Joined: Jan. 2015
Offline
Create a hda from a subnet containing the camera nodes instead.

From the picture it seems only the viewport icon of a camera is inside the geometry node.
Edited by Heileif - Feb. 7, 2023 20:59:07
User Avatar
Member
8575 posts
Joined: July 2007
Online
you have 2 options:
1. you either create HDA from object level Subnet containing a camera, in that case you will need to:
- in Type Properties.../Node set Representative Noe to your internal camera (like: cam1), so that HDA know it should be of Camera type and show in the viewport
- select your internal camera (testCamHDA/cam1) and add new Render Property called Show In Viewport MEnu (soho_viewport_menu) and leave it off, this will hide that internal cam from the menu and leaves only your asset in there
this way you can contain more objects inside if needed for setup (Stereo Cam Rig is done this way)

2. you can also create new camera type HDA from File/New Asset... menu
this will be pure camera type containing SOP net for camera shape

Attachments:
create_new_camera_hda.gif (262.9 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
3 posts
Joined: March 2019
Offline
tamte
you have 2 options:
1. you either create HDA from object level Subnet containing a camera, in that case you will need to:
- in Type Properties.../Node set Representative Noe to your internal camera (like: cam1), so that HDA know it should be of Camera type and show in the viewport
- select your internal camera (testCamHDA/cam1) and add new Render Property called Show In Viewport MEnu (soho_viewport_menu) and leave it off, this will hide that internal cam from the menu and leaves only your asset in there
this way you can contain more objects inside if needed for setup (Stereo Cam Rig is done this way)

2. you can also create new camera type HDA from File/New Asset... menu
this will be pure camera type containing SOP net for camera shape
Image Not Found
really good!
I knew about method 1, but I had never seen method 2! it is complete. thank you! !
User Avatar
Member
8575 posts
Joined: July 2007
Online
AMATERAS
but I had never seen method 2
its pretty hidden in there, it's a very old way to create HDAs, but I guess it would be helpful to move it to newer Assets menu so that it's more discoverable (submitted as RFE#126897)
Edited by tamte - Feb. 8, 2023 01:09:02
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
4 posts
Joined: May 2015
Offline
Hey Tomas! Long time no see, hope you're well

I just found this discussion because I'm working on creating a custom camera node. I've tried both of the methods you described, but in the second method, the new "camera" just seems to be an empty object that has a camera icon. There aren't any of the usual camera parameters and none of the nodes you'd expect to find inside:



... so I'm probably better off starting with a vanilla camera and making my HDA from that.

In both cases, however, there doesn't appear to be any way to set up expressions or otherwise set camera parameters (like transforms) with the Edit Operator Type Properties window: all the parameters are greyed out:



I guess this is because these are part of an internally defined node. That being the case, what is the best way to add expressions to these parameters? Use an onCreated Python script?

Any advice gratefully received,

Niall

Attachments:
testcam.png (27.1 KB)
2023-03-03 16_28_47-Edit Operator Type Properties.png (64.0 KB)

User Avatar
Member
8575 posts
Joined: July 2007
Online
Hi Niall, nice to see you around here

niallflinn
There aren't any of the usual camera parameters and none of the nodes you'd expect to find inside:
... so I'm probably better off starting with a vanilla camera and making my HDA from that.
you can open Type Properties of Stereo Camera Object, copy View and Sampling Tabs and paste to parms of your new camera HDA to get all relevant properties and not have to create them by hand


niallflinn
In both cases, however, there doesn't appear to be any way to set up expressions or otherwise set camera parameters (like transforms) with the Edit Operator Type Properties window: all the parameters are greyed out:
I guess this is because these are part of an internally defined node. That being the case, what is the best way to add expressions to these parameters? Use an onCreated Python script?
this is the case of all Object Level nodes so yes, its pretty inconvenient and OnCreated may be the way to go
or you can hide them and use your own differently named parms, which may be more relevant if your camera is made from HDA and contains the actual camera inside with proper transforms that can be linked to your parms
Edited by tamte - March 4, 2023 11:35:45
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
4 posts
Joined: May 2015
Offline
Thanks for the tips, Tomas!

I'll see where the OnCreated route gets me, because I'd like to have the camera itself be a standard camera, just with some internal stuff driving the transforms and other parms. That way artists adding it to their ROPs, etc can just grab it straight from /obj without having to dive down another level to find the "real" camera.

Niall
User Avatar
Member
8575 posts
Joined: July 2007
Online
then I'd probably explore doing camera from subnet with internal camera as a representative node and hidden from viewport (1.)

since then you can really just hide the parms on the HDA and create your own that tie to the internal rig driving the real camera

the only problem may be that the Object level HDA output by default passes first input transform through
If you want it to pass the final transform of your internal camera, you may still need to have OnCreated Script to change Output Transform (outputobj) parameter on top of the HDA even if it's hidden, since that's the one that defines which transform is output
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links