Automatic Mesh Level of Detail Management System

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
Post Reply
sajty
Google Summer of Code Student
Google Summer of Code Student
Posts: 47
Joined: Tue Sep 27, 2011 9:26 am
x 50

Automatic Mesh Level of Detail Management System

Post by sajty »

Hi!
I was a GSoC student at WorldForge and I was working on Ember client, which is using Ogre and mostly on Ogre related stuff, so I decided to share to the Ogre community too.
First, I wanted to wait, until I had time to create a separate sample of Ogre related improvements, but I decided to post now and do the sample later. (I will have some time on end of January)
I was working on Automatic Mesh Level of Detail Management System, which will generate low poly models on the fly for any kind of mesh without any preconfiguration.
You may know that Ogre can generate low poly models with Ogre::ProgressiveMesh, however it has lot of flaws, which I have improved on!

So in short, the improvements to ProgressiveMesh:
-9x speedup in generation time.
-Much better quality of the low poly models.
-More customizable interface: You can configure every Lod level separately and you can reduce based on collapse cost too.
-Generate Lod levels in a background thread and let it be injected automatically if its ready.
-Developed a Lod configuration, which works on any kind of mesh.

Here is a longer description of improvements:
http://sajty.elementfx.com/progressivemesh/GSoC2012.pdf

We use it on every mesh loaded into the game and generate Lod levels at runtime.
So it just works without any need for maintance.

Here is an example of a 95% reduced male.mesh with Ogre::ProgressiveMesh.
Image
Here is the same reduction with my implementation:
Image

We use (bounding sphere radius)/32 collapse cost for furthest away Lod level, shown here:
http://sajty.elementfx.com/progressivem ... tView.html
I don't say its perfect, but it produces acceptable output for 95% of the meshes.

Here is a short video:
[vimeo]50998178[/vimeo]

I was thinking on merging my work into Ogre. What do you think about that?

Source: https://github.com/worldforge/ember/tre ... s/ogre/lod

Update 1:
Started to merge it into Ogre3D 1.9.
win32 binaries: http://sajty.elementfx.com/progressivem ... Sample.zip
Discussion: http://www.ogre3d.org/forums/viewtopic.php?f=4&t=76309
Last edited by sajty on Sun Feb 03, 2013 12:09 am, edited 1 time in total.
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
x 216

Re: Automatic Mesh Level of Detail Management System

Post by scrawl »

Awesome work.. kudo was given!
I was thinking on merging my work into Ogre.
Of course!
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 99
Contact:

Re: Automatic Mesh Level of Detail Management System

Post by Wolfmanfx »

Looks great!
1.create a new fork of the ogre project on bitbucket
2. Commit your changes to that fork
3. Make a pull request so we can review it and apply it when everything looks great
User avatar
Lee04
Minaton
Posts: 945
Joined: Mon Jul 05, 2004 4:06 pm
Location: Sweden
x 1

Re: Automatic Mesh Level of Detail Management System

Post by Lee04 »

Nice very solid work!
Ph.D. student in game development
User avatar
assalier
Kobold
Posts: 38
Joined: Fri Aug 28, 2009 7:02 pm
x 1

Re: Automatic Mesh Level of Detail Management System

Post by assalier »

Looks really nice, exactly the stuff i was looking for to improve the MMOG i contribute to!
Pulas
Halfling
Posts: 61
Joined: Sat Oct 29, 2011 9:39 am

Re: Automatic Mesh Level of Detail Management System

Post by Pulas »

Wow, that's really something I've been looking for!
drwbns
Orc Shaman
Posts: 788
Joined: Mon Jan 18, 2010 6:06 pm
Location: Costa Mesa, California
x 24

Re: Automatic Mesh Level of Detail Management System

Post by drwbns »

This seriously looks amazing. Great job. 8x the speed gain? Wow.
starseeker
Gnoblar
Posts: 5
Joined: Fri May 29, 2009 7:46 pm

Re: Automatic Mesh Level of Detail Management System

Post by starseeker »

Has there been any progress on integrating these improvements back into OGRE proper?
User avatar
saejox
Goblin
Posts: 260
Joined: Tue Oct 25, 2011 1:07 am
x 36

