Jump to content
  • Advertisement
Sign in to follow this  
hlee

How to save a scene in higher resolution?

This topic is 2161 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to make posters for secens from my program.  I can grab the screen by using IDirect3DDevice9::

GetBackBuffer.  However it is limited to the screen resolutions of my display, 2560x1600.  The new 4K displays can go up to 3840x2160, but even that is not good enough for large posters.  I would like to have images of 6000x4000 or higher.

 

Is this possible?  Do I need to use a software device to render in a higher resolution than the display?  If so, how?

Share this post


Link to post
Share on other sites
Advertisement

When choosing to capture a frame, you could wait to next frame (and activate some kind of trigger), then resize the display to something bigger, and then capture the frame?

 

If you have dynamic resolution on e.g. ssao... Then you could multiply each single resolution by f each frame, which you can change, to a higher/lower value when needed.

 

PS. Sorry if this is a bit messy, but it's a bit late over here. happy.png

Edited by Migi0027

Share this post


Link to post
Share on other sites

Migi0027, thanks for the suggestion, but how do you resize the display beyond the capability of the harware?  Which resizing function should I call?

Share this post


Link to post
Share on other sites

You can render to a render-target, then you'll only be limited by the max texture size, rather than the display resolution, I believe -- to 8k+. If you want to go even larger, you can render in multiple sections at some high resolution. Bungie used to do this on their servers for premium bungie.net members (you could take a high-res shot from a captured gameplay video). You have to mess with the frustum/projection I think, since it becomes non-uniform. I think they may have done a whitepaper on how they did it.

Share this post


Link to post
Share on other sites

If you want to support arbitrary resolutions and not be limited by either the size of the viewport or the render target, there are two possibilities I know of:

 

1) render the scene in tiles, e.g. 2x2, 3x3, 4x4, altering view- and projection-matrices accordingly, stitching together the results of the different renders.

2) use subpixel rendering, more or less. there's a bit of information here, and there's an article in game programming gems 4 as well.

 

note that both methods will likely cause problems with fullscreen effects, which have to be treated separately. your renderer/engine needs to be aware of the fact that it renders high-resolution screenshots, and e.g. treat all fullscreen effects differently.

 

hth,

-tiv

Share this post


Link to post
Share on other sites

I'm guessing that you can change the back buffer size to the size you want for the screenshot and capture the scene then return the back buffer size to its initial size.

Share this post


Link to post
Share on other sites

@Ravyne,  I've tried your suggestions and created a temporary render target with larger surface, but it does not work.  The rendered scene is clipped to the same size as the backbuffer.

 

@Medo3337, how can I change the backbuffer size?  I use DXUTCreateDevice to create the D3D device, which limits the width/height to the maximums of the display adapter.  SetViewport does not change the backbuffer either.

Share this post


Link to post
Share on other sites

@Ravyne,  I've tried your suggestions and created a temporary render target with larger surface, but it does not work.  The rendered scene is clipped to the same size as the backbuffer.

 

 

Did you adjust your projection to fill the render target?

Share this post


Link to post
Share on other sites


Did you adjust your projection to fill the render target?

 

Yes.  I get the whole scene if the render target is smaller than the adapter limit.  Larger, then the scene is clipped.

Share this post


Link to post
Share on other sites

D3D definitely supports rendering to targets that are bigger than the screen. I suspect your problem is one of:

 

- Your depth buffer is smaller than the render target. You'll need an appropriately sized one of those as well.

- Scissor rectangle is too small.

- Viewport is too small.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!