Jump to content


Photo

Gmogre3d - GM Port Of Ogre 3D - Supports GM 8.1


  • Please log in to reply
891 replies to this topic

#1 Houdini

Houdini

    GMC Member

  • New Member
  • 195 posts

Posted 29 November 2009 - 10:12 PM

Posted Image

Version 1.25


What Is It?
GMOgre3D is a GM port of the extremely popular open source OGRE (Object-Oriented Graphics Rendering Engine) 3D engine. Why port OGRE to Game Maker? Simply put, the 3D support built into Game Maker only supports the most very basic of 3D functionality. If you want to get the most of your 3D games using Game Maker then you need to use a 3rd party graphics library, such as OGRE.

I choose to port OGRE in particular because it's an extremely popular 3D engine that is constantly being updated and improved upon. It also has an extremely large, passionate, and active user base.


Features
Material / Shader support
  • Powerful material declaration language allows you to maintain material assets outside of your code
  • Supports vertex and fragment programs (shaders), both low-level programs written in assembler, and high-level programs written in Cg
  • Supports the complete range of fixed function operations such as multitexture and multipass blending, texture coordinate generation and modification, independent colour and alpha operations for non-programmable hardware or for lower cost materials
  • Multiple pass effects, with pass iteration if required for the closest ‘n’ lights
  • Support for multiple material techniques means you can design in alternative effects for a wide range of cards and GMOgre3D automatically uses the best one supported
  • Material LOD support; your materials can reduce in cost as the objects using them get further away
  • Load textures from PNG, JPEG, TGA, BMP or DDS files, including unusual formats like 1D textures, volumetric textures, cubemaps and compressed textures (DXT/S3TC)
Meshes
  • Flexible mesh data formats accepted, separation of the concepts of vertex buffers, index buffers, vertex declarations and buffer mappings
  • Progressive meshes (LOD), manual or automatically generated
  • Static geometry batcher
Animation
  • Sophisticated skeletal animation support
  • Flexible shape animation support
  • Animation of SceneNodes for camera paths and similar techniques, using spline interpolation where needed
  • Generic animation tracks can accept pluggable object adaptors to enable you to animate any parameter of any object over time
Scene Features
  • Highly customizable, flexible scene management, not tied to any single scene type. Use predefined classes for scene organization if they suit or plug in your own subclass to gain full control over the scene organization
  • Hierarchical scene graph; nodes allow objects to be attached to each other and follow each others movements, articulated structures etc
  • Multiple shadow rendering techniques, both modulative and additive techniques, stencil and texture based, each highly configurable and taking full advantage of any hardware acceleration available.
  • Scene querying features
Newton Physics
  • Integration of Newton Physics and collisions
  • Ball and Socket, Hinge, and Slider Joints
GUI
  • Integration of a full GUI system
  • Windows, Buttons, RadioButton, CheckBoxes, ListBoxes, ComboBoxes, EditBoxes, Spinners, Sliders, Menus, ProgressBars, TabControl, Multiline EditBoxes, MultiColumn Listboxes, and more!
  • Fully skinnable
  • GUI layout editor
Special Effects
  • Compositor system, allowing for full-screen postprocessing effects to be defined easily, via scripts if desired
  • Particle Systems, including easily extensible emitters, affectors and renderers (customisable through plugins). Systems can be defined in text scripts for easy tweaking. Automatic use of particle pooling for maximum performance
  • Support for skyboxes, skyplanes and skydomes, very easy to use
  • Billboarding for sprite graphics
  • Transparent objects automatically managed (rendering order & depth buffer settings all set up for you)
Paged Geometry
  • Dynamic geometry paging system, which enables infinite worlds
  • Batched rendering LOD for optimized rendering of near-by trees
  • Impostor rendering LOD for extremely fast rendering of distant trees
  • Flexible LOD display system, which can be expanded to display geometry with any technique you can implement
  • Flexible LOD configuration system, which allows you to configure any combination of supported LODs in any way you want
  • Optional cross-LOD fade transitions, and far LOD fade-out, fully configurable
  • Flexible PageLoader system, allowing you to dynamically load geometry from any source you can imagine
  • Easy addition / removal of trees with bit packing, allowing millions of trees to be stored in RAM using only a few MBs
  • Color-map support for trees, which enables you to apply terrain lightmaps to your trees with one simple function call
  • Animated, optimized grass rendering system. Supports density maps, color maps, wind animations, height range restriction, and much more.

