Skip to content
Discussion options

You must be logged in to vote

Following up on the discussion, in case it’s useful to someone, the final piece of code I ended up with doesn’t fully answer the original question, but it goes a step further for my specific use case. It handles transparency by accumulating the albedo color at each intersection.

// modified version of aov.cpp
SurfaceInteraction3f si;
BSDFPtr bsdf;
Color3f final_albedo(0.f);
Float throughput          = 1.f;
RayDifferential3f cur_ray = ray;
int max_iter              = 5;
std::string attr          = "opacity";

// If the intersected surface has a bsdf with an opacity attribute:
//      - Accumulate the albedo contribution based on transparency
//      - Spawn a new ray to continue sampling d…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@vinlo
Comment options

Answer selected by vinlo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants