Projecting lat long to ground using UVs

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 05 May 2012   #1
Projecting lat long to ground using UVs

I have a panoramic 360̊x180̊ image in equirectangular (lat long) format mapped to a sphere as my environment. I would like to map this same image to a ground plane so that a camera placed roughly where the pano was taken renders the ground perfectly with no distortions. (ie. no matter if I render with the ground plane visibility on/off the rendered image is exactly the same.)



The trick is that I don't want to use useBackground shader as I want to be able translate the camera slightly in the scene and I also want the geometry to be loadable in any 3D application and "just work". I figure I will need to project the UVs onto the geometry to do this.

My assumption was that I could project UVs spherically with the projection center placed at the nodal point of the camera but this doesn't seem to work.

Does anyone have any ideas of how to manipulate the geometry and/or UVs of a ground plane so that a standard lat long image will map to it without distortion from the camera perspective?
Attached Images
File Type: jpg ground_plane.jpg (54.9 KB, 70 views)
File Type: jpg ground_plane_uv.jpg (57.2 KB, 70 views)
 
Old 05 May 2012   #2
Why dont you flatten the lower half of the sphere where it represents your ground?
__________________
Cheers Duke

Blog
 
Old 05 May 2012   #3
Originally Posted by THExDUKE: Why dont you flatten the lower half of the sphere where it represents your ground?


The ground plane you see selected in my image is exactly that. But a camera placed at eye level just above the ground will see massive texture distortion. The UVs and/or geometry need to be manipulated relative to the camera perspective to correct this. I can approximate this manually but I am looking for a mathematical or maya generated solution that results in a perfect match between the sky sphere and the ground plane when rendered; much like the Use Background shader provides.
 
Old 10 October 2012   #4
That actually severely deforms the would be texture, i have this problem myself, but i'm not sure how to solve it
 
Old 10 October 2012   #5
Originally Posted by mingbling: The ground plane you see selected in my image is exactly that. But a camera placed at eye level just above the ground will see massive texture distortion. The UVs and/or geometry need to be manipulated relative to the camera perspective to correct this. I can approximate this manually but I am looking for a mathematical or maya generated solution that results in a perfect match between the sky sphere and the ground plane when rendered; much like the Use Background shader provides.


mip_matteshadow provides this functionality. You need to go through some steps to make it work though. First, you need to use a proper mental ray environment instead of your env sphere. In this case I would use a mib_lookup_spherical. it's a bitch to control because you have zero visual representation and you can only rotate it in the Y axis. Unfortunately you can't hook up a ibl to the matteshadow because the people at autodesk obviously decided that this would not be a useful feature. Welcome to mental ray for maya.
Anyway. You hook this environment up to the environment slot (mental ray section) of your camera and to the "background" slot of a mip_matteshadow. Make appropriate adjustments to the mip matteshadow and you're done.
__________________
"No, the movement is good, it just has to travel faster from spot A to spot B in the same amount of time."
 
Old 10 October 2012   #6
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 03:38 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.