Screenshots

Posted Image

Posted Image


License

GMOgre3D uses the LGPL license, which means it's completely free to use for personal and commercial use. It also includes full source code, but if you modify the source you must make those changes available to the general public.

Documentation
All 1200+ functions for GMOgre3D are fully documented, and more tutorials are steadily being added. You can view the current documentation at the GMOgre Wiki. You can also look at the OGRE documentation and wiki, which is extremely helpful in learning how OGRE works.

Community Forums
Visit the GMOgre3D forums for questions, tips, and more right here.

Download
You can download the binary release with sample GMK projects here.

Source Code
You can download the full source code, including Visual Studio 8 project files here.

Issues
The DirectX renderer requires a version of DirectX 9 dated Nov 2008 or higher. If you get an error about a missing d3dx9_41.dll then you have an older version and need to update from:
http://www.microsoft...b1-442d8712d553

Contributers
GMOgre logo by mauge
GMOgre font by "Baby Kruffy" @ www.dafont.com
Ogre head by wumpus@ogre3d.org


- Houdini

Edited by Houdini, 13 August 2012 - 06:51 PM.

  • 42

#2 michael pw

michael pw

    GMC Member

  • GMC Member
  • 1488 posts
  • Version:GM8.1

Posted 29 November 2009 - 10:16 PM

Wow that looks insane!!
  • 2

#3 Advokara

Advokara

    GMC Member

  • New Member
  • 116 posts

Posted 29 November 2009 - 10:39 PM

Hello... Looks good... BUT when I downloaded it I got a big error... telling me I need new Direct X...

I have Windows 7 with DirectX 10 ... It shouldn't require something so specific as dx3d_9_40 ... or whatever it said...

