high resolution (I mean REALLY high)?

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
User avatar
pjcast
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2543
Joined: Fri Oct 24, 2003 2:53 am
Location: San Diego, Ca
x 2

Post by pjcast »

Well, short of calculating the size of the title bar and border, and than removing those from the image and saving the bitmap that way... Perhaps, simply not creating a window with titlebar/border?

I think WS_POPUP will eliminate the title bar and maybe borders for Win32. Try setting the "border" to "none" with the miscParams when creating the window.
Have a question about Input? Video? WGE? Come on over... http://www.wreckedgames.com/forum/
User avatar
wilford
Gnoblar
Posts: 9
Joined: Thu Dec 21, 2006 6:27 am
Location: ChengDu,SiChuan,China

Post by wilford »

I'm not familiar with OGRE.Please show the code.Thank you
Rackle
Gnome
Posts: 375
Joined: Sat Jul 16, 2005 1:42 am
Location: Montreal

Post by Rackle »

I've greatly modified the wikied function High resolution screenshots in order to automatically stitch the various sub-views/grids.

In my previous post in this thread I mentioned problems with DirectX windowed mode (showing the title bar and sizing border) as well as OpenGL windowed mode (black lines around the sub-views) and fullscreen mode (black lines as well as the first grid not using the proper projection matrix). Those were solved by modifying the DirectX and OpenGL render systems. A patch was submitted or you can edit your version of the code (compatible with both Dagon and Eihort).

Code: Select all

	RenderSystems/Direct3D9/src/OgreD3D9RenderWindow.cpp
	----------------------------------------------------
	void D3D9RenderWindow::writeContentsToFile(const String& filename)
	Replaced:
		GetWindowRect(mHWnd, &srcRect);
	With:
		GetClientRect(mHWnd, &srcRect);
		POINT point;
		point.x = srcRect.left;
		point.y = srcRect.top;
		ClientToScreen(mHWnd, &point);
		srcRect.top = point.y;
		srcRect.left = point.x;
		srcRect.bottom += point.y;
		srcRect.right += point.x;


	RenderSystems/GL/src/OgreWin32Window.cpp
	----------------------------------------
	void Win32Window::writeContentsToFile(const String& filename)
	Replaced:
		glReadPixels(0,0, mWidth-1, mHeight-1, GL_RGB, GL_UNSIGNED_BYTE, pBuffer);
	With:
		if (mIsFullScreen)
			glReadBuffer(GL_FRONT);
		glReadPixels(0,0, mWidth, mHeight, GL_RGB, GL_UNSIGNED_BYTE, pBuffer);
In order to fix the problem with the first grid when using the OpenGL render system in fullscreen mode I made a call to glReadBuffer(GL_FRONT). However it is my opinion that this solution is a hack and that it points toward a bug with the OpenGL renderer; it does not behave the same was as the DirectX renderer. Hopefully someone more knowledgeable can look into this.
rukos1
Gnoblar
Posts: 5
Joined: Wed Aug 22, 2007 8:20 pm

Added an Example Screenshot class into Wiki

Post by rukos1 »

Hi,

i added an example implementation of a screenshot class, which is designed for Shoggoth(1.6.x).
Parts of this class based on the previous Eihort (v1.4.x) code (incl. comments) and the Render to Texture - Tutorial.
The approach is to render into a texture and copy the content to a PixelBox.
Finally use Ogre::Image::loadDynamicImage(params) to store the content of the PixelBox into a file. This is the fastest way we could find to make hires screenshots, if you know what can enhance the performance, please let us know.
Here is the link again http://www.ogre3d.org/wiki/High_resolution_screenshots
User avatar
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3335
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US
x 3

Post by Praetor »

It's great to see this topic revisited. Large screenshots are great for showing off. I used to use the old Eihort code, but your screenshot manager looks much smaller and cleaner.
imtrobin
Greenskin
Posts: 117
Joined: Mon Jul 10, 2006 5:37 am

Post by imtrobin »

I noticed the compositor effects are not rendered out.

It looks a little trickier than just adding active compositors to the viewport, cos the compositor affects the single grid, not the whole scene.
User avatar
ghiboz
Goblin
Posts: 205
Joined: Wed Apr 25, 2007 9:47 pm
Location: Centallo (I)
x 2

Re: high resolution (I mean REALLY high)?

Post by ghiboz »

hi!
with the new ogre 1.9 the code crashes when update the rt.. any ideas?