Hi. I am working a tool for artists and to make it cleaner I am hopping to have a objnet responsible for the render aspect of the tool inside the hda itself. We were using the opengl render node, but I would need to move away from that so that I can have a solution working on blades without gpus. I am wondering how I could get the same render working with mantra if it doesn't have the "scenepath" parameter. The scene path parameter is the only reason we managed what we were doing with the opengl node as I understand it.
If any knows of a way to render with mantra flipbook like sequence that would also interest me. My main issue stays the fact that it is hard to render through sub levels of objnet. I know the same issue can rise when rendering with arnold, but usually doing the rop net and geometry network inside the same objnet made it work just like the opengl render node.
The scene is attached. Any help is welcomed.
Rendering issues with mantra through a objnet node
1062 5 1- jgoulet
- Member
- 13 posts
- Joined: Feb. 2016
- Offline
- tamte
- Member
- 8518 posts
- Joined: July 2007
- Online
- jgoulet
- Member
- 13 posts
- Joined: Feb. 2016
- Offline
Nice. I can work with that. Do you know if there is an easy way to make an object reference like object merge in sop but for obj for the camera? I will work on putting expressions on a dummy camera to match all attributes of the target camera but ideally I think having a reference could be better.
Thank you.
Thank you.
- tamte
- Member
- 8518 posts
- Joined: July 2007
- Online
jgouletI'd use chops for that, you can get cameras world transform using Object Chop and all parameter values you need using Fetch Chop, then just merge them and export to your embedded camera
to match all attributes of the target camera but ideally I think having a reference could be better.
Edited by tamte - Oct. 20, 2021 11:39:10
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- jgoulet
- Member
- 13 posts
- Joined: Feb. 2016
- Offline
- jgoulet
- Member
- 13 posts
- Joined: Feb. 2016
- Offline
I used this little python script to help attach the parms of the dummy camera to the real one, if someone needs it later.
camera = hou.pwd().node("../dummy_camera") # cam parm to target is the sop path parm that users use to target a camera targetCamParm = hou.pwd().node("../../camParmToTarget") hScript_template = 'ch(chsop("../../camParmToTarget") + "/{}")' skip_types = [hou.parmTemplateType.Folder, hou.parmTemplateType.FolderSet, hou.parmTemplateType.Separator, hou.parmTemplateType.Label] # with this I am probably loosing the support for a lookat setup, but they cause problems when I hook them up with # an expression even if they aren't in use. skip_parms = ['constraint_path', 'lookatpath', 'lookupobjpath', 'pathobjpath', 'vm_lensshader'] for parm in camera.parms(): if parm.parmTemplate().type() in skip_types or parm.name() in skip_parms: continue parm.setExpression(hScript_template.format(parm.name()), hou.exprLanguage.Hscript, replace_expression=True)
Edited by jgoulet - Oct. 21, 2021 16:45:36
-
- Quick Links