BUT Once this this works for me :( Its gona be great I assume.
  • 0

#4 michael pw

michael pw

    GMC Member

  • GMC Member
  • 1488 posts
  • Version:GM8.1

Posted 29 November 2009 - 10:42 PM

if it needs DierctX 9 it should at least work with 10


also this is amazing!! Really good frame Rate! Very good rendering and it doesn't look as complicated as U3d!

i will try and use this!

what you could do is make a game creation program with this! it would sell really well!

also i think you should change the Camera speed from 0.8 to 3 because it looks like its lagging but its not...
  • 0

#5 Houdini

Houdini

    GMC Member

  • New Member
  • 195 posts

Posted 29 November 2009 - 10:56 PM

Hello... Looks good... BUT when I downloaded it I got a big error... telling me I need new Direct X...

I have Windows 7 with DirectX 10 ... It shouldn't require something so specific as dx3d_9_40 ... or whatever it said...

BUT Once this this works for me :( Its gona be great I assume.

Ah, yes. Currently GMOgre3D only includes renderers for OpenGL (which has some issues currently) and DirectX 9. There is a DX 10 beta renderer, but I removed it to save some space since it wasn't officially released with OGRE yet.

You just need to update your DirectX 9 version and everything will run just fine:
http://www.microsoft...b1-442d8712d553

- Houdini
  • 0

#6 brett14

brett14

    GMC Member

  • GMC Member
  • 1151 posts
  • Version:GM8

Posted 29 November 2009 - 10:58 PM

Very nice, I'll check it out latter. Even nicer, it looks like you gave out the source. I'll check this out asap, always wanted to use ogre or irrlicht, but never really got around to it.

Edited by brett14, 29 November 2009 - 10:59 PM.

  • 0

#7 Xilvium

Xilvium

    GMC Member

  • New Member
  • 12 posts

Posted 29 November 2009 - 11:15 PM

Quite a impressive dll you have there.
I have tried it and it worked like I expected.
And here is a question right away. Did you base your dll's internal render system on the one of ogre3d?
In specific I mean the ExampleFramework because you have the ogre logo on the bottom right and on the bottom left you have the status overlay.
It would be surely great if you could turn these off.
Anyway I liked it!
Are there any plans on the CeguiRenderer from ogre also or? It would be great to have these so people can make a loading bar while adding resources to the resourcegroup.
(I myself use the regular Ogre3D SDK for c++) and I did not really noticed a performance hit I am testing this on my laptop and i got 130 fps regular (with the fresnel demo) which is the same avarage amount which I get in the fresnel demo from the SDK (c++ version)
So keep up the good work!

-Xilvium
  • 0

#8 Houdini

Houdini

    GMC Member

  • New Member
  • 195 posts

Posted 30 November 2009 - 03:06 AM

Quite a impressive dll you have there.
I have tried it and it worked like I expected.
And here is a question right away. Did you base your dll's internal render system on the one of ogre3d?
In specific I mean the ExampleFramework because you have the ogre logo on the bottom right and on the bottom left you have the status overlay.
It would be surely great if you could turn these off.
Anyway I liked it!
Are there any plans on the CeguiRenderer from ogre also or? It would be great to have these so people can make a loading bar while adding resources to the resourcegroup.
(I myself use the regular Ogre3D SDK for c++) and I did not really noticed a performance hit I am testing this on my laptop and i got 130 fps regular (with the fresnel demo) which is the same avarage amount which I get in the fresnel demo from the SDK (c++ version)
So keep up the good work!

-Xilvium

Yes, the examples all use the OGRE's DirectX 9 renderer. Everything is just compiled inside the GMOgre DLL instead of having a separate RenderSystem_Direct3D9.dll and plugins.cfg file to load it.

The overlays are just scripts that are in OgreCore.zip, and are used for debugging. The are not displayed by default, I just turned them on for demonstration purposes.

I had thought about including the CEGui plugin and if enough people request this then I will include it in an upcoming version.

As for the FPS, yes, it should be very close to the same. GMOgre3D also uses GMAPI to read position/orientation values directly from GM objects memory, so there won't be any performance hit syncing the OGRE scene nodes to their corresponding GM objects. But what WILL slow things down is using GML for the game logic. GML is slower than C++. Of course, GM8 also speeds up GML quite a bit, so this performance hit will be lessened some.

- Houdini

Edited by Houdini, 30 November 2009 - 06:24 AM.

  • 0

#9 Harvest Moon

Harvest Moon

    GMC Member

  • New Member
  • 158 posts

Posted 30 November 2009 - 04:01 PM

Wow, I'm impressed. This got to be one of the best 3D Extensions for GM. I think this will be great for those who develop 3D games in GM. I've never done it myself, but I know others do! Nice work!
  • 0

#10 rappybas

rappybas

    GMC Member

  • New Member
  • 678 posts

Posted 30 November 2009 - 04:54 PM

I'll take a look, I hope I can use this one for my 3D Building game online :|
GM3D is so slowing it down :(
  • 0

#11 michael pw

michael pw

    GMC Member

  • GMC Member
  • 1488 posts
  • Version:GM8.1

Posted 30 November 2009 - 06:01 PM

out of interest, would it be legal to use this in a commercial product?

and is it possible to remove that Orge logo display?
  • 0

#12 Houdini

Houdini

    GMC Member

  • New Member
  • 195 posts

Posted 30 November 2009 - 06:32 PM

out of interest, would it be legal to use this in a commercial product?

and is it possible to remove that Orge logo display?

As mentioned in the original post, the entire project is under the LGPL license. In simple terms, this gives you the right to use this in personal AND commercial software, completely for free. If you happen to make changes to the source code of GMOgre3D, then you are required to release the source code to JUST your modified version of GMOgre3D (and not your game).

- Houdini
  • 0

#13 michael pw

michael pw

    GMC Member

  • GMC Member
  • 1488 posts
  • Version:GM8.1

Posted 30 November 2009 - 06:46 PM

heh, i don't want to sound like a NOOB but i have 2 things to ask:

1. is it possible to combine this with Gm's 3d functions? if not is there a way to use functions like d3d_draw_wall without needing to make a model?

2. would you be able to make an FPS example, like showing how to use features like collision and how to make bullets appear. That would be awesome!
  • 0

#14 Houdini

Houdini

    GMC Member

  • New Member
  • 195 posts

Posted 30 November 2009 - 07:29 PM

heh, i don't want to sound like a NOOB but i have 2 things to ask:

1. is it possible to combine this with Gm's 3d functions? if not is there a way to use functions like d3d_draw_wall without needing to make a model?

2. would you be able to make an FPS example, like showing how to use features like collision and how to make bullets appear. That would be awesome!

First, I forgot to cover your last question in the previous post, but yes, the OGRE logo and the FPS overlay are NOT enabled by default. I enabled them just so users could see the FPS in those screenshots.

1) No, GMOgre3D takes full control of the GM window when it's started. You can't use any of the GM's drawing functions while GMOgre3D is running.

This would include the d3d_draw_wall as well. However, you probably do not WANT to use d3d_draw_wall anyways! In the current game I'm making we previously had used GM's built in D3D functions, and we used d3d_draw_wall extensively. Our walls were actually cubes (each wall fills in the 16x16 square in the room grid), but we added a ton of optimizations such as:
a) We didn't draw all 6 sides of each cube wall. The camera never goes below/above the walls, so we didn't need to draw the top/bottom of the cubes. And since only 2 sides would ever be visible at a single time we put in code so only 2 sides would ever be drawn (using d3d_draw_wall) at a single time for each cube wall.
b ) We also merged our single walls into larger walls. For example, instead of drawing 20 16x16 walls in a row (ie for a long wall around a town) we merged it into a single 16x320 wall on the fly, then we just needed to call d3d_draw_wall twice for that entire section of wall.
c ) We then ensures walls that were outside our viewing fustrum were not draw and in fact the entire GM object was hidden.

