Using a Ogre as Blender game engine

Game Engine, Players & Web Plug-in, Virtual Reality, support for other engines

Moderators: jesterKing, stiv

zingbat
Posts: 0
Joined: Thu Apr 29, 2004 12:36 am

Using a Ogre as Blender game engine

Post by zingbat » Thu Jun 16, 2005 4:47 pm

I have allways wandered why the Blender team didn't choose an high quality game engine api like Ogre and adapt it to their needs instead of building a game engine from scratch. What are the advantages ?

z3r0_d
Posts: 289
Joined: Wed Oct 16, 2002 2:38 am
Contact:

Post by z3r0_d » Thu Jun 16, 2005 6:07 pm

blender has had a game engine since 2000 or 2001... iirc in 2002 it became essentially what we have today [if I recall correctly the original engine could do things like subdivision surfaces because of the way it was integrated into blender, the current engine converts everything to its own format first so as blender gets new features the game engine becomes more obsolete...]

people have mentioned cyrstal space in releation to blender, but I don't belive anything come of it

there is not a lot of advantage of having your own game engine over using another... ogre however isn't a game engine, it is a graphics engine... a lot would still be required to make something interesting [even a fair amount after deciding to use ODE for physics]

Pierre-Luc_Auclair
Posts: 0
Joined: Tue Nov 23, 2004 1:57 am
Location: Quebec City, Canada
Contact:

Post by Pierre-Luc_Auclair » Thu Jun 16, 2005 8:44 pm

Personally I wouldn't really push a Ogre implementation to Blender.

I'd rather much prefer something like that:

Blender3D with shaders and lighting support => export via BlenderXML to Editor => Game

So that you create your shaders, animations, lighting (to some extent), models in Blender. Then you assemble and prepare packages in the Editor. Then you export the format to your game.

It would be better if we had a parallel game engine based on ogre or whatever that people could add libraries and change code and really customize. It could have some scripting support for things that do not require hard coding like shaders, AI, vehicles and characters creation, and more..

We could also implement default libraries for physics, AI, networking.

That would be much more powerful and not necessarily more coplicated for the one who wants to make a game with not a lot of knowledge. Just take UnrealEngine as an example.

This is my #1 bet.

zingbat
Posts: 0
Joined: Thu Apr 29, 2004 12:36 am

Post by zingbat » Fri Jun 17, 2005 12:29 pm

Yes that's what Ogre does already. I can export a scene to xml with an Ogre exporter then load it in Ogre. However i have to be constantly switching between two applications and doing a very tedious edit->export->setup->run cycle. An integrated development solution would be a lot easier.

ideasman
Posts: 0
Joined: Tue Feb 25, 2003 2:37 pm

Post by ideasman » Fri Jun 17, 2005 12:47 pm

Blender and ogre are seperate progects, It not a good idea to try and guue them Together. (Replace blenders current engine etc)

Better to make the path to making games in ogre with blender as a content creator an easy one.

I saw there was a project for a Oger engine that used ogre for rendering, ODE for physics also had sound support, using LUA for the user to code the game in.

Somthing similar could be done in Python.
Like a Python/Ogre Game engine that is well intergrated with a Blender exporter.

zingbat
Posts: 0
Joined: Thu Apr 29, 2004 12:36 am

Post by zingbat » Fri Jun 17, 2005 10:51 pm

ideasman wrote:Blender and ogre are seperate progects, It not a good idea to try and guue them Together. (Replace blenders current engine etc)
I didn't say anything about replacing. It could be an optional engine game engine for example, if Blender was capable to suport multiple game engines.
ideasman wrote: Somthing similar could be done in Python.
Like a Python/Ogre Game engine that is well intergrated with a Blender exporter.
Are you talking about pyogre ? Pyogre could do the trick but the problem is the develpment cycle i mentioned above. You still have to export every mesh to a ogre xml format using the ogre exporter script and every time you make a change to a scene you need to export the scene.

This is very tedious, but i'm sure someone could do a script to automate this process. Something like a project manager script that would setup the game dirs, config files, export everything automatically and launch the ogre engine from within Blender. This is not a solution for me unfortunatly because i'm not enough skilled in scripting Blender to do it.

Another alternative would be to let Ogre read the Blender file format directly. This i could try to do if there is a clear specification for the Blender binary format we can read.

ideasman
Posts: 0
Joined: Tue Feb 25, 2003 2:37 pm

