|
|
Hi to all, some update on this topic.
I done a lot of test, and, for me, the Google ODS docs:
https://developers.google.com/cardboard/jump/rendering-ods-content.pdf
are simply wrong (i mean the raytracing suggested algorithm).
I write a mail (i'm still waiting for a feedback) to Mach Kobayashi, that seem
related to the work:
https://community.renderman.pixar.com/article/991/rendering-for-vr.html
This .pov source: http://pastebin.com/aPbGSDud
generate this image with the Google ODS formulas:
http://www.clodo.it/host/images/f6febe4d2a5739483562719923fc528c31ac378b.png
With my Oculus Rift, the front and bottom view are perfect, but looking
left and right the 3D seem reversed.
Focus on the little 4 yellow balls (front, left, right, bottom).
Look here, i manually draw yellow lines:
http://www.clodo.it/host/images/50ca1ff17fc834e167d44c0ab24484acd90bfd3f.jpg
From what i understand, on top (left eye) image, yellow ball need to
stay always at right of the yellow line.
---------------------
So, i rewritten the ODS with another logic:
// ODS, Top/Bottom
#declare odsIPD = 1;
#declare odsLocationX = 0;
#declare odsLocationY = 0;
#declare odsLocationZ = 0;
#declare odsAngle = 90;
camera {
user_defined
location {
function { odsLocationX +
select(-y,-1,+1)*odsIPD/2*cos(-pi+2*pi*(x+0.5+odsAngle/360))}
function { odsLocationY }
function { odsLocationZ +
select(-y,-1,+1)*odsIPD/2*-sin(-pi+2*pi*(x+0.5+odsAngle/360))}
}
direction {
function { sin(((x+0.5+odsAngle/360)) * 2 * pi - pi) * cos(pi / 2
-select(y, 1-2*(y+0.5), 1-2*y) * pi) }
function { sin(pi / 2 - select(y, 1-2*(y+0.5), 1-2*y) * pi) }
function { -cos(((x+0.5+odsAngle/360)) * 2 * pi - pi) * cos(pi / 2
-select(y, 1-2*(y+0.5), 1-2*y) * pi) * -1}
}
}
I removed the Google ODS ray_origin formulas.
user_defined location function X it's in range -0.5..0.5, and in panoramic mean
So i used it to rotate the IPD vector <-/+IPD,0,0> around Y axis.
Now it's correct:
http://www.clodo.it/host/images/66a61ebcd04180d9203276741ad78075262d20a3.jpg
and look perfectly in all direction with Oculus Rift.
Here:
https://forums.oculus.com/viewtopic.php?f=28&t=30854
there are some updated sample rendering.
---------------------
I'm almost ready to build a POV-Ray Wiki page about ODS, i need only to write
user_defined function for side-by-side and single-eye versions.
Post a reply to this message
|
|