With all of these optimizations we were able to tweak out our FPS to about 180fps. I tested out drawing 500 16x16 wall cubes in GMOgre3D (no optimizations done) and I got around 400fps. When I made those walls part of the static geometry I was able to get about 600fps.

But still, if you want to draw simple walls there is always the CreateWallEntity() function. This will create a vertical plane behind the scenes and will be drawn automatically once you add it to a scene node. There aren't any functions in GMOgre3D that just draw something for just a single frame. Everything must exist as an entity, light, billboard, etc. This way OGRE can use batching and other optimizations behind the scenes to ensure everything is drawn as fast as possible.

2) Yes, this is something I've been thinking about. Currently I'm writing documentation, which is taking up most of my time, but I plan on going back and writing some kind of very basic FPS example with terrain and collision detection in the near future.

- Houdini
  • 0

#15 michael pw

michael pw

    GMC Member

  • GMC Member
  • 1488 posts
  • Version:GM8.1

Posted 30 November 2009 - 08:29 PM

so if GmOrge has full control over the window, is it impossible to make a HUD?
  • 0

#16 rappybas

rappybas

    GMC Member

  • New Member
  • 678 posts

Posted 30 November 2009 - 08:33 PM

GMOgre has it's own functions for that, as you can see in the examples :(
  • 0

#17 Xilvium

Xilvium

    GMC Member

  • New Member
  • 12 posts

Posted 30 November 2009 - 09:11 PM

Well as for a HUD you should use overlay's.
Remember that this is a layer for GameMaker to USE AN EXISTING ENGINE.
So before you use this DLL I would higly recommend to read the docs and the wiki at www.ogre3d.org as they contain information about the overlay scripts and such.
Also on how to use materials (these are files to indicate the texture(s) and or effects for a specific model or effect).

-Xilvium
  • 0

#18 Caniac

Caniac

    The #1 Caniac

  • New Member
  • 2622 posts

Posted 30 November 2009 - 10:15 PM

wow, this looks nice! Pity it doesn't work on my machine :)
  • 0

#19 Houdini

Houdini

    GMC Member

  • New Member
  • 195 posts

Posted 30 November 2009 - 10:56 PM

wow, this looks nice! Pity it doesn't work on my machine :)

Caniac, if you're receiving an error message or something running the projects, feel free to post and I will help you if I can.
  • 0

#20 emanuel87

emanuel87

    GMC Member

  • New Member
  • 176 posts

Posted 30 November 2009 - 11:11 PM

this is terrific! i've had to compare both normal d3d game maker funcitons, and of these. i found the result astonishing - with this the testing, in a machine with 128mb video ram, has achieved 60 fps! and compared to the other, approximately 40 fps was the difference! that's fantastic!
  • 0

#21 Revel

Revel

    ɹǝqɯǝɯ ɔɯƃ

  • GMC Member
  • 4922 posts
  • Version:GM8

Posted 01 December 2009 - 12:21 AM

Wow! I was actually thinking about porting ogre to GM about a week ago. I am glad to see that this has already been done. Ogre is a great engine!


Good luck on the project.
  • 0

#22 Gecko0307

Gecko0307

    GMC Member

  • New Member
  • 3 posts

Posted 01 December 2009 - 06:52 AM

How to swicth to OpenGL? I use StartOgre3DEngine(global.RENDER_GL) but it doesn't work. It shows the same directx related error.
  • 0

#23 mauge

mauge

    GMC Member

  • New Member
  • 52 posts

Posted 01 December 2009 - 12:05 PM

There seems to be a problem with the scripts, though it's running fine:

Script name "CreateSimpleSpline" is used twice.
Script name "SetCompositionPassStencilFunction" is used twice.


  • 0

#24 Houdini

Houdini

    GMC Member

  • New Member
  • 195 posts

Posted 01 December 2009 - 03:07 PM

How to swicth to OpenGL? I use StartOgre3DEngine(global.RENDER_GL) but it doesn't work. It shows the same directx related error.

Hmmm, it may be because I have both the OpenGL and DX renderer's statically linked into my DLL. I may have to add these as external DLLs to avoid this. I'll have this working for the next release.

There seems to be a problem with the scripts, though it's running fine:

Script name "CreateSimpleSpline" is used twice.
Script name "SetCompositionPassStencilFunction" is used twice.

Thanks, my internal version has this now fixed.

I'll have a small update to GMOgre3D at the end of this week.

- Houdini
  • 0

#25 mauge

mauge

    GMC Member

  • New Member
  • 52 posts

Posted 01 December 2009 - 03:38 PM

Thanks. I forgot to mention that this seems to be the fastest 3D dll for Game Maker. The examples are awesome and >700 FPS is way more than I could reach with a simple 2D game made with GM only. Great work! I hope the documentation will be complete soon, because there is so much to discover.
  • 0

#26 eafg2

eafg2

    GMC Member

  • GMC Member
  • 166 posts

Posted 01 December 2009 - 05:37 PM

Looks awesome, hope that there will be more tutorials soon.
Question:
Posted Image
Is this right?

Edited by eafg2, 01 December 2009 - 05:37 PM.

  • 0

#27 mauge

mauge

    GMC Member

  • New Member
  • 52 posts

Posted 01 December 2009 - 08:16 PM

What do you mean?
  • 0

#28 Houdini

Houdini

    GMC Member

  • New Member
  • 195 posts

Posted 01 December 2009 - 08:25 PM

What do you mean?

He's referring to the fact that if you go half-way under water the reflection at the top of the water is screwed up. The answer to this is both yes and no. It should not be happening, but it's not a bug in GMOgre3D. The GM fresnal project is converted from the fresnal sample app that comes with OGRE and that sample app has that same bug.

I just never took the time to try and figure out how to fix their sample.

- Houdini
  • 0

#29 Xilvium

Xilvium

    GMC Member

  • New Member
  • 12 posts

Posted 01 December 2009 - 08:35 PM

I think it has to do with the RTT (render to texture)'s projection on the plane.
But would it be possible for GM-OGRE3D to use plugin's like ehhr Hydrax and Paged Geometry or do these need to be converted separately?
These are plugins which can be used together with ogre3d itself so if these are ported would they work together or is there something else that prevents this?

-Xilvium
  • 0

#30 Houdini

Houdini

    GMC Member

  • New Member
  • 195 posts

Posted 01 December 2009 - 09:08 PM

I think it has to do with the RTT (render to texture)'s projection on the plane.
But would it be possible for GM-OGRE3D to use plugin's like ehhr Hydrax and Paged Geometry or do these need to be converted separately?
These are plugins which can be used together with ogre3d itself so if these are ported would they work together or is there something else that prevents this?

-Xilvium

Yes, these plugins can be ported over. If using the non-static version of GMOgre3D you'd just need to build in the interface (if any) between the plugin and GM. I already included SkyX (from the maker of Hydrax) in GMOgre3D. I had already planned on including a paged geometry plugin in the near future. There are a few of them out there, so if you know of one that is considered better than the rest, please let me know!

Currently the plan is to fix any bugs that users find in the near future and finish documentation. After that I plan on adding paged geometry, and possibly Hydrax as well.

- Houdini
  • 0




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users