pre-beginner question about Ogre viability

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
cantthinkofusername
Gnoblar
Posts: 2
Joined: Mon Mar 26, 2018 8:04 pm

pre-beginner question about Ogre viability

Post by cantthinkofusername » Mon Mar 26, 2018 8:22 pm

Hello,

Would anyone have any input as to whether Ogre would be viable for the following project:

Running on a headless Linux server, i7, 32Gb ram
  • Loading mesh from a file... mesh will be around 50k vertices
  • Load say 4 textures for different parts of mesh
  • Save 'rendered' image to a JPEG at 1920 x 1080 px
  • Would need shadows and a couple of lights
  • All can be driven from command line
This would need to load & render in less than a second, ideally 500ms.

I know it's a bit of a broad question, but would Ogre be capable of this?

Thank you.
0 x

timl132
Kobold
Posts: 29
Joined: Sun Mar 25, 2018 5:57 pm

Re: pre-beginner question about Ogre viability

Post by timl132 » Wed Mar 28, 2018 2:08 pm

I think you could better get a CPU raytracer or rasterizer for that, I thin Ogre3D requires an GPU with decent Ogl or DirectX support, don't think it has a software renderer.
And I don't know if servers even have OpenGL(3+) or DirectX(11 or 9) at all.(Mine doesn't)
Also, I think Ogre3D requires a display to render to.
But If it doesn't need a display, you could try to render to a texture and save that.
But I think your best bet will be a standalone CPU rasterizer/raytracer, but anyone feel free to correct my if I am wrong.
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3917
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 167
Contact:

Re: pre-beginner question about Ogre viability

Post by dark_sylinc » Wed Mar 28, 2018 11:41 pm

Hi!

As long as you have a GPU, you can use Ogre (i.e. not rely on software only; you can use a dedicated GPU or the integrated one). However please take in mind several OSes (including Linux and Windows) give a lot of headaches when working in headless mode (no monitors plugged in). A common cheap solution to that problem is one of those fit-Headless plugs selling on Amazon.
It may be possible to avoid the fit-Headless plug, but it's going to require some tiresome work to get it running. You will also have to sort out the EGL / GLX madness. Chances are you're going to require an active X11 server. I don't know if it's possible to render without an X11 server.

Another problem you will face is that Ogre (and 3D APIs) usually requires some "head start" when initializing. It's quite possible launching the process and initializing all required resources is going to occupy most of your 500ms range (if not more); not to mention shader compilations.

The best solution I would see is to keep the process as a daemon, and your command line be a process that communicates with that daemon (e.g. via pipe or tcp) to perform the rendering. If you do that, then rendering in 500ms is perfectly plausible and time taken will depend on your scene complexity and GPU speed (number of vertices is a factor, but not the only one). 500ms looks like a lot of time for just rendering so it should be fine.

Then saving to JPEG is going to have to be done in CPU code, and how long that takes depends on the jpeg lib you use, the compression quality, and the CPU speed. Then saving to disk depends on whether you need the disk transfer to be async (the usual way, fast) or sync (slow, depends directly on the I/O hardware speed i.e. SSD vs HDD, and what other processes are doing with I/O).

Is Ogre capable of doing what you want? Yes.
Do you need to take certain precautions? Yes.
0 x

paroj
OGRE Team Member
OGRE Team Member
Posts: 739
Joined: Sun Mar 30, 2014 2:51 pm
x 112
Contact:

Re: pre-beginner question about Ogre viability

Post by paroj » Thu Mar 29, 2018 12:40 am

for reference: the CI runs the Visual tests using xvfb in software:
https://travis-ci.org/OGRECave/ogre/job ... 6167#L3711

the tests store their results as 640x480 png images - although I did not actually look at the results yet. (+use them to test against a reference set)
0 x

cantthinkofusername
Gnoblar
Posts: 2
Joined: Mon Mar 26, 2018 8:04 pm

Re: pre-beginner question about Ogre viability

Post by cantthinkofusername » Thu Mar 29, 2018 9:43 am

Thank you very much for all your helpful comments and sorry for not replying sooner.

I am tied up with deadlines right now but will have a thorough look into all your comments this weekend.
0 x

Post Reply