[x3d-public] ideal points in IndexedFaceSet
Andrey Filippov
andrey at elphel.com
Fri Feb 16 13:13:05 PST 2018
Doug,
Yes, I meant w=0. I thought that switching to MFVec4f would be too big of a change, and the only value of interest may cause div by zero. This is why I thought about a boolean finite/ideal. In my everyday job I'm rather far from CG, so maybe it is not easy to implement with existing shaders. Or maybe there are other equivalent solutions to handle faces with points at infinity. But at the first glance it could be a more elegant way than the Background node.
In our particular application I needed non-uniform grid at infinity. We use frequency-domain processing for image aberration correction and stereo matching, and it is only shift-invariant, not scale-invariant. So using that we are camera manufacturers we pre-select lenses to have the same focal length (to ~1%), then individual lenses/sensors are mechanically adjusted to have the same optical axes and roll. Then we find common radial distortion approximation common for all 4 images, and only correct (in frequency domain) residual distortion. As a result the generated textures have (known) radial distortion that I take into account by correcting the 3d coordinates when generating x3d models IndexedFaceSet. For Background node I would need to apply full rectification to the image. When using 10,000 m flat "wall" I make it as a non-uniform grid, the same would be true if the fancy IndexedFaceSet was available.
Andrey
---
That would be nice to have such an application :-)
---- On Fri, 16 Feb 2018 12:42:04 -0800 GPU Group<gpugroup at gmail.com> wrote ----
Andrey,
I've never tried it - using a homogenous coordinate with w = 0.- is that what you mean?After projection, don't we divide by w? ie x=x/w, y=y/w. Somewhere. Does the shader do that automatically? Isn't dividing by zero a problem?
But if it works, then I think you would start by designing a new node type - CoordinateH node lets say- derived from X3DCoordinateNode, and it would have MFVec4f point field.
http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/rendering.html#Coordinate
Then web3d browsers internally would need to check if its a CoordinateH node and if so do a bit different math.
Not sure what the math would be or where it would take place.
How do you do it?
-Doug
more..
I would love to have one of those quad cameras. I come from photogrammetry and machine vision, and want to get back into it this year. If I find an application that pays.
On Fri, Feb 16, 2018 at 12:44 PM, Andrey Filippov <andrey at elphel.com> wrote:
We are using x3d models to present long-range 3d scenes captured by a quad stereo camera. And really far objects do not have the distance resolved, so they should be treated as at infinity. We first tried to use background node for such images, but it is not very convenient - we had to provide all 6 images (only one is real), and extend the camera image to match the stereo angle to 1/6 of the full sphere. The rest of the models consist of multiple surfaces as IndexedFaceSet (the viewer is here: https://community.elphel.com/3d+map, just the models: https://community.elphel.com/3d+map/models/). So we ended up with just a very far (at 10,000 m with the rest of the objects closer than 1000m) IndexedFaceSet instead of the background.
Can it make sense to extend IndexedFaceSet (and possibly some other nodes) to use ideal points (x,y,z,0) without increasing number of the point coordinates?
For our particular application just a single boolean would do, but other applications might benefit from a mixture of the finite and and ideal points by providing a per-vertex boolean array. This can make more uniform representation to replace background and suggest a straightforward way to export the model to the systems that do not support objects at infinity.
_______________________________________________
x3d-public mailing list
x3d-public at web3d.org
http://web3d.org/mailman/listinfo/x3d-public_web3d.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180216/2e9363ee/attachment.html>
More information about the x3d-public
mailing list