Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Houdini local render support #328

Merged
merged 62 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
941e80d
Use a general family for houdini farm rendering
MustafaJafar Mar 29, 2024
37cecde
add few keywords related to Houdini
MustafaJafar Mar 29, 2024
71bf189
make codespell happy about integrate.py
MustafaJafar Mar 29, 2024
6205383
support local rendering for mantra_rop and add dedicated plugins
MustafaJafar Mar 29, 2024
b35bc8c
remove redundant code
MustafaJafar Mar 29, 2024
068b9c3
support local rendering for karma_rop
MustafaJafar Mar 29, 2024
5dd571d
algin file name to class name
MustafaJafar Mar 29, 2024
e8907b0
add parm to cspell ignore list
MustafaJafar Mar 29, 2024
313a7a2
support local rendering for redshift_rop
MustafaJafar Mar 29, 2024
2228279
refactor 'export_job' variable name into 'split_render'
MustafaJafar Mar 29, 2024
0ba5fee
support local rendering for arnold_rop
MustafaJafar Mar 29, 2024
c7e0821
support local rendering for vray_rop
MustafaJafar Mar 29, 2024
bcb1c2a
Use render targets in a similar fashion to Nuke + set houdini parms a…
MustafaJafar Apr 2, 2024
bca10c7
remove unnecessary validator
MustafaJafar Apr 2, 2024
4a5f0eb
set rsnode parms according to render target value before collecting e…
MustafaJafar Apr 2, 2024
7f70358
remove targets class attribute.
MustafaJafar Apr 4, 2024
4e6bd3d
remove the un-necessary 'render.farm.hou' intermidate family
MustafaJafar Apr 4, 2024
05bdbb2
Abort publishing if there are missing frames.
MustafaJafar Apr 4, 2024
bc1c459
Merge branch 'enhancement/AY-1009_Houdini-Local-Rendering' of https:/…
MustafaJafar Apr 4, 2024
fe6c1fc
remove targets class attribute.
MustafaJafar Apr 4, 2024
a6ca148
Houdini local render: support single frame
MustafaJafar Apr 8, 2024
d7b1f3a
Houdini local render: support adding review family to the render
MustafaJafar Apr 8, 2024
f5cb437
Merge pull request #381 from ynput/enhancement/support-adding-review-…
moonyuet Apr 8, 2024
4c0691a
Merge branch 'develop' into enhancement/AY-1009_Houdini-Local-Rendering
MustafaJafar Apr 9, 2024
c5df561
Transfer settings from pre create to instance
moonyuet Apr 9, 2024
76e4b77
transfer all precreate settings to instance
MustafaJafar Apr 9, 2024
a894a9a
Merge pull request #385 from ynput/enhancement/transfer_render_target…
MustafaJafar Apr 9, 2024
90e2c1f
use get_product_name instead of hardcoded productname
MustafaJafar Apr 9, 2024
95757c6
add doc string to _get_camera_path
MustafaJafar Apr 9, 2024
75879f5
revert changes
MustafaJafar Apr 9, 2024
6151ff5
skip submission if farm is disabled
MustafaJafar Apr 9, 2024
c49c901
add a TODO about enhancing code readability
MustafaJafar Apr 9, 2024
3b6c3bb
remove redundant attr_defs
MustafaJafar Apr 9, 2024
935bbc5
Merge branch 'develop' into enhancement/AY-1009_Houdini-Local-Rendering
MustafaJafar Apr 15, 2024
bedebd8
add 'Mark as reviewable' todo
MustafaJafar Apr 15, 2024
16c8c85
update a comment
MustafaJafar Apr 15, 2024
6ef55ad
add missing key
MustafaJafar Apr 15, 2024
409c243
update node parameter in the extractor instead of the collector
MustafaJafar Apr 15, 2024
722d72c
Merge branch 'develop' into enhancement/AY-1009_Houdini-Local-Rendering
MustafaJafar Apr 16, 2024
ca3f391
add review support on farm render
MustafaJafar Apr 16, 2024
1ddf28c
add missing key
MustafaJafar Apr 16, 2024
205fc0e
add review support on local render
MustafaJafar Apr 16, 2024
65c103d
Merge branch 'develop' into enhancement/AY-1009_Houdini-Local-Rendering
MustafaJafar Apr 17, 2024
d7d91b6
add settings for CollectLocalRenderInstances
MustafaJafar Apr 17, 2024
885cfcb
apply aov_filter in Houdini local render
MustafaJafar Apr 17, 2024
60468e4
enhance the readability of checking missing frames in expectedFiles
MustafaJafar Apr 19, 2024
4a182b6
Merge branch 'develop' into enhancement/AY-1009_Houdini-Local-Rendering
MustafaJafar Apr 23, 2024
6e548a8
expose 'render_target' and 'review' creator attributes in publish tab…
MustafaJafar Apr 23, 2024
74fe21a
revert changes - add only 'multipartExr' flag
MustafaJafar Apr 23, 2024
effedd8
fix bug with aov_filter
MustafaJafar Apr 23, 2024
47b27ce
use 'creator_attributes' as the source of truth - use extract render …
MustafaJafar Apr 23, 2024
e04c928
add a TODO about running plugins over wrong isntances
MustafaJafar Apr 23, 2024
9aa82ce
Merge branch 'develop' into enhancement/AY-1009_Houdini-Local-Rendering
MustafaJafar Apr 25, 2024
8110a60
add CollectLocalRenderInstances setting
MustafaJafar Apr 25, 2024
f9149ba
Merge branch 'develop' into enhancement/AY-1009_Houdini-Local-Rendering
MustafaJafar Apr 29, 2024
767bbf0
add CollectLocalRenderInstances setting
MustafaJafar Apr 29, 2024
f9dce63
Merge branch 'develop' into enhancement/AY-1009_Houdini-Local-Rendering
MustafaJafar May 2, 2024
edc6125
Merge branch 'develop' into enhancement/AY-1009_Houdini-Local-Rendering
antirotor May 9, 2024
8834491
Merge branch 'develop' into enhancement/AY-1009_Houdini-Local-Rendering
antirotor May 9, 2024
4deeb5c
Merge branch 'develop' into enhancement/AY-1009_Houdini-Local-Rendering
MustafaJafar May 10, 2024
fd18973
Merge branch 'develop' into enhancement/AY-1009_Houdini-Local-Rendering
MustafaJafar May 13, 2024
6b9975b
Merge branch 'enhancement/AY-1009_Houdini-Local-Rendering' of https:/…
MustafaJafar May 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 37 additions & 15 deletions client/ayon_core/hosts/houdini/plugins/create/create_arnold_rop.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,24 @@ class CreateArnoldRop(plugin.HoudiniCreator):
# Default extension
ext = "exr"

