Closed ioissss closed 5 months ago
I visualized the intersection of bsdf.eval() value, found that the problem appeared in the bsdf value of the evaluation, each intersection at the evaluation of the bsdf value after visualization is as follows: I don't know why I'm getting this error, is there something wrong with the emitter_sample.d ? I've always assumed that emitter_sample.d is pointing from the intersection point to the light source and is located in the world coordinate system, the code is """ bsdf = si.bsdf() emitter_sample,emitter_weight = scene.sample_emitter_direction(si,sampler.next_2d(),test_visibility=True,active=active)
L += emitter_weight*bsdf.eval(mi.BSDFContext(),si,emitter_sample.d) """
When opening an issue please follow the pre-filled template :warning:
I'll move this to a discussion thread for now, it seems more appropriate.
I'm writing my own Integrator, inheriting from mitsuba.SamplingIntegrator, rewriting the sample(self,scene,sampler,ray,medium=None,active=True) function in it, and my sample() function is as follows:
Running this code, I get the following results: There's a big part that's black.
I checked the running result of ’bsdf.eval(ctx,si,emitter_sample.d)‘ and found that most of them are (0.0, 0.0, 0.0), print(bsdf) can be found that there are many of them are None. the scenario that I used is the tutorial cbox.xml. I didn't find any examples related to rewriting Integrator in the tutorials, where can I find such examples, the API documentation describes it very briefly, where can I find examples of usage of related functions