Post by ideasman » Sat Jun 18, 2005 2:41 am

zingbat wrote:
ideasman wrote:Blender and ogre are seperate progects, It not a good idea to try and guue them Together. (Replace blenders current engine etc)
I didn't say anything about replacing. It could be an optional engine game engine for example, if Blender was capable to suport multiple game engines.
ideasman wrote: Somthing similar could be done in Python.
Like a Python/Ogre Game engine that is well intergrated with a Blender exporter.
Are you talking about pyogre ? Pyogre could do the trick but the problem is the develpment cycle i mentioned above. You still have to export every mesh to a ogre xml format using the ogre exporter script and every time you make a change to a scene you need to export the scene.

This is very tedious, but i'm sure someone could do a script to automate this process. Something like a project manager script that would setup the game dirs, config files, export everything automatically and launch the ogre engine from within Blender. This is not a solution for me unfortunatly because i'm not enough skilled in scripting Blender to do it.

Another alternative would be to let Ogre read the Blender file format directly. This i could try to do if there is a clear specification for the Blender binary format we can read.
If the proces is tedious then we probably jet need to make the exporter a scene exporter rather then per model.

Most exporters at the moment just exporters, but I have a internal exporter that exports entire scenes that are gigerbytes in size, to another Enging, maintaining relationships between objects etc.

It sounds like this kind og exporter could be usefull- It could export each object as a seperate file into a new DIR and name them from the object or mesh names.

Could even have a way to attach scripts/properties usefull to ogre to each object.
- Cam

zingbat
Posts: 0
Joined: Thu Apr 29, 2004 12:36 am

Post by zingbat » Sat Jun 18, 2005 8:18 pm

Thats it. Ogre already has a scene exporter however is a very incomplete one and doesn't work with the mesh scene exporter.

See here:

http://www.ogre3d.org/wiki/index.php/Tools:_Blender

What would be cool is a scrypt that does everything (exporting meshes, scenes and project files), without the fuss, in a customized interface.

When you have to load a project you just go into the prject dir and load a .game.project xml (for instance) that contains all the info about the project.

Currently Ogre has the scene exporte and mesh exporter as separate scripts and no way to store project info on a file. It's also missing a 100% functional Blender mesh importer and a scene importer.

With this stuff it would be easy setup a small game engine with Ogre to start a game from within Blender.

reimpell
Posts: 0
Joined: Wed Oct 01, 2003 5:09 pm

Post by reimpell » Sat Jun 18, 2005 10:58 pm

zingbat wrote:Thats it. Ogre already has a scene exporter however is a very incomplete one and doesn't work with the mesh scene exporter.
The scene exporter is complete in the sense, that everything that can be reasonable mapped to Ogre is exported. Can you please be more specific on what features you are missing? For example, I'm missing a billboard export. But there is no "billboard" (as in the sense of computer game graphics) in Blender and Blender's halos are far too special to be exportable. The same is true for particles. Although Blender has a particle system, it doesn't map very well to Ogre's particle system, making an export infeasible.

I haven't understood what you mean with "doesn't work with the mesh scene". The current scene exporter relies on the mesh exporter in the sense that you have to export your meshes separately in addition to the scene export. This reflects your workflow as you probably don't want to export some 100 meshes every time, just because you moved a light a few centimetres away.

zingbat
Posts: 0
Joined: Thu Apr 29, 2004 12:36 am

Post by zingbat » Sun Jun 19, 2005 12:20 am

reimpell wrote:The scene exporter is complete in the sense, that everything that can be reasonable mapped to Ogre is exported. Can you please be more specific on what features you are missing?
I'm not a native english speaker so sorry if i didn't explain myself well.
reimpell wrote:For example, I'm missing a billboard export. But there is no "billboard" (as in the sense of computer game graphics) in Blender and Blender's halos are far too special to be exportable. The same is true for particles. Although Blender has a particle system, it doesn't map very well to Ogre's particle system, making an export infeasible.
I wasn't talk about that. I'm sure you could make a compromise, define some convetions for bulding scenes in Blender that would be properly converted to a Billboard when exporting. For example we could make a rectangular shaped mesh called "OGREBillboardsScreen", and hook objects to its vertices, (this would be their relative positions). Or any scene named Billboards would be treated as a scene containing billboard objects. Just a silly example from the top of my head. Be imaginative.
reimpell wrote:I haven't understood what you mean with "doesn't work with the mesh scene". The current scene exporter relies on the mesh exporter in the sense that you have to export your meshes separately in addition to the scene export. This reflects your workflow as you probably don't want to export some 100 meshes every time, just because you moved a light a few centimetres away.
What i was refereing to, when i said completeness (probably not the right word), was a single script (scene and mesh importer/exporter) with a unified ui and a project manager. Something that would let us browse the project file tree and choose what parts our work we would like to save and whatnot, the project paths, load paths for meshes sound, copy/append things from other projects, and stuff like that associated to project management.

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

