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 »

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.
timl132
Kobold
Posts: 27
Joined: Sun Mar 25, 2018 5:57 pm

Removed

Post by timl132 »

Removed

Last edited by timl132 on Sun Jan 08, 2023 9:44 pm, edited 1 time in total.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: pre-beginner question about Ogre viability

Post by dark_sylinc »

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.
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: pre-beginner question about Ogre viability

Post by paroj »

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)
cantthinkofusername
Gnoblar
Posts: 2
Joined: Mon Mar 26, 2018 8:04 pm

Re: pre-beginner question about Ogre viability

Post by cantthinkofusername »

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.
Post Reply