Jump to content
  • Advertisement
Sign in to follow this  
garma83

Rendering extremely high resolution images

This topic is 3316 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

Hi there! I'm fairly new to directx and I feel I'm catching up quite nicely, but if I say something stupid feel free to correct. I'm writing in managed directx, I hope that is ok. I made an application that will generate images that will eventually be used in print. it has a low-res but realtime preview screen, and pressing the "export" button generates the high-res equivalent. Currently how I do this, is that the preview screen is setup as usual (windowed directx), and when the export is made I switch the rendertarget to a Surface, render a frame, and stream the Surface to a c#-bitmap. This works fine, but only if the surface is not too large (e.g. it fits in video memory). This means I cannot generate images larger that say 4000x4000. Now what I tried was to put the surface not in the default memory pool, but for example on a scratch disk. This will be much slower, but it wouldn't matter because its just one frame. However, I cannot find out how to do this. 2 problems: - I used device.CreateRenderTarget to generate the surface, but it doesn't give me a way to set the memory pool. I can't find suitable properties in Device either - I found device.CreateOffscreenPlainSurface, which seems to do what I want, and I can specify the memory pool, but it generates a surface that is not accepted by the device.SetRenderTarget function (InvalidCallException). Any help is welcome. Am I in the right direction here? Thanks!!

Share this post


Link to post
Share on other sites
Advertisement
Couldn't you just split the frame into sections and then render each section in sequence and just stitch it back together at the end?

Share this post


Link to post
Share on other sites
A render target has to be in video memory, since the GPU is rendering to it. That means that the size of your render target is limited by the amount of free VRAM.

There was an article in Game Programming Gems 2 about doing this sort of thing - the way around is is to render the scene in chunks. Split the scene into a 4x4 grid of 1000x1000 images, and render each one separately. Then combine all of the images in an image editing program (Or do it as a post-processing step in your app).

Share this post


Link to post
Share on other sites
ok that sounds like it would work, how exactly would I do that so that the perspective doesn't get scrambled?

Share this post


Link to post
Share on other sites
this is something which Evil Steve talked about and its exactly what you need:

http://www.gamedev.net/reference/articles/article2063.asp

Shame on you for not looking through the gamedev articles or searching before posting :P

Share this post


Link to post
Share on other sites
One thing to mention would also be that you could use SlimDX and with that, DirectX 10 which allows your rendersize to be increased to 8192 x 4096 for a 32bit image (since there is a limitation that a texture can not be larger than 128 meg).

I'm using ultra high resolution textures in my project and it works fine. If you combine the previous suggestion on splitting the screen with the higher output resolution of DX10, you would have to render less frames to get your final output.

You can get SlimDX here: http://slimdx.mdxinfo.com/

and no, I am not a member of the SlimDX team, just a user that is very impressed and happy with the SlimDX Teams work.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!