How to Render to Texture with a Larger Viewport?

How to Render to Texture with a Larger Viewport?

Anonymous
Not applicable
442 Views
0 Replies
Message 1 of 1

How to Render to Texture with a Larger Viewport?

Anonymous
Not applicable

Hey guys,

 

I'm developing a Maya C++ plugin for which I need to render the current view into a texture/FBO. The texture should be larger than the on-screen viewport. For simplicity, let's assume the texture is twice as large in x and y.

 

How can I do that? I tried changing the viewport size in the M3DView pre-render callback (add3dViewPreRenderMsgCallback), but it seems to have no effect. The result is that only lower left quarter of the texture is rendered to.

 

Another problem I have is, that I'd like to divide the focal length of the camera by two for the texture render. Changing the value in the M3DView pre-render callback has no effect either.

 

Best regards,
Marius

0 Likes
443 Views
0 Replies
Replies (0)