Post by joeri » Mon Jun 20, 2005 10:37 am

What about the game logic?

I see alot of graph handlers but no logic handlers.
All talk about bumbmap, material, light, even animation.

But the most important part of a game is.... gameplay!

I have not seen any solution for that. Or am I cross-eyed?

This discussion seems to go into the direction of yet another dynamics solution or scene graph solution,...

Putting a scene full of emptys with the name of what it should be does not sound like a tool to me.

zingbat
Posts: 0
Joined: Thu Apr 29, 2004 12:36 am

Post by zingbat » Mon Jun 20, 2005 8:49 pm

joeri wrote:What about the game logic?
Putting a scene full of emptys with the name of what it should be does not sound like a tool to me.
We can't replace a C++ compiler completely. Perhaps we could come up with a generic game API and use Python as the game scripting language. But that api would be calling functions from the game engine. If we wanted a different game we would have to recompile the game engine. We simply can't do everything in Python or by using a visual programming interface.

When you go into specific kinds of complex games there are performance issues that require specific coding for those games. Like MMORPGS and dynamic terrain loading, special purpose space partitioning algorithms, complex ai games that need dedicated and very fast solutions, or simply games that require an engine that is as fast as possible without wasting time with these things. We can't have everything with a generic game engine. Thats why I sugested Blender to use a plugable game engine solution.

The game logic interface used by Blender is of course very creative and inovative. Other people have done something similar. Look at this:

http://www.cybergarage.org/vrml/ctb/java3d/index.html

It's very nice from the point of view of the user to have a visual interface to be able to deal with simple game logic paterns. From the usability point of view this is a great thing to have. I could also use a diagram to edit game logic in Blender as a complement to their solution.

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

Post by joeri » Wed Jun 22, 2005 10:36 am

Isn't this target audience dependant?

I mean, for hobbiest, or people that want to make a little game for their kid even python might be to difficult.

"We simply can't do everything in Python or by using a visual programming interface. "

Surely there are examples in many different areas where this is possible.
for example: Dreamweaver for making html.

Why would it be so bad that the game engine is not as good as the latest one on the market? Making mario world is quite impossible for even a 4 man team. Why would I need a mario world engine?


O, by the way, to answer your original question:
When the first blender game engine was made the only other game engine out there was doom. And when NaN started to make a game creation kit, the developers did look at other engines like cristal space, I think Erwin even suggested to buy an external engine. I think that was not done for reasons of flexibility, costs, and the real good engine they found was not for sale.
Maybe that was a bad choice because it ment Erwin now had less time for the development of game logic and also had to do scene graph. I think to much time went in scene graph anyway (compared to game logic). Blender already had a game engine but it was re-written from scratch. I think because it was in c, and the developers wanted to work in c++.

Anyway, no OGRE, it still had to be born.

Lorca
Posts: 13
Joined: Tue Jan 14, 2003 12:44 pm
Location: São Paulo, Brasil

Post by Lorca » Thu Jun 23, 2005 12:05 am

"Why would it be so bad that the game engine is not as good as the latest one on the market? Making mario world is quite impossible for even a 4 man team. Why would I need a mario world engine?"


I agree whith Joeri. Because today, in general, all tasks becomes more and more specifical. Its very dificult to see CG's stuff from a Humanistic point of view.
So, what's the flower we see growing in the midle of the the desert? Blender. A cross plataform tool, a "do it yourself kit".

zingbat
Posts: 0
Joined: Thu Apr 29, 2004 12:36 am

Post by zingbat » Thu Jun 23, 2005 4:46 am

I don't have time to do everything i would like to do. My sugestion is: make the Blender expose a plugable architecture with an engine plugin sdk and leave the rest to other people who are interested in integrating their engine of choice with Blender.

Post Reply