Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

UV camera projection

UV camera projection

userX4542
Advocate Advocate
7,743 Views
17 Replies
Message 1 of 18

UV camera projection

userX4542
Advocate
Advocate

I want to create UVs from a camera projection that maintain their correct position in camera space. (basically a softimage camera projection)

 

Currently, when I use the camera-based projection in the UV menu, the UVs get normalised so they fit the edges of the UV space from 0 to 1

 

Alternatively I can create a texture based on a projection using the standard way of doing a camera projection, by right clicking on texture in the file node and seleting 'create as projection'. But this doesn't give me any UVs in the UV editor because the UVs are inherent to the shader.

 

I've read on some websites that it's possible to bake these textures and get the UVs that way. But this is absurd as it would require me to bake textures for potentially hundreds of objects.

 

I've seen some scripts online that ought to do what I am looking for, but they were made in 2009 and no longer seem to work.

 

Can anyone help me?

 

Cheers

7,744 Views
17 Replies
Replies (17)
Message 2 of 18

sean.heasley
Alumni
Alumni

Hi @userX4542

 

Aside from the basic Camera Projection I don't believe there is a way to do this type of projection in Maya natively.

 

By chance do you know the name of the old plug-ins that you saw could handle this? I'd like to take a look at how they look so I can confirm whether or not we have that functionality.

 

 

0 Likes
Message 3 of 18

userX4542
Advocate
Advocate

Thanks for getting back to me Sean. Here's a link to an old forum discussion with an old script posted further down. I couldn't get it to work unfortunately.... http://forums.cgsociety.org/t/uv-projection-joke-in-maya/1526174

 

It would be great to have this functionality.

 

Cheers

0 Likes
Message 4 of 18

userX4542
Advocate
Advocate
Hey Sean, did you find anything in the end? Do you think any of thise scripts could work?

If not, is it possible to add this feature in the next version on Maya?

Cheers
0 Likes
Message 5 of 18

sean.heasley
Alumni
Alumni

Hi @userX4542

 

Sorry for the delayed response! I'm currently in Montreal for a technical support summit so I haven't had enough time to test this.

 

I'm going to test this tomorrow but in the meantime I do highly recommend posting this on the Maya Idea Board.

 

This board is regularly checked by the devs and topics can be voted on by users on what topics everyone wants to see in future releases of Maya.

 

 

 

0 Likes
Message 6 of 18

userX4542
Advocate
Advocate

cheers buddy

0 Likes
Message 7 of 18

sean.heasley
Alumni
Alumni

Hi @userX4542

 

I looked into the scripts and yeah they currently aren't working with 2018 which isn't super surprising since the scripts are from 7 years ago and Maya has gone through a lot of changes since then.

 

What's interesting is the different suggestions across the thread like using the camera projection setting or baking the building before they use the Pulldownit.

 

I think I'm struggling to visualize what you're trying to do here. When you get a chance, can you please zip and attach the scene file here or via dropbox/google drive or another file sharing program so I can take a look at it? If the file is confidential or under NDA please send it to me in a private message instead of posting it here.

 

 

0 Likes
Message 8 of 18

userX4542
Advocate
Advocate

I don't have a scene that I need it for currently. But it's a feature in softimage that we use all the time. Having the UVs of a camera projection has many advantages over a camera projection in maya that is inherent to the shader.

 

Here's a link to a video that I made to explain what I mean:

https://vimeo.com/290861031

 

I have a scene set up with 3 polygon objects and a camera. I am using an imagine plane with an image sequence applied of a shot of my desk  (rotoscope in softimage). The material applied to the objects has the same image sequence plugged into the shader.

 

I then select the three objects and create UVs based on a camera projection. The UVs are now in the correct place, so that the material on the objects aligns exactly with the image plane. When the objects are not selected, you can't see them any more because it all aligns. In the UV editor you can see the position of the UVs relative to the image sequence.

 

