Open TontonTremblay opened 3 years ago
Have you tried specifying a common seed for both of these functions?
Understanding the depth returned by render_data
He didn't specify a seed, but according to the documentation (and in the header include/nvisii/nvisii.h
it should be 0
for both cases.
However, when you look at the renderDataToFile
implementation in src/nvisii/nvisii.cpp
, you see that the seed which is passed into renderDataToFile
is not passed on to renderData
. That could lead to issues in the future.
Given that @TontonTremblay is doing two sequential calls to renderData
and my findings in #125 where the results depend on the order of calling these functions. Could these two issue be related?
good catch, could be related yeah. That seed should definitely be forwarded in that function.
@Neburski do you think you could open a pull request that fixes this seed bug?
@natevm
Hi, I have followed your discussions, and found I have the same issue as @TontonTremblay, after using the methodsegmentation_array = nvisii.render_data
, the max and min of segmentation_array are always zero. I have tried to add seed
argument, however, it shows the same results as zero.
But when I tried the suggestion of coloring the segmentation image presented by @TontonTremblay in the Issue. #149 , it works, It can generate the segmentation map correctly. But I have to use the method nvisii.render_data_to_file
to save the seg.exr file locally.
Could you please tell me how to solve the issues of zero outputs of the segmentation_array without saving the additional seg.exr file? I want to check where there are objects and where there are not, so that I can generate random positions of objects without collisions. Thanks in advance!
Best Regards, Cai
I have loaded a scene from an obj with about 217 entities. There is a discrempency between render_data vs. render_data_to_file. He is a snippet of code and its output.
output: