I have one issue when rendering 3D world positions with blender. It is not working for objects, which share same mesh.
On the scheme below, you can see how scene is made.
Be careful: I did mistake when drawing coordinates near quads. I wrote them accidently not as (x,y,z), but as (y,x,z).
Test scene consists of 4 objects, which share one mesh. We know exact positions of the quads in world coordinate system. We should observe those positions when rendering current positions.
Rendered images have (r,g,b,a) channels filled with (x,y,z,id) values.
(x,y,z) is world position of the point on the surface. Id is an id of the object.
There are 2 frames, in second frame last object moves by one to the right. SVM machine is used, but for OSL results are the same.
Rendered values from .exr files:
Object 1: (from scheme above left upper corner should be around position (0,1,0), read section “be careful” )
Frame: pixel_x pixel_y x y z id
1: 200 40 0.011460 0.769714 0.000000 1
2: 200 40 0.011460 0.769714 0.000000 1
Conclusion:
Frame: pixel_x pixel_y x y z id
1: 200 40 0.011460 0.769714 0.000000 1 -> hit region inside quad, lets assume that is correct, because it is quit near to a position (0,1,0)
2: 200 40 0.011460 0.769714 0.000000 1 -> since quad is not moving in frame 2, it should have same position as in frame 1, which is true.
We do assumption that for object 1 everything is correct!
Object 2: (left upper corner should be around position (2,1,0) )
Frame: pixel_x pixel_y x y z id
1: 200 120 1.558336 0.761882 0.000000 2
2: 200 120 1.558336 0.761882 0.000000 2
Conclusion:
Object 2: (left upper corner should be around position (2,1,0) )
Frame: pixel_x pixel_y x y z id
1: 200 120 1.558336 0.761882 0.000000 2 -> blender rendered this position for the object 2, which is wrong cause this position points to the area between quads, there is no quad at this position, which means blender has bug.
2: 200 120 1.558336 0.761882 0.000000 2 -> since quad isnot moving position should be the same as in frame 1, which is true, but position in frame 1 is wrong by itself due to internal blender bug
Object 3: (left upper corner should be around position (4,1,0) )
Frame: pixel_x pixel_y x y z id
1: 200 200 3.073426 0.754163 0.000000 3
2: 200 200 3.073426 0.754163 0.000000 3
Conclusion: the same effect as for object 2 is observed here.
Object 4: (left upper corner should be around position (6,1,0) and in the next frame should be around (7,1,0), since quad moved to the right by one )
Frame: pixel_x pixel_y x y z id
1: 200 280 4.746234 0.777621 0.000000 4
2: 200 320 5.425383 0.762278 0.000000 4
Conclusion: similar effect as for object 2 is observed here.
Here is test file:
Question: how to avoid this problem?
