forked from blender/blender
Support more AOVs #78
No reviewers
Labels
No Label
No Milestone
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: BogdanNagirniak/blender#78
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "DagerD/blender:BLEN-462_3"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Purpose
Support more AOVs
Technical steps
Python:
def update_render_passes
in base class (Must be overridden in child classes)C++:
Note for reviewers
Use with:
HdRPR: https://github.com/bnagirniak/RPRHydraRenderBlenderAddon/pull/22/files
HdStorm: BogdanNagirniak/blender-addons#23
@ -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 toEngine::RenderSettings
and should be set viaset_render_setting
@ -52,0 +61,4 @@
if (aov_token) {
render_task_delegate_->add_aov(*aov_token);
}
}
With GPU context, depth AOV should be added anyway.
@ -24,2 +25,2 @@
pxr::HdTaskSharedPtr task();
bool is_converged();
pxr::HdTaskSharedPtr render_task();
bool is_converged(pxr::HdTaskSharedPtr task);
revert
task()
, setis_converged
without parameters@ -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.
@ -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@ -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
@ -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
@ -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.
Yes. Storm doesn't work with
GPU_DEPTH32F_STENCIL8
(also triedpxr::HdAovTokens->depthStensil
).@ -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_
Tested - works good