How to save a scene in higher resolution?

Started by
20 comments, last by hlee 10 years, 7 months ago

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?

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

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/, cuboidzone.wordpress.com/

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

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.

throw table_exception("(? ???)? ? ???");

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

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.

@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.

@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?

throw table_exception("(? ???)? ? ???");


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.

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.

This topic is closed to new replies.

Advertisement