Does this make sense?

0 Likes
Message 9 of 18

userX4542
Advocate
Advocate

here's in image of the UV editor using a regular checkerboard background with the objects selected.camera_projection.JPG

0 Likes
Message 10 of 18

sean.heasley
Alumni
Alumni

Hi @userX4542

 

Thanks for providing that video!

 

Looking at that video, I did some tweaking to the planar map camera settings and got this for a UV map. Would this work for you?

 

uv map.png

 

 

 

If not, it's possible this may just be a limitation/difference of Softimage and Maya.

 

 

0 Likes
Message 11 of 18

userX4542
Advocate
Advocate
No, unfortunately this is not what I am look for because in the example you gave the UVs get normalised. They touch the edges of the 0-1 UV space. This is of no help because as soon as you project through that camera, nothing will align and you have to manually scale your UVs which is virtually impossible.

Also, the fact that that option is under planar mapping makes me suspicious as it suggests it is an orthographic projection, not a perspective projection.

This is a really basic functionality and it's so fundamental that I am quite astonished it's not possible in Maya. I hope this gets resolved soon. I have added this topic to the idea board so hopefully that will help.
Message 12 of 18

userX4542
Advocate
Advocate

Hey @sean.heasley , just checking in. Is this feature going to be added to Maya any time soon? Has a developer looked into this?

Message 13 of 18

Anonymous
Not applicable

Hello

 

The problem with Maya projection (planar camera) is that is a simple ortho projection and strech the UV into UV bound.
The guys and me would be happy if the camera projection use the camera aspect and FOV to translate into UV matrix.
That it mean:  If we render the object from camera view than the rendered image and UV snapshot overlap each other in a correct way (similar aspect and FOV).
But it would be a good compromise if the aspect need to be 1:1.

Message 14 of 18

Anonymous
Not applicable

Hi. following this up really late, just found it, having the same problem. the way to do this is to create your projection camera and create also a plane parented under the camera and rotated to function as a sort of "image plane". scale the plane to the extent of the camera's view and then Combine the objects to be projected onto/UV mapped with this 'image plane' object. make sure all of the objects are within the cameras view. project your UVs from the camera, then Normalize the UVs, then Separate the objects, and the UVs will remain, without normalizing to the edges.

 

its a hack and I'd prefer a better solution from Maya, an option to project UVs from a camera NOT have them normalize would be the simplest.

 

Cheers

0 Likes
Message 15 of 18

remi.vfx
Community Visitor
Community Visitor

To be honest its kinda a shame that xsi did it past flawlessly and ten years later still not implemented in maya  and blender a free software does it for free. When Autodesk will start to revise those fundamentals such as this ? (its a real question)

0 Likes
Message 16 of 18

drbrandtjr
Advocate
Advocate

I'm shocked to find out that Maya can't do this like Softimage.  I have a project that requires this.  It never occurred to me that I couldn't do this in Maya!  It seems like such an essential function!

0 Likes
Message 17 of 18

drbrandtjr
Advocate
Advocate

Sadly this is not a sufficient work around.  It does not use the cameras perspective.  It's like an orthographic view for the camera plane.

0 Likes
Message 18 of 18

drbrandtjr
Advocate
Advocate

I take back my last reply kmatheson’s work around.  It does work but, there are a couple of things you need to do.  

 
In the camera settings turn on the resolution gate and match the grid to that before merging with the rest of the geometry.
 
Assign new material to the merged geo, choose Surface Shader.
 
Project UVs using camera-based projection.
 
In the Attribute Editor select the Surface Shader, and click the connection box for the Out Color.  Right click on File and choose, Create as Projection.
 
This should give you the Projection tab.  Choose the image file you want to use.  Go back to the Projection tab and switch Proj Type to Perspective.  Change Link to Camera to the correct camera, and Fit Type to Match Camera Resolution.
 
You should now be in business!