# Default to split export and render jobs
export_job = True
# Default render target
render_target = "farm_split"

def create(self, product_name, instance_data, pre_create_data):
import hou
# Transfer settings from pre create to instance
creator_attributes = instance_data.setdefault(
"creator_attributes", dict())
for key in ["render_target", "review"]:
if key in pre_create_data:
creator_attributes[key] = pre_create_data[key]

# Remove the active, we are checking the bypass flag of the nodes
instance_data.pop("active", None)
instance_data.update({"node_type": "arnold"})

# Add chunk size attribute
instance_data["chunkSize"] = 1
# Submit for job publishing
instance_data["farm"] = pre_create_data.get("farm")

instance = super(CreateArnoldRop, self).create(
product_name,
Expand All @@ -51,7 +55,7 @@ def create(self, product_name, instance_data, pre_create_data):
"ar_exr_half_precision": 1 # half precision
}

if pre_create_data.get("export_job"):
if pre_create_data.get("render_target") == "farm_split":
ass_filepath = \
"{export_dir}{product_name}/{product_name}.$F4.ass".format(
export_dir=hou.text.expandString("$HIP/pyblish/ass/"),
Expand All @@ -66,23 +70,41 @@ def create(self, product_name, instance_data, pre_create_data):
to_lock = ["productType", "id"]
self.lock_parameters(instance_node, to_lock)

def get_pre_create_attr_defs(self):
attrs = super(CreateArnoldRop, self).get_pre_create_attr_defs()
def get_instance_attr_defs(self):
"""get instance attribute definitions.

Attributes defined in this method are exposed in
publish tab in the publisher UI.
"""

render_target_items = {
"local": "Local machine rendering",
"local_no_render": "Use existing frames (local)",
"farm": "Farm Rendering",
"farm_split": "Farm Rendering - Split export & render jobs",
}

return [
BoolDef("review",
label="Review",
tooltip="Mark as reviewable",
default=True),
EnumDef("render_target",
items=render_target_items,
label="Render target",
default=self.render_target),
]

def get_pre_create_attr_defs(self):
image_format_enum = [
"bmp", "cin", "exr", "jpg", "pic", "pic.gz", "png",
"rad", "rat", "rta", "sgi", "tga", "tif",
]

return attrs + [
BoolDef("farm",
label="Submitting to Farm",
default=True),
BoolDef("export_job",
label="Split export and render jobs",
default=self.export_job),
attrs = [
EnumDef("image_format",
image_format_enum,
default=self.ext,
label="Image Format Options")
label="Image Format Options"),
]
return attrs + self.get_instance_attr_defs()
49 changes: 40 additions & 9 deletions client/ayon_core/hosts/houdini/plugins/create/create_karma_rop.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,23 @@ class CreateKarmaROP(plugin.HoudiniCreator):
product_type = "karma_rop"
icon = "magic"

# Default render target
render_target = "farm"

def create(self, product_name, instance_data, pre_create_data):
import hou # noqa
# Transfer settings from pre create to instance
creator_attributes = instance_data.setdefault(
"creator_attributes", dict())

for key in ["render_target", "review"]:
if key in pre_create_data:
creator_attributes[key] = pre_create_data[key]

instance_data.pop("active", None)
instance_data.update({"node_type": "karma"})
# Add chunk size attribute
instance_data["chunkSize"] = 10
# Submit for job publishing
instance_data["farm"] = pre_create_data.get("farm")

instance = super(CreateKarmaROP, self).create(
product_name,
Expand Down Expand Up @@ -86,18 +94,40 @@ def create(self, product_name, instance_data, pre_create_data):
to_lock = ["productType", "id"]
self.lock_parameters(instance_node, to_lock)

def get_pre_create_attr_defs(self):
attrs = super(CreateKarmaROP, self).get_pre_create_attr_defs()
def get_instance_attr_defs(self):
"""get instance attribute definitions.

Attributes defined in this method are exposed in
publish tab in the publisher UI.
"""

render_target_items = {
"local": "Local machine rendering",
"local_no_render": "Use existing frames (local)",
"farm": "Farm Rendering",
}

return [
BoolDef("review",
label="Review",
tooltip="Mark as reviewable",
default=True),
EnumDef("render_target",
items=render_target_items,
label="Render target",
default=self.render_target)
]


def get_pre_create_attr_defs(self):
image_format_enum = [
"bmp", "cin", "exr", "jpg", "pic", "pic.gz", "png",
"rad", "rat", "rta", "sgi", "tga", "tif",
]

return attrs + [
BoolDef("farm",
label="Submitting to Farm",
default=True),
attrs = super(CreateKarmaROP, self).get_pre_create_attr_defs()

attrs += [
EnumDef("image_format",
image_format_enum,
default="exr",
Expand All @@ -112,5 +142,6 @@ def get_pre_create_attr_defs(self):
decimals=0),
BoolDef("cam_res",
label="Camera Resolution",
default=False)
default=False),
]
return attrs + self.get_instance_attr_defs()
54 changes: 39 additions & 15 deletions client/ayon_core/hosts/houdini/plugins/create/create_mantra_rop.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,22 @@ class CreateMantraROP(plugin.HoudiniCreator):
product_type = "mantra_rop"
icon = "magic"

# Default to split export and render jobs
export_job = True
# Default render target
render_target = "farm_split"

def create(self, product_name, instance_data, pre_create_data):
import hou # noqa
# Transfer settings from pre create to instance
creator_attributes = instance_data.setdefault(
"creator_attributes", dict())
for key in ["render_target", "review"]:
if key in pre_create_data:
creator_attributes[key] = pre_create_data[key]

instance_data.pop("active", None)
instance_data.update({"node_type": "ifd"})
# Add chunk size attribute
instance_data["chunkSize"] = 10
# Submit for job publishing
instance_data["farm"] = pre_create_data.get("farm")

instance = super(CreateMantraROP, self).create(
product_name,
Expand All @@ -46,7 +50,7 @@ def create(self, product_name, instance_data, pre_create_data):
"vm_picture": filepath,
}

if pre_create_data.get("export_job"):
if pre_create_data.get("render_target") == "farm_split":
ifd_filepath = \
"{export_dir}{product_name}/{product_name}.$F4.ifd".format(
export_dir=hou.text.expandString("$HIP/pyblish/ifd/"),
Expand Down Expand Up @@ -77,21 +81,40 @@ def create(self, product_name, instance_data, pre_create_data):
to_lock = ["productType", "id"]
self.lock_parameters(instance_node, to_lock)

def get_pre_create_attr_defs(self):
attrs = super(CreateMantraROP, self).get_pre_create_attr_defs()
def get_instance_attr_defs(self):
"""get instance attribute definitions.

Attributes defined in this method are exposed in
publish tab in the publisher UI.
"""

render_target_items = {
"local": "Local machine rendering",
"local_no_render": "Use existing frames (local)",
"farm": "Farm Rendering",
"farm_split": "Farm Rendering - Split export & render jobs",
}

return [
BoolDef("review",
label="Review",
tooltip="Mark as reviewable",
default=True),
EnumDef("render_target",
items=render_target_items,
label="Render target",
default=self.render_target)
]

def get_pre_create_attr_defs(self):
image_format_enum = [
"bmp", "cin", "exr", "jpg", "pic", "pic.gz", "png",
"rad", "rat", "rta", "sgi", "tga", "tif",
]

return attrs + [
BoolDef("farm",
label="Submitting to Farm",
default=True),
BoolDef("export_job",
label="Split export and render jobs",
default=self.export_job),
attrs = super(CreateMantraROP, self).get_pre_create_attr_defs()

attrs += [
EnumDef("image_format",
image_format_enum,
default="exr",
Expand All @@ -100,5 +123,6 @@ def get_pre_create_attr_defs(self):
label="Override Camera Resolution",
tooltip="Override the current camera "
"resolution, recommended for IPR.",
default=False)
default=False),
]
return attrs + self.get_instance_attr_defs()
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,21 @@ class CreateRedshiftROP(plugin.HoudiniCreator):
ext = "exr"
multi_layered_mode = "No Multi-Layered EXR File"

# Default to split export and render jobs
split_render = True
# Default render target
render_target = "farm_split"

def create(self, product_name, instance_data, pre_create_data):
# Transfer settings from pre create to instance
creator_attributes = instance_data.setdefault(
"creator_attributes", dict())
for key in ["render_target", "review"]:
if key in pre_create_data:
creator_attributes[key] = pre_create_data[key]

instance_data.pop("active", None)
instance_data.update({"node_type": "Redshift_ROP"})
# Add chunk size attribute
instance_data["chunkSize"] = 10
# Submit for job publishing
instance_data["farm"] = pre_create_data.get("farm")

instance = super(CreateRedshiftROP, self).create(
product_name,
Expand Down Expand Up @@ -99,7 +103,7 @@ def create(self, product_name, instance_data, pre_create_data):
rs_filepath = f"{export_dir}{product_name}/{product_name}.$F4.rs"
parms["RS_archive_file"] = rs_filepath

if pre_create_data.get("split_render", self.split_render):
if pre_create_data.get("render_target") == "farm_split":
parms["RS_archive_enable"] = 1

instance_node.setParms(parms)
Expand All @@ -118,30 +122,51 @@ def remove_instances(self, instances):

return super(CreateRedshiftROP, self).remove_instances(instances)

def get_instance_attr_defs(self):
"""get instance attribute definitions.

Attributes defined in this method are exposed in
publish tab in the publisher UI.
"""

render_target_items = {
"local": "Local machine rendering",
"local_no_render": "Use existing frames (local)",
"farm": "Farm Rendering",
"farm_split": "Farm Rendering - Split export & render jobs",
}

return [
BoolDef("review",
label="Review",
tooltip="Mark as reviewable",
default=True),
EnumDef("render_target",
items=render_target_items,
label="Render target",
default=self.render_target)
]

def get_pre_create_attr_defs(self):
attrs = super(CreateRedshiftROP, self).get_pre_create_attr_defs()

image_format_enum = [
"exr", "tif", "jpg", "png",
]

multi_layered_mode = [
"No Multi-Layered EXR File",
"Full Multi-Layered EXR File"
]


return attrs + [
BoolDef("farm",
label="Submitting to Farm",
default=True),
BoolDef("split_render",
label="Split export and render jobs",
default=self.split_render),
attrs = super(CreateRedshiftROP, self).get_pre_create_attr_defs()
attrs += [
EnumDef("image_format",
image_format_enum,
default=self.ext,
label="Image Format Options"),
EnumDef("multi_layered_mode",
multi_layered_mode,
default=self.multi_layered_mode,
label="Multi-Layered EXR")
label="Multi-Layered EXR"),
]
return attrs + self.get_instance_attr_defs()
Loading