How to implement off-screen rendering?

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
igorvlassov
Halfling
Posts: 89
Joined: Thu Apr 22, 2004 11:22 am
x 1
Contact:

How to implement off-screen rendering?

Post by igorvlassov »

Hello,

I need to implement some sort of rendering server. On the current project phase I need to show texture with off-screen rendering. Do you have an idea how to implement this?

Regards,
Igor
User avatar
so0os
Bugbear
Posts: 833
Joined: Thu Apr 15, 2010 7:42 am
Location: Poznan, Poland
x 33

Re: How to implement off-screen rendering?

Post by so0os »

Render to Texture, and copy pixels from it. search for dynamic texture examples on wiki, and read from it instead of write.
Sos Sosowski :)
http://www.sos.gd
igorvlassov
Halfling
Posts: 89
Joined: Thu Apr 22, 2004 11:22 am
x 1
Contact:

Re: How to implement off-screen rendering?

Post by igorvlassov »

I know how to render to texture. But how to disable rendering to the screen?
User avatar
so0os
Bugbear
Posts: 833
Joined: Thu Apr 15, 2010 7:42 am
Location: Poznan, Poland
x 33

Re: How to implement off-screen rendering?

Post by so0os »

make RTT your viewport rendertarget instead of a renderwindow
Sos Sosowski :)
http://www.sos.gd
User avatar
madmarx
OGRE Expert User
OGRE Expert User
Posts: 1671
Joined: Mon Jan 21, 2008 10:26 pm
x 50

Re: How to implement off-screen rendering?

Post by madmarx »

I think pure offscreen is not possible (at least not without providing your own context).

I mean, there are plenty of thread about off-screen rendering in Ogre, and all of them tell that rtt without the device (for directX) or without the context (for openGL) is not possible. Which means : no window => no DirectX and no OpenGL available.

http://www.ogre3d.org/forums/viewtopic. ... 80&start=0
https://www.ogre3d.org/forums/viewtopic ... 14&start=0

Maybe this can be of some help, if you are ok to use a hidden window :
http://www.ogre3d.org/forums/viewtopic.php?f=4&t=59441

Anyway, you can build a 1*1 window and then use it to manage your rtt then.
Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
igorvlassov
Halfling
Posts: 89
Joined: Thu Apr 22, 2004 11:22 am
x 1
Contact:

Re: How to implement off-screen rendering?

Post by igorvlassov »

Thanks so0os & madmarx,

seems, I simply will not create viewport for my off-screen scene and render it onto rtt only. I'll try to create another scene with plane "screen" & rtt texture on it & show it. This enough for my current proj.
mrmclovin
Gnome
Posts: 324
Joined: Sun May 11, 2008 9:27 pm
x 20

Re: How to implement off-screen rendering?

Post by mrmclovin »

Does this mean I can't have a server app that isn't intended for rendering (hence no window) but uses a scene manager and scene nodes to hold position, scale and so on that it will send to the clients? I know that a scene manager might not be the most appropriate way to go, but it will save some dev time in my project!
User avatar
madmarx
OGRE Expert User
OGRE Expert User
Posts: 1671
Joined: Mon Jan 21, 2008 10:26 pm
x 50

Re: How to implement off-screen rendering?

Post by madmarx »

@mrmclovin

1/ I think there are things about this in the wiki. Eg:
http://www.ogre3d.org/tikiwiki/Loading+ ... e=Cookbook
http://www.ogre3d.org/tikiwiki/LoadingM ... e=Cookbook
...

2/ Don't forget that Ogre won't necessarily update the parts that are not visible in your animations (but you are aware of that of course :mrgreen:).

3/ Ogre is not designed to be used like that as far as I know, so If it saves you time, good. If you end up losing it, sorry, it's your fault :twisted:.
Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
Post Reply