No problem, I'm a sort of tester!Mikachu wrote:Oops, you're right!
I didn't see that... and the compiler didn't tell me it's weird (returning a private type from a public method)
Ogre Procedural [v0.2 officially out]
-
- Kobold
- Posts: 30
- Joined: Sun Dec 11, 2011 6:00 pm
Re: Ogre Procedural v0.1 released!
- tdev
- Silver Sponsor
- Posts: 244
- Joined: Thu Apr 12, 2007 9:21 pm
- Location: Germany
- x 14
Re: Ogre Procedural v0.1 released!
just for documentation [so i dont forget ], need to use this lib for svg parsing: http://code.google.com/p/nanosvg/
looks well fitted for our purpose
looks well fitted for our purpose
working on: http://rigsofrods.com | OgreProcedual (project) | Caelum (project) | Paged Geometry (project) | OISB (project) | OgreAngelscript | OgreMeshTool
-
- Goblin
- Posts: 203
- Joined: Sun Aug 23, 2009 8:30 am
- x 3
Re: Ogre Procedural v0.1 released!
I have troubles with applying materials to procedural meshes. My log says my material has been parsed, without errors, still the log says
Code: Select all
12:40:17: Can't assign material to SubEntity of Ogre/MO3 because this Material does not exist. Have you forgotten to define it in a .material script?
- Mikachu
- Gnoll
- Posts: 603
- Joined: Thu Jul 28, 2005 4:11 pm
- Location: Nice, France
- x 35
Re: Ogre Procedural v0.1 released!
@jokoon : I don't think it's related to the fact that it's a procedural mesh.
Looking at the log message, you're probably trying to apply a material whose name is an empty string...
Looking at the log message, you're probably trying to apply a material whose name is an empty string...
OgreProcedural - Procedural Geometry for Ogre3D
-
- Goblin
- Posts: 203
- Joined: Sun Aug 23, 2009 8:30 am
- x 3
Re: Ogre Procedural v0.1 released!
Is it possible to "carve" 3D shapes ?
I explain:
Let us say I have a cube, and I want to make a box out of it (a box I can put stuff in, think like a concave box). So I select another smaller cube, and tell it to carve inside the former cube. I could also have selected another shape, like a cylinder or another shape.
Any other way I can do this ? I could make windows out those simple steps, but I don't know if it's already possible to do that in ogre procedural.
I explain:
Let us say I have a cube, and I want to make a box out of it (a box I can put stuff in, think like a concave box). So I select another smaller cube, and tell it to carve inside the former cube. I could also have selected another shape, like a cylinder or another shape.
Any other way I can do this ? I could make windows out those simple steps, but I don't know if it's already possible to do that in ogre procedural.
- Mikachu
- Gnoll
- Posts: 603
- Joined: Thu Jul 28, 2005 4:11 pm
- Location: Nice, France
- x 35
Re: Ogre Procedural v0.1 released!
The feature you're mentioning is generally referred to as CSG.
Currently, OgreProcedural 0.2 supports CSG in 2D only : you can do CSG between 2D shapes, then extrude it into a 3D mesh, which can cover a few use cases.
3D CSG is not yet supported, I intend to try implementing it for 0.3 ...
Currently, OgreProcedural 0.2 supports CSG in 2D only : you can do CSG between 2D shapes, then extrude it into a 3D mesh, which can cover a few use cases.
3D CSG is not yet supported, I intend to try implementing it for 0.3 ...
OgreProcedural - Procedural Geometry for Ogre3D
-
- Goblin
- Posts: 203
- Joined: Sun Aug 23, 2009 8:30 am
- x 3
Re: Ogre Procedural v0.1 released!
Well I'm really impatient to see it working then !
Best luck to you, must be quite complicated to implement such a feature
I wonder if I could be any help, I'm not the best coder out there, but I have time and this really is a feature I'm looking towards to.
One could generate several sorts of building or other objects by a set of rules and parameters, instead of storing full meshes, could be a very powerful way to save space for large levels, and still it would be non-repetitive.
Found this, how good do you think it is ?
http://www.ogre3d.org/forums/viewtopic.php?f=11&t=48028
Best luck to you, must be quite complicated to implement such a feature
I wonder if I could be any help, I'm not the best coder out there, but I have time and this really is a feature I'm looking towards to.
One could generate several sorts of building or other objects by a set of rules and parameters, instead of storing full meshes, could be a very powerful way to save space for large levels, and still it would be non-repetitive.
Found this, how good do you think it is ?
http://www.ogre3d.org/forums/viewtopic.php?f=11&t=48028
- Mikachu
- Gnoll
- Posts: 603
- Joined: Thu Jul 28, 2005 4:11 pm
- Location: Nice, France
- x 35
Re: Ogre Procedural v0.1 released!
Feel free to contribute ... but I doubt that 3D CSG is the easiest feature to implement (I keep a list of features to implement here)jokoon wrote:I wonder if I could be any help, I'm not the best coder out there, but I have time and this really is a feature I'm looking towards to.
Based on my experience on 2D CSG, the general case is not too complex, but there are plenty of edge cases to handle (things like coplanar triangles and the like..). Maybe getting inspiration on the 2D CSG algorithm would be a good way to start (at least, that's how I would do it).
I knew it existed, but never tried it...jokoon wrote:Found this, how good do you think it is ?
viewtopic.php?f=11&t=48028
The "GPL" word may have triggered a red light in my mind
OgreProcedural - Procedural Geometry for Ogre3D
- zarfius
- Gnome
- Posts: 367
- Joined: Wed Jan 03, 2007 12:44 pm
- Location: Brisbane, Australia
- x 13
- Contact:
Re: Ogre Procedural v0.1 released!
I've done some work on 3D CSG recently. It does take a long time and a lot of careful testing. The basic idea to to cut each polygon by the "planes" of any intersecting polygons and then remove any polygons on the inside of the solid shape. You should be able to get an idea of the methods / functions you'll need to implement from that short description
I'm not ready to release my code, but a helpful resource I found in my research is the Java UnBBoolean implementation.
http://unbboolean.sourceforge.net/
I'm not ready to release my code, but a helpful resource I found in my research is the Java UnBBoolean implementation.
http://unbboolean.sourceforge.net/
Craftwork Games - hand crafted entertainment.
http://www.craftworkgames.com/
http://www.craftworkgames.com/
- Mikachu
- Gnoll
- Posts: 603
- Joined: Thu Jul 28, 2005 4:11 pm
- Location: Nice, France
- x 35
Re: Ogre Procedural v0.1 released!
Yeah, that's the method I used for 2D CSG, and that I intended to use for 3D CSG too (seg-seg instead of tri-tri intersections, but it's the same idea..)zarfius wrote:It does take a long time and a lot of careful testing. The basic idea to to cut each polygon by the "planes" of any intersecting polygons and then remove any polygons on the inside of the solid shape.
So I'm not the only one to have had this idea
Even if 2D CSG is probably easier, it was still a big pain to test every possible case, so I guess you're rightzarfius wrote:It does take a long time and a lot of careful testing.
OgreProcedural - Procedural Geometry for Ogre3D
- duststorm
- Minaton
- Posts: 921
- Joined: Sat Jul 31, 2010 6:29 pm
- Location: Belgium
- x 80
- Contact:
Re: Ogre Procedural v0.1 released!
CSG is definitely not a simple thing to do.
But I think it would really be nice to have a reusable component for doing 3D CSG with Ogre meshes.
Also an interesting thought is that two types of CSG could be useful:
- full and accurate CSG (costly)
- fast inaccurate but good enough CSG (for example for breaking objects with physics libraries)
The second thing already exists by the way: Worm's meshsplitter (http://www.ogre3d.org/forums/viewtopic.php?f=11&t=68189)
It's used in OgrePhysX (http://www.ogre3d.org/forums/viewtopic.php?f=5&t=54763)
But I think it would really be nice to have a reusable component for doing 3D CSG with Ogre meshes.
Also an interesting thought is that two types of CSG could be useful:
- full and accurate CSG (costly)
- fast inaccurate but good enough CSG (for example for breaking objects with physics libraries)
The second thing already exists by the way: Worm's meshsplitter (http://www.ogre3d.org/forums/viewtopic.php?f=11&t=68189)
It's used in OgrePhysX (http://www.ogre3d.org/forums/viewtopic.php?f=5&t=54763)
Developer @ MakeHuman.org
-
- Goblin
- Posts: 203
- Joined: Sun Aug 23, 2009 8:30 am
- x 3
Re: Ogre Procedural v0.1 released!
What is the difference between 2D CSG and 3D CSG ? I understand 3D CSG is the one describe on the wikipedia page, but in this case what does 2D CSG look like, can you give me an example ?Mikachu wrote:Yeah, that's the method I used for 2D CSG, and that I intended to use for 3D CSG too (seg-seg instead of tri-tri intersections, but it's the same idea..)zarfius wrote:It does take a long time and a lot of careful testing. The basic idea to to cut each polygon by the "planes" of any intersecting polygons and then remove any polygons on the inside of the solid shape.
So I'm not the only one to have had this ideaEven if 2D CSG is probably easier, it was still a big pain to test every possible case, so I guess you're rightzarfius wrote:It does take a long time and a lot of careful testing.
- Mikachu
- Gnoll
- Posts: 603
- Joined: Thu Jul 28, 2005 4:11 pm
- Location: Nice, France
- x 35
Re: Ogre Procedural v0.1 released!
Here it is...jokoon wrote:What is the difference between 2D CSG and 3D CSG ? I understand 3D CSG is the one describe on the wikipedia page, but in this case what does 2D CSG look like, can you give me an example ?
OgreProcedural - Procedural Geometry for Ogre3D
-
- Goblin
- Posts: 203
- Joined: Sun Aug 23, 2009 8:30 am
- x 3
Re: Ogre Procedural v0.1 released!
discovering the manual... for the first time
thanks !
thanks !
- duststorm
- Minaton
- Posts: 921
- Joined: Sat Jul 31, 2010 6:29 pm
- Location: Belgium
- x 80
- Contact:
Re: Ogre Procedural v0.1 released!
Indeed, I also discovered the manual thanks to that link.
I must say, great job! You don't see that many projects this small and young that have good documentation.
Often one can be glad if there is a good API documentation, you guys already have a manual.
I must say, great job! You don't see that many projects this small and young that have good documentation.
Often one can be glad if there is a good API documentation, you guys already have a manual.
Developer @ MakeHuman.org
-
- Goblin
- Posts: 203
- Joined: Sun Aug 23, 2009 8:30 am
- x 3
Re: Ogre Procedural v0.1 released!
I'm struggling with one problem, and I don't know if I can solve it with this lib.
I know I can now generate a wall with "windows" if I make a shape, but is it possible to make one submesh when I'm done making my geometry ? Procedural is very cool, but if I want to make one huge building with a lot of windows, it's going to be a lot of submeshes and thus a lot of batches, and maybe some performance drop. Is there already some function to attach pieces of geometry, or is it a function I should do myself ?
This also applies if I make several different pieces, for example a house, I'd need 4 walls with their window entrances, one roof, then add wall inside, and then merge everything into one packed submesh if possible.
I know it's a lot to ask, but I did not dive into the code, and I wonder if it's doable or if it's a huge waste of time and if it's doable where should I start ?
PS: just trying to generate something which can compare with this, in less ambitious: http://www.youtube.com/watch?v=9unXHC0WTR0
I know I can now generate a wall with "windows" if I make a shape, but is it possible to make one submesh when I'm done making my geometry ? Procedural is very cool, but if I want to make one huge building with a lot of windows, it's going to be a lot of submeshes and thus a lot of batches, and maybe some performance drop. Is there already some function to attach pieces of geometry, or is it a function I should do myself ?
This also applies if I make several different pieces, for example a house, I'd need 4 walls with their window entrances, one roof, then add wall inside, and then merge everything into one packed submesh if possible.
I know it's a lot to ask, but I did not dive into the code, and I wonder if it's doable or if it's a huge waste of time and if it's doable where should I start ?
PS: just trying to generate something which can compare with this, in less ambitious: http://www.youtube.com/watch?v=9unXHC0WTR0
- Mikachu
- Gnoll
- Posts: 603
- Joined: Thu Jul 28, 2005 4:11 pm
- Location: Nice, France
- x 35
Re: Ogre Procedural v0.1 released!
jokoon wrote:discovering the manual... for the first time
thanks !
Thanksduststorm wrote:Indeed, I also discovered the manual thanks to that link.
I must say, great job! You don't see that many projects this small and young that have good documentation.
Often one can be glad if there is a good API documentation, you guys already have a manual.
Actually, I was planning to announce this manual when 0.2 is officially released.. but glad you like it
That is quite easy, actually (I assume you mean packing as in static geometry, not 3D CSG...)jokoon wrote:Is there already some function to attach pieces of geometry, or is it a function I should do myself ?
Instead of calling realizeMesh() from one generator, you can call addToTriangleBuffer() for each generator.
Then, when your TriangleBuffer is ready, transformToMesh() will create an Ogre Mesh
OgreProcedural - Procedural Geometry for Ogre3D
-
- Goblin
- Posts: 203
- Joined: Sun Aug 23, 2009 8:30 am
- x 3
Re: Ogre Procedural v0.1 released!
I see you can load a spline from a SVG file, did somebody already coded something so it loads a shape ? Or maybe is it simpler than I think it is ?
EDIT: hum I can't find this function in the ogre-procedural repo, but google finds it, I'm confused...
EDIT: hum I can't find this function in the ogre-procedural repo, but google finds it, I'm confused...
Code: Select all
int CubicHermiteSpline2::loadFromSVG(Ogre::String filename, Ogre::String shapeName, bool moveToCenter, Ogre::String group)
- Mikachu
- Gnoll
- Posts: 603
- Joined: Thu Jul 28, 2005 4:11 pm
- Location: Nice, France
- x 35
Re: Ogre Procedural v0.1 released!
That's because loading from SVG, as well as XML format, are only available on the 'serializer' branch.
Soon after 0.2 release, I'll have a closer look at that, and merge what needs to be merged to default branch.
Soon after 0.2 release, I'll have a closer look at that, and merge what needs to be merged to default branch.
OgreProcedural - Procedural Geometry for Ogre3D
- duststorm
- Minaton
- Posts: 921
- Joined: Sat Jul 31, 2010 6:29 pm
- Location: Belgium
- x 80
- Contact:
Re: Ogre Procedural v0.1 released!
That's a good part for adding to the manualMikachu wrote:That is quite easy, actually (I assume you mean packing as in static geometry, not 3D CSG...)
Instead of calling realizeMesh() from one generator, you can call addToTriangleBuffer() for each generator.
Then, when your TriangleBuffer is ready, transformToMesh() will create an Ogre Mesh
Developer @ MakeHuman.org
-
- Halfling
- Posts: 54
- Joined: Wed Jun 04, 2003 7:34 pm
- Location: Calgary, Canada
- Contact:
Re: Ogre Procedural v0.1 released!
Any word on a possible C# (Mogre) port/wrapper?
(aka Meharin) Mogre (1.7.1) .NET 4, GUI: WPF (see https://bitbucket.org/JaredThirsk/mogreinwpf), Net: Lidgren+custom RPC+MessagePack, Sound: MOgreFreeSL, Physics: BulletSharp, with MeshStrider and partially working DebugDraw [and soon Input: MOIS]
- Mikachu
- Gnoll
- Posts: 603
- Joined: Thu Jul 28, 2005 4:11 pm
- Location: Nice, France
- x 35
Re: Ogre Procedural v0.1 released!
Looks like adding documentation to a project is a never ending taskduststorm wrote:That's a good part for adding to the manual
I'll write an introduction to these classes (TriangleBuffer, MeshGenerator...)
By wrapper, do you mean a C wrapper (to make dll with standard ABI) ? I may consider it later... (though if you need it soon, you may as well wrap the calls by yourself, it shouldn't be too hard)Mawen wrote:Any word on a possible C# (Mogre) port/wrapper?
If more than C interface is needed, I have no experience with C#/Mogre, so any contribution in that field would be welcome
OgreProcedural - Procedural Geometry for Ogre3D
-
- Goblin
- Posts: 203
- Joined: Sun Aug 23, 2009 8:30 am
- x 3
Re: Ogre Procedural v0.1 released!
Oh yes please ! If you don't have much time, write about most important classes, or maybe add some comments there and there...Mikachu wrote: Looks like adding documentation to a project is a never ending task
I'll write an introduction to these classes (TriangleBuffer, MeshGenerator...)
I know there are some theory stuff which can be read on wikipedia, like delaunay's.
For example I'm still wondering how you can manage to create a single batch procedurally even when calling several addToTriangleBuffer()... Procedural is cool, but I wonder if it's possible to spam procedures like a dummy and still get single batches for good draw times; by the way I'm not expecting 3D CSG anymore, but it would be really awesome... too good to be true
I peeked and saw you work for some architecture or city software, have you already planned how to make buildings, houses out of shapegenerators ?
- Mikachu
- Gnoll
- Posts: 603
- Joined: Thu Jul 28, 2005 4:11 pm
- Location: Nice, France
- x 35
Re: Ogre Procedural [v0.2 officially out]
After more than one year since the 0.1 release, I’m proud to announce that OgreProcedural 0.2 is now officially out!
I know most of you were already playing on the 0.2 branch of the repo, so it’s not very new news
Anyway, the binary SDKs are available on the project page.
They are built against the 1.8 branch of Ogre, and may or may not work with 1.7.x (if you're looking for an Ogre 1.8 binary SDK, look here)
Here are some of the main new features :
- Extrusion, Lathe
- Triangulation of 2D shapes
- 1D, 2D, and 3D splines with associated operations (for example, CSG applied to shapes)
Some samples of the new features, along with a few explanation are in the brand new user manual.
So, what has taken so long?
Well, first, some features, such as triangulation, were quite hard to implement, and each time I thought the algorithm was right, I found a new case were everything was broken.
I also worked on a few things that are not immediately related to procedural geometry : CMake scripts and continuous integration, user manual generation, visual unit tests...
Overall, I’m not very satisfied about the time gap the 2 releases, I’ll try to do more frequent revisions in the future.
And for those who can’t wait, you can always get a nightly build here, or simply build yourself from the repository
What's next?
I keep a non-exhaustive list of features I'd like to implement.
The ones I will concentrate on for 0.3 are, among other things, about tooling : I've already started defining a file format (partially inspired by tdev's work), and once it's stable enough, I'll try creating an Ogitor plugin to help writing and previewing procedural scripts.
Also, don't hesitate to submit new ideas or suggestions!
I know most of you were already playing on the 0.2 branch of the repo, so it’s not very new news
Anyway, the binary SDKs are available on the project page.
They are built against the 1.8 branch of Ogre, and may or may not work with 1.7.x (if you're looking for an Ogre 1.8 binary SDK, look here)
Here are some of the main new features :
- Extrusion, Lathe
- Triangulation of 2D shapes
- 1D, 2D, and 3D splines with associated operations (for example, CSG applied to shapes)
Some samples of the new features, along with a few explanation are in the brand new user manual.
So, what has taken so long?
Well, first, some features, such as triangulation, were quite hard to implement, and each time I thought the algorithm was right, I found a new case were everything was broken.
I also worked on a few things that are not immediately related to procedural geometry : CMake scripts and continuous integration, user manual generation, visual unit tests...
Overall, I’m not very satisfied about the time gap the 2 releases, I’ll try to do more frequent revisions in the future.
And for those who can’t wait, you can always get a nightly build here, or simply build yourself from the repository
What's next?
I keep a non-exhaustive list of features I'd like to implement.
The ones I will concentrate on for 0.3 are, among other things, about tooling : I've already started defining a file format (partially inspired by tdev's work), and once it's stable enough, I'll try creating an Ogitor plugin to help writing and previewing procedural scripts.
Also, don't hesitate to submit new ideas or suggestions!
OgreProcedural - Procedural Geometry for Ogre3D
-
- Goblin
- Posts: 203
- Joined: Sun Aug 23, 2009 8:30 am
- x 3
Re: Ogre Procedural [v0.2 officially out]
Did you add any samples to show what has been added ?