Ogre - importing 3D models

Does anyone have any experience with Ogre here and would they know if it would be possible to combine OF and Ogre in a project?

I’m working with a 3D modeller so I need to import his models. Ogre can do that, it’s for C++, so logically I reasoned I should be able to use the model importing and rendering capabilities of Ogre for the that half of the project. It beats spending the next six months writing a model importer. The rest (most importantly the video analysis) I can use OF to handle.

I going to press on and try anyway, I just wanted to know if there’s any advice I’m going to need.

If I get a proof of concept model importing example using Ogre and OF together I will upload it to my site and report back with a link. Ogre supports Code Blocks and Visual Studio, so it’ll probably be for one or both of those.

Can’t you use the ofxObjLoader addon?

I’ve only just downloaded the new code blocks fat stuff. I don’t see anything on the site mentioning it. I’ll have to take a look. It really depends on how meaty it is.


Okay, found it:


I think the models I’m going to have to work with are going to be more complex than what I imagine the objLoader is set up for. I don’t mean to decry the work going into it, but I’d mostly like to look at all the options available. Rendering speed will of course be an issue, it’s an interactive project.

We kinda know people which are already working in Ogre, so that helps.

Plus if I get it to work, that’s something to share with the community.

the objLoader is pretty lightweight at the moment, but Josh has mentioned he’d add texture support as soon as ofTexture had protected members, which it does now. there are also other libraries that could load in obj/dxf, etc, and we encourage folks to identify them and bring them in if they want. there is alot of interest in 3d stuff –

as far as Ogre, there are two things to points out:

a) OF is pretty much wedded to opengl and OGRE is abstracted to choose between directx and opengl – could be an issue. I would imagine ofTexture, for example, would have to use the whatever ogre uses as a texture basis for that reason. many object (ofVideoGrabber, etc) use ofTexture to draw themselves.

b) OF has some glut reliance – we’d like to remove this, but currently, we use glut across several files. in the next release, we’re hoping to put some level of abstraction around this, so that OF can sit on top of other windowing systems. We’ve had on top of GLFW before, so I’m sure it could be done. Arturo just put it on top of gtk (see his post in extend) so it’s totally possible, but we have to get away from glut calls.

I could see several solutions:

a) parts of OF are ripped out and sit on top of OGRE (fine by us – go for it!)
b) parts of OGRE are ripped out and sit on top of OF
c) libraries that do the model loading you want sit on top of OF

anyway, I’m sure at some point you’ll start to see OF on top of other windowing toolkits - we’re happy to not be so reliant on glut.

hope that helps!!

take care,


I’ve registered at the Ogre forums so my tasks now are to see if I can get an Ogre demo working in Code Blocks. Then I’ll see if I can call Ogre from Of. I’d prefer it that way round because I’m going to have a hard time getting my head around C otherwise.

If I’m successful I’ll post the proof of concept.

Ogre3d within ofw would be great. A difficult task, good luck Aaron.

I’d like to find a middleground.

For example I’d like to model a cube and render it as solid colour and outlines (without the central triangle vertices). I’d like to be able to colour different objects and put textures on etc.

I’m going to hack around with objLoader. Hopefully Josh has some time to spend on this also.

I found this © tutorial explaining lots about opengl 3d, worth a read.

Well Ogre under codeblocks needs MinGW. Whatever that is. I tried installing it all and trying to get it to run but it didn’t work. There were constant suggestions to use a “Nightly Build” of codeblocks and I didn’t really have a clue what exactly that meant.

However, two facts learned: Ogre doesn’t seem to work on CodeBlocks as we are downloading it for OF. And if I’ve got this right, it’s using a different compiler.

I feel like I’m only supposed to be able to get it to work whilst uttering Gregorian chant under a full moon whilst sprinkling holy water over my laptop.

I’m now attempting to get the ton of downloads required to make VisualStudio work. Ogre seems to have the same demands of VS that OF has, so if I can get OF to compile in VS then I’ve a fighting chance with Ogre.

Someone posted this renderer under the comments on my blog:


Setting it up though isn’t very idiot friendly.