I’m glad this is on YT, it would be great to have built in.
In the meantime, I’ve been using a python script to generate the mapping. It works using the baked mesh texture coordinates only, as texture mapping settings don’t seem to be accessible in Rhinocommon. The inputs are a camera location, three points defining the plane of the view frame, and a mesh. frustum2.py (1.2 KB)
On another note, the spherical mapping described above is geometrically incorrect for mapping textures to a view frustum, as we can see in the pincushion distortion. The key difference is that the ‘plane’ in a spherical projection is curved, but correct perspective requires projection against a flat plane oriented to the view.
Yes, exactly. The rectangle is the frame boundary. If you were to place the camera at the center point, it would look like a flat mapping of the texture.
This old tool allow to setup a camera projection for meshes. The mapping is fixed to the mesh and so the camera can be moved without to destroy the mapping. Doe’s it help?
Thanks for your help Micha.
But it doesn’t look like it works. After extracting the render meshes and selecting them with this TextureMapScreenSpace command, the “Rendered viewport” is still okay:
If I delete the object’s texture mapping and then use the command “TextureMapScreenSpace” on them, I get consistent results between renderers. But there’s some distortion:
Last info from chaosgroup: VfR3 for R6 will be released if Rhino 6 is released.
(VfR3.6 will be released before the end of the month. I don’t know why they shouldn’t release a R6 version, other render plugin teams have no problem to do it.)
I tested your file here and it’s interesting, it seems to be we got at Rhino 6 a mesh quality independent mapping. Did I understand it right?
Yes, they will release VfR for Rhino 6 when it comes out. I expect it will be available soon after since they already did some compatible builds when we were testing 3.4. They probably continued to build for v6 for their internal builds.
I don’t quite get what you say about the meshing and mapping…
To get good results, I deleted the mapping from the surfaces, created dense and uniform meshes and deleted the surfaces. Then I used TextureMapScreenSpace.
I mean, your spherical mapping method works at Rhino 6 only, not at Rhino 5. The Rhino mapping of Rhino 5 has problems with low polygon counts of the render mesh too. And at R6 the mapping looks perfect.
Simple test - create a cube and apply a spherical mapping - bad look at R5, perfect at R6. The great questions is - will Vray support this mapping?
I see…
But my guess is that if the rendered viewport, Cycles and RhinoRender all show the same result, VfR should too. It reads Rhino’s texture coordinate…