Re: Automatic Mesh Level of Detail Management System

Post by saejox »

GPL. :(
Nimet - Advanced Ogre3D Mesh/dotScene Viewer
asPEEK - Remote Angelscript debugger with html interface
ogreHTML - HTML5 user interfaces in Ogre
starseeker
Gnoblar
Posts: 5
Joined: Fri May 29, 2009 7:46 pm

Re: Automatic Mesh Level of Detail Management System

Post by starseeker »

Ah, so I see. Is there any willingness on the part of the author(s) to re-license the LoD bit for OGRE? If the separation is reasonable clean that should be possible...
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 99
Contact:

Re: Automatic Mesh Level of Detail Management System

Post by Wolfmanfx »

Progressive mesh is based on ogre and ogre is MIT you cannot make a derivate work gpl or whatever (i am just talking about the progessive mesh file which is part of ogre)
User avatar
Azatoth
Gnome
Posts: 327
Joined: Sat Jul 10, 2004 6:46 pm
Location: Sweden
x 4
Contact:

Re: Automatic Mesh Level of Detail Management System

Post by Azatoth »

Wolfmanfx wrote:Progressive mesh is based on ogre and ogre is MIT you cannot make a derivate work gpl or whatever (i am just talking about the progessive mesh file which is part of ogre)
This is incorrect; in multiple ways.

First, you're absolutely incorrect that "you cannot make a derivative work gpl or whatever" if the original work is MIT licensed. The concept of "derivate work" is a legal one, and there's no restriction whatsoever in the MIT license that you cannot apply any license you want on any derivative works. In fact, this is one of the primary reasons why Ogre switched from LGPL to MIT (to allow for statically linked derivative works with arbitrary licenses (for example binaries running on consoles)).

However, I'm guessing that by "derivative work" you actually meant "alterations to the original work". Which this is, since ProgressiveMeshGenerator.cpp contains code lifted from the Ogre version.
As you can see that file is dual-licensed under both the original MIT license as well as an additional GPLv3 license. And do note that the MIT license explicitly grants the right to "sublicense" the work, as long as the original MIT license applies. It's therefore perfectly ok to do as has been done, with the file being offered both under a GPL and a MIT license.
For practical purposes the GPL license in this case is superflous though, since the MIT license is more permissive. I'm guessing Peter wanted to harmonize the license with the rest of Ember.

So, sorry if I appear harsh, but I think that it's important that no incorrect information about licensing is spread. It can be a tricky subject, and there do exists a lot of misinformation.

Now, the larger question was whether all parts of the LOD framework could be licensed under MIT so that it could be included into Ogre.
This should absolutely be done; from the start we aimed at writing it in a way which would allow for easy inclusion into Ogre. I'm guessing that Peter just forgot to add MIT licenses to the related files and haven't gotten around to fixing it. We'll take a look.
Ember, GPL virtual world client.
Development blog
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 99
Contact:

Re: Automatic Mesh Level of Detail Management System

Post by Wolfmanfx »

Hi,

NP thx for the clarification on that - i thought that you re-licensed that complete file as GPL only but i did not recognized that it has a dual license (but i am no expert at all on this topic).
Anyway i would like to see that work integrated if i can help on that or if you can make a fork and create a pull request that would be great.
sajty
Google Summer of Code Student
Google Summer of Code Student
Posts: 47
Joined: Tue Sep 27, 2011 9:26 am
x 50

Re: Automatic Mesh Level of Detail Management System

Post by sajty »

I've just got contacted that there were new messages on this thread.
Sorry for not responding.
I will have some time very soon (0-2 weeks) to focus on integrating this into Ogre. :)

However if you can't wait, here is the code relicensed. :)
https://github.com/sajty/ember/tree/rel ... s/ogre/lod
Nehon
Gnoblar
Posts: 1
Joined: Sun Jun 02, 2013 10:16 pm

Re: Automatic Mesh Level of Detail Management System

Post by Nehon »

