When I use planar mapping on an arbitrary oriented/shaped object, the texture gets mapped in some distorted way that I don’t understand (here a grid projected on a cylinder):
The projection options for planar mapping are Closest Point and Ray. Neither are what I’m after I hoped that Ray was a ray between the camera and the mapping plane but it involves the object’s normal (!?)
The result I’m after is this (made by splitting the surfaces with lines ExtrudeCrvToPoint to the camera origin, coarser grid because it’s a fastidious job…):
I don’t know about Rhino 5, but Rhino WIP has Screen mapping for textures. This works at least with Raytraced mode. Maybe a similar mode exists for Rhino 5.
Hi Nathan,
Thanks for looking into this. This will probably be useful sometimes but it doesn’t work; I need the mapping to stay as it is as the camera moves around:
And I don’t quite understand what is the relation of the mapping controls in the material properties and the mapping controls in the object properties.
Render engines (such as V-Ray) have to depend on Rhino’s tools to define an object’ mapping, right?
I think there’s still slight distortion of the planar mapping at the edges of the sphere as you can see in your top-right viewport, but otherwise that should be pretty much how you’d do it to create a UV that simulates that.
Thanks for looking into this Willem,
Did you tried the file I provided?
I did exactly as you did from the start but it doesn’t work at all. Is it because of the geometry? Or the view I need?
Indeed it’s because of the geometry. I think you will need a custom mapping from an object. (The duck icon if I’m not mistaken ) the shape is a rectangular cutout of a sphere. Where the sphere is centered around the camera point. The borders are defined by the frustrum edges.
Geometrical these are 4 arcs that can create a surface via sweep2. Or a single arc partially revolved around the camera y axis
Hope this is clear, I am on my phone so rather brief.
@Marc, I mentioned this issue to @DavidEranen. I think what you need is a UV mapping mode that does what the texture screen mapping does as I showed in my first reply. Or put in other words it should be like planar mapping as already exists, except that rays shouldn’t be parallel, but coming from the camera location essentially - honoring frustum etc. Maybe @DavidEranen could do something like that at some point for Rhino WIP.
Note that the numbers for the mapping are rounded to 3 digits and this limits the exact control.
Furthermore there seem to be additional errors but tweaking the numbers by hand might get the alignment good enough.
I’m signing off for today, but let me know if you need more info.
Wow, that’s the solution! Logical, that how to have the rays pointing toward the camera of course.
I cannot get it to work correctly though… On the plane there’s always some skewing and the sphere gets some bizarre offset:
Hi Davis,
It seems like we should not expect the planar mapping to work as I wanted at the beginning of the thread. Spherical mapping must be the answer…