Support more AOVs #78

Merged
Bogdan Nagirniak merged 11 commits from DagerD/blender:BLEN-462_3 into hydra-render 2023-07-29 14:45:16 +02:00
Collaborator

Purpose

Support more AOVs

Technical steps

Python:

  • added empty def update_render_passes in base class (Must be overridden in child classes)

C++:

  • improved code to utilize supported AOVs
  • Added logging to tasks

Note for reviewers

Use with:
HdRPR: https://github.com/bnagirniak/RPRHydraRenderBlenderAddon/pull/22/files
HdStorm: BogdanNagirniak/blender-addons#23

### Purpose Support more AOVs ### Technical steps Python: * added empty `def update_render_passes` in base class (Must be overridden in child classes) C++: * improved code to utilize supported AOVs * Added logging to tasks ### Note for reviewers Use with: HdRPR: https://github.com/bnagirniak/RPRHydraRenderBlenderAddon/pull/22/files HdStorm: BogdanNagirniak/blender-addons#23
Georgiy Markelov added 4 commits 2023-07-26 10:28:00 +02:00
Brian Savery (AMD) was assigned by Georgiy Markelov 2023-07-26 10:28:17 +02:00
Georgiy Markelov self-assigned this 2023-07-26 10:28:17 +02:00
Bogdan Nagirniak was assigned by Georgiy Markelov 2023-07-26 10:28:18 +02:00
Vasyl Pidhirskyi was assigned by Georgiy Markelov 2023-07-26 10:28:18 +02:00
Georgiy Markelov requested review from Brian Savery (AMD) 2023-07-26 10:28:25 +02:00
Georgiy Markelov requested review from Vasyl Pidhirskyi 2023-07-26 10:28:25 +02:00
Bogdan Nagirniak requested changes 2023-07-26 13:41:45 +02:00
@ -49,3 +51,2 @@
render_task_delegate_->add_aov(pxr::HdAovTokens->color);
render_task_delegate_->add_aov(pxr::HdAovTokens->depth);
aovs_map_.add_new("Combined", pxr::HdAovTokens->color);

aovs_map should be moved to Engine::RenderSettings and should be set via set_render_setting

`aovs_map` should be moved to `Engine::RenderSettings` and should be set via `set_render_setting`
DagerD marked this conversation as resolved
@ -52,0 +61,4 @@
if (aov_token) {
render_task_delegate_->add_aov(*aov_token);
}
}

With GPU context, depth AOV should be added anyway.

With GPU context, depth AOV should be added anyway.
DagerD marked this conversation as resolved
@ -24,2 +25,2 @@
pxr::HdTaskSharedPtr task();
bool is_converged();
pxr::HdTaskSharedPtr render_task();
bool is_converged(pxr::HdTaskSharedPtr task);

revert task(), set is_converged without parameters

revert `task()`, set `is_converged` without parameters

revert task(), set is_converged virtual and without parameters

> revert `task()`, set `is_converged` virtual and without parameters
DagerD marked this conversation as resolved
@ -47,0 +49,4 @@
/* Delegate methods */
pxr::VtValue Get(pxr::SdfPath const &id, pxr::TfToken const &key) override;
pxr::HdTaskSharedPtr aov_task();

Looks like aov_task doesn't need.

Looks like aov_task doesn't need.
DagerD marked this conversation as resolved
Georgiy Markelov added 1 commit 2023-07-26 19:47:01 +02:00
Brian Savery (AMD) approved these changes 2023-07-27 19:52:21 +02:00
Bogdan Nagirniak requested changes 2023-07-28 12:31:12 +02:00
@ -30,7 +30,12 @@ class CustomHydraRenderEngine(HydraRenderEngine):
return {
'enableTinyPrimCulling': True,
'maxLights': 8,
'aov:Depth': "depth",

better use prefix aovToken:Depth. Move this example to corresponded place

better use prefix `aovToken:Depth`. Move this example to corresponded place
DagerD marked this conversation as resolved
@ -115,3 +113,3 @@
void Engine::set_render_setting(const std::string &key, const pxr::VtValue &val)
{
render_delegate_->SetRenderSetting(pxr::TfToken(key), val);
if (key._Starts_with("aov:")) {

use STRPREFIX

use `STRPREFIX`
DagerD marked this conversation as resolved
@ -55,6 +55,7 @@ class Engine {
std::unique_ptr<BlenderSceneDelegate> hydra_scene_delegate_;
std::unique_ptr<USDSceneDelegate> usd_scene_delegate_;
RenderDelegateSettings render_delegate_settings_;

Move to internal struct Engine::RenderSettings

Move to internal struct `Engine::RenderSettings`
DagerD marked this conversation as resolved
@ -173,3 +192,3 @@
}
else if (aov_key == pxr::HdAovTokens->depth) {
format = GPU_DEPTH32F_STENCIL8;
format = GPU_DEPTH_COMPONENT32F;

Do we really need to change format? Stencil could be used for shadows in future.

Do we really need to change format? Stencil could be used for shadows in future.
Author
Collaborator

Yes. Storm doesn't work with GPU_DEPTH32F_STENCIL8 (also tried pxr::HdAovTokens->depthStensil).

Yes. Storm doesn't work with `GPU_DEPTH32F_STENCIL8` (also tried `pxr::HdAovTokens->depthStensil`).
DagerD marked this conversation as resolved
@ -37,2 +38,2 @@
pxr::SdfPath task_id_;
pxr::HdxRenderTaskParams task_params_;
pxr::SdfPath render_task_id_;
pxr::HdxRenderTaskParams render_task_params_;

rename back task_id_, task_params_

rename back `task_id_`, `task_params_`
DagerD marked this conversation as resolved
Georgiy Markelov added 1 commit 2023-07-28 14:15:57 +02:00
Georgiy Markelov added 4 commits 2023-07-28 15:06:39 +02:00
Bogdan Nagirniak added 1 commit 2023-07-29 13:25:17 +02:00
Bogdan Nagirniak approved these changes 2023-07-29 14:41:42 +02:00
Bogdan Nagirniak left a comment
Owner

Tested - works good

Tested - works good
Bogdan Nagirniak merged commit c65880ad3f into hydra-render 2023-07-29 14:45:16 +02:00
Bogdan Nagirniak referenced this issue from a commit 2023-07-29 14:45:17 +02:00
Sign in to join this conversation.
No Label
No Milestone
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: BogdanNagirniak/blender#78
No description provided.