Hello, I'm from the jMonkeyEngine core team.
I would like to thank you for this gem, I translated it to java for our engine and it works pretty well.
I don't know if it has been merged with Ogre, but the results are really better than the previous Lod generation.

We rely a lot on Ogre's art pipeline through blender and Max exporters.Until now, we used ogre command line tool to generate lods on our models.
Also there is fair share of our engine's core that is inspired from Ogre.
So thanks to the whole community, your work is inspiring.
Here is the announcement on our forum http://hub.jmonkeyengine.org/forum/topi ... generator/
And here is the java code if you're interested https://code.google.com/p/jmonkeyengine ... rator.java
sajty
Google Summer of Code Student
Google Summer of Code Student
Posts: 47
Joined: Tue Sep 27, 2011 9:26 am
x 50

Re: Automatic Mesh Level of Detail Management System

Post by sajty »

Hi!
Nice to see it translated to java!
Hope you enjoy it. :)

It's merged a long time ago into Ogre v1.9: https://bitbucket.org/sajty/ogre/commits/branch/v1-9
The Ogre 1.9 version is also having the autoconfiguration and background threading included.
Here is the topic of the merge: http://www.ogre3d.org/forums/viewtopic.php?f=4&t=76309

Also in GSoC 2013 I will continue improving it!
Follow the upcoming improvements: http://www.ogre3d.org/forums/viewtopic.php?f=13&t=77319
Google Summer of Code 2013 Student
Topic: "Progressive mesh improvements"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Murat Sari
hksuifeng
Gnoblar
Posts: 3
Joined: Thu Aug 29, 2013 3:48 am

Re: Automatic Mesh Level of Detail Management System

Post by hksuifeng »

Can you put the source code of your demo program?
My mailbox is: <removed_by_mod>!
Thank you for your help! :o
Last edited by spacegaier on Tue Dec 17, 2013 10:34 am, edited 1 time in total.
Reason: Publicly posting mail addresses is not so smart
sajty
Google Summer of Code Student
Google Summer of Code Student
Posts: 47
Joined: Tue Sep 27, 2011 9:26 am
x 50

Re: Automatic Mesh Level of Detail Management System

Post by sajty »

Hi!

The features are merged with Ogre 1.9.
However Ogre 1.10 has even more awesome Lod Generator features (My GSoC work), including better quality and new interface!
Check out the usage guide: http://www.ogre3d.org/tikiwiki/MeshLod
You have examples for Ogre 1.10 in MeshLod sample, MeshLodTests, MeshSerializerTests, PlayPen. Check them out!
You can use Ogre 1.10 to generate your LOD levels only, then convert them to older mesh format with OgreMeshUpgrader.

If you still have any questions feel free to ask. :)

Peter
Google Summer of Code 2013 Student
Topic: "Progressive mesh improvements"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Murat Sari
hksuifeng
Gnoblar
Posts: 3
Joined: Thu Aug 29, 2013 3:48 am

Re: Automatic Mesh Level of Detail Management System

Post by hksuifeng »

Thanks!But Ican't find 1.10 In the official website.
Could you tell me where can i find it.
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Re: Automatic Mesh Level of Detail Management System

Post by Klaim »

It's not released yet. You can get the current state of this release in the source repository, in the 1.10.x branch.
sajty
Google Summer of Code Student
Google Summer of Code Student
Posts: 47
Joined: Tue Sep 27, 2011 9:26 am
x 50

Re: Automatic Mesh Level of Detail Management System

Post by sajty »

hksuifeng wrote:Thanks!But Ican't find 1.10 In the official website.
Could you tell me where can i find it.
From now on latest Ogre 1.X branch is the "default" branch.
This wasn't the case in the past.
You can download v1.10 with latest changes from here:
https://bitbucket.org/sinbad/ogre/get/default.zip
Google Summer of Code 2013 Student
Topic: "Progressive mesh improvements"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Murat Sari
pep3006
Gnoblar
Posts: 5
Joined: Fri Apr 15, 2016 9:33 am

Re: Automatic Mesh Level of Detail Management System

Post by pep3006 »

Hi,

Is it possible to have the sources of MeshLODSample please ?

Thanks
Post Reply