Ogre Procedural [v0.2 officially out]

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
User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France
x 35

Ogre Procedural [v0.2 officially out]

Post by Mikachu »

OgreProcedural 0.2 is out now!
View announcement here


OgreProcedural now has its own dedicated section in the Ogre Addons Forum. Please use it from now on for all questions and discussion! Thank you.

Ogre Procedural is a procedural geometry library.

Version 0.1 focuses on building mesh primitives, the ultimate goal would be to generate complex scenes, such as entire cities...

Screenshots
Image
Image

Features
It can build the following primitives :
  • Box, RoundedBox
  • Plane
  • Sphere, IcoSphere
  • Cylinder, Tube, Capsule
  • Cone
  • Torus, Torus knot
Next item on my TODO list is the support of extrusion and revolution based meshes..

How can I use it?
Downloads are available on the project page.

Precompiled binaries are provided for VS2010 and for CB+MingW (linux support may come later, but I don't have a Mac...)
Source package is also available for all platforms (CMake based project files)

This is a sample code for generating a sphere :

Code: Select all

//Initialisation
Procedural::Root::getInstance()->sceneManager = mSceneMgr;
//Create a sphere
Procedural::SphereGenerator().setRadius(5.f).setUTile(.5f).generate("mySphere");
mSceneMgr->createEntity("mySphere");
... comments and suggestions appreciated! :)
Last edited by spacegaier on Sun Jan 13, 2013 10:46 pm, edited 2 times in total.
Reason: added link to new subforum
OgreProcedural - Procedural Geometry for Ogre3D
User avatar
betajaen
OGRE Moderator
OGRE Moderator
Posts: 3447
Joined: Mon Jul 18, 2005 4:15 pm
Location: Wales, UK
x 58
Contact:

Re: Ogre Procedural v0.1 released!

Post by betajaen »

Wow!

Totally beat me to it with Orangutan. My hat is off to you sir.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Ogre Procedural v0.1 released!

Post by jacmoe »

I really dig this! :D
Awesome - fun and useful.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
betajaen
OGRE Moderator
OGRE Moderator
Posts: 3447
Joined: Mon Jul 18, 2005 4:15 pm
Location: Wales, UK
x 58
Contact:

Re: Ogre Procedural v0.1 released!

Post by betajaen »

I agree. My vision with Orangutan is so you can quickly make up a Scene using cubes and other primitives, like you do in Hammer or Unreal Editor.

I've briefly looked at the source of Ogre Procedural and Orangutan does things differently, so it isn't totally alike. But Ogre Procedural has more different types of brushes than Orangutan can. ;)
User avatar
Brutal
Greenskin
Posts: 142
Joined: Sat Nov 07, 2009 1:51 pm
Location: Gainesville, FL
x 2
Contact:

Re: Ogre Procedural v0.1 released!

Post by Brutal »

Very nice work :)
**Certified Ogre Professional Amateur
User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France
x 35

Re: Ogre Procedural v0.1 released!

Post by Mikachu »

Thanks for your positive feedback! :D

@betajaen : looking forward to hearing more about Orangutan, looks great :)
OgreProcedural - Procedural Geometry for Ogre3D
Akis
Gnoblar
Posts: 24
Joined: Fri Jul 02, 2010 8:31 pm

Re: Ogre Procedural v0.1 released!

Post by Akis »

Really great job !
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Ogre Procedural v0.1 released!

Post by jacmoe »

I bet we can make an Ogitor plugin for this! :)
One small step towards RAD scene building.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3335
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US
x 3
Contact:

Re: Ogre Procedural v0.1 released!

Post by Praetor »

Really cool. Would you consider investigating adding CSG with the primitives? That could make it extremely powerful.
Game Development, Engine Development, Porting
http://www.darkwindmedia.com
User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France
x 35

Re: Ogre Procedural v0.1 released!

Post by Mikachu »

@jacmoe : Actually, I was thinking that I would need a GUI editor at some point of the project, and didn't want to do it from scratch... so I was already considering creating an Ogitor plugin 8)
I won't have time to work on it right now, though, but I would definitely like to see someone starting to work on it :D

@praetor : At first, I thought I would do my best to stay away from CSG, because I found it too close to the "Polygon Soup" level, IMHO.
On second thought, I might not be able to build anything solid without it, so it will probably get included into my TODO list :)
OgreProcedural - Procedural Geometry for Ogre3D
grol
Gnoblar
Posts: 9
Joined: Wed Apr 07, 2010 9:27 am

Re: Ogre Procedural v0.1 released!

Post by grol »

nice work!

I will try it!
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Re: Ogre Procedural v0.1 released!

Post by Klaim »

Wow that's excellent! I use a lot of procedural primitives like that in my game but had to hack the procedural generation functions in nasty ways, thinking to clean and separate it later in a lib.
But you got farther than I so it might be a good idea to just use yours and add features on it.
Oogst
OGRE Expert User
OGRE Expert User
Posts: 1067
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
x 43
Contact:

Re: Ogre Procedural v0.1 released!

Post by Oogst »

Where is the Teapot primitive? Kind of a standard geometrical primitive for lots of purposes! :D
My dev blog
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France
x 35

Re: Ogre Procedural v0.1 released!

Post by Mikachu »

Oogst wrote:Where is the Teapot primitive? Kind of a standard geometrical primitive for lots of purposes! :D
True! Teapot is always the most useful primitive in real world situations :lol:
Seriously, it could be a good test case for extrusion/revolution meshes, based on bezier splines...
OgreProcedural - Procedural Geometry for Ogre3D
Oogst
OGRE Expert User
OGRE Expert User
Posts: 1067
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
x 43
Contact:

Re: Ogre Procedural v0.1 released!

Post by Oogst »

The teapot bascially comes for free if you already support bezier patches. But are you planning on supporting those? I wouldn't really call bezier patches any more 'primitives' than triangles, after all.
My dev blog
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
User avatar
mikeInside
Kobold
Posts: 37
Joined: Thu Apr 26, 2007 5:46 pm
Location: Sydney, Australia
Contact:

Re: Ogre Procedural v0.1 released!

Post by mikeInside »

Heh I've also been working on procedural mesh generation, though in my case the end-goal is to create virtual dinosaurs. It's basically all about generating and deforming primitives. Funny how there's a bunch of people tackling essentially the same problem all of a sudden. When it rains it pours and all that :p
User avatar
zarfius
Gnome
Posts: 367
Joined: Wed Jan 03, 2007 12:44 pm
Location: Brisbane, Australia
x 13
Contact:

Re: Ogre Procedural v0.1 released!

Post by zarfius »

mikeInside wrote:Funny how there's a bunch of people tackling essentially the same problem all of a sudden.
I've noticed this seems to happen a lot around here. I've got a few theories:
- One idea often leads to another (for example, someone creates a GUI.. then people need a GUI editor)
- One technology leads to another (for example, some prerequisite of another technology is created)
- There could be a requirement in another project (for example, geomerty edtiors can make use of procedural libraries)
- Maybe there's a competative nature (people see a project and believe they can improve on it by creating there own)
- Related to the theory above, people like an idea but don't agree with every aspect of it so create an alternative version
- Or maybe it's just chaos theory ;)

In any case I think this is a great library and I'll be keeping an eye on it :)
Craftwork Games - hand crafted entertainment.
http://www.craftworkgames.com/
al2950
OGRE Expert User
OGRE Expert User
Posts: 1227
Joined: Thu Dec 11, 2008 7:56 pm
Location: Bristol, UK
x 157

Re: Ogre Procedural v0.1 released!

Post by al2950 »

:shock: Have only just noticed this! Very nice work. Have just looked at the code as well and it is very clean :D
User avatar
Beauty
OGRE Community Helper
OGRE Community Helper
Posts: 767
Joined: Wed Oct 10, 2007 2:36 pm
Location: Germany
x 39
Contact:

Re: Ogre Procedural v0.1 released!

Post by Beauty »

Today I searched for something else and found this interesting topic/library.
I think this can be so useful that I created the new wiki page Ogre Procedural Geometry Library just for this library.
So there is a better chance that people discover it. :wink:



By the way - last week I also worked on a procedural geometry creation class.
My class is for generating a pipeline.
It will be created by a list of veer points, and a few parameters like diameter, vessel wall amount, colour, etc.
The mathematic basics for this were not easy, but I got it. On yesterday I did finish the core functionality of my pipeline class. Now I will add an import/export and a tiny editor.
The background is a simulation environment for pipeline tracking, which will be done by autonomous underwater vehicles (AUV, they work independent and need no operator). The target is e.g. pipeline inspections to find damages or detect corrosions.

Unfortunately I can't publish the source code of my pipeline class, because it's part of a closed-source scientific simulation application.
But if you want to extend your library for something similar, I can help you with specific mathematical details.

Here are some screen shots of a test pipeline which has 30 vessel walls:

Normal views
Image
Image

Debug modes
Image
Image

A subdivided pipeline. (Automatically added veer points for long pipe sements.)
Image

It's also looking fine for a count of just 6 vessel walls, but I don't want to bore you with more pictures :wink:
Help to add information to the wiki. Also tiny edits will let it grow ... :idea:
Add your country to your profile ... it's interesting to know from where of the world you are.
User avatar
Beauty
OGRE Community Helper
OGRE Community Helper
Posts: 767
Joined: Wed Oct 10, 2007 2:36 pm
Location: Germany
x 39
Contact:

Re: Ogre Procedural v0.1 released!

Post by Beauty »

If you (Mikachu) add more features to your library, please update the wiki page (in Ogre wiki).
Help to add information to the wiki. Also tiny edits will let it grow ... :idea:
Add your country to your profile ... it's interesting to know from where of the world you are.
User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France
x 35

Re: Ogre Procedural v0.1 released!

Post by Mikachu »

@Beauty : thanks for creating the wiki page. I'll update that as soon as v0.2 is released. :)

Regarding your "pipeline generator", there's already something like that in OgreProcedural's tip (I called it "extruder").

It would give something like this in user code:

Code: Select all

Procedural::Path p = Procedural::BezierPath().addPoint(0,5,0).addPoint(0,4,10).addPoint(10,5,10).close().realizePath();
Procedural::Shape s = Procedural::CircleShape().setRadius(1.5).realizeShape();
Procedural::Extruder().setExtrusionPath(&p).setShapeToExtrude(&s).realizeMesh("extrudedMesh");
However, it's not yet ready to get stamped "v0.2", there are still some features to implement, as well as a lot of cleanup and testing to do...
OgreProcedural - Procedural Geometry for Ogre3D
makiolo
Kobold
Posts: 25
Joined: Tue Feb 19, 2008 1:55 pm

Re: Ogre Procedural v0.1 released!

Post by makiolo »

It works in linux! (with buggy in one shape). I need change 1 line:

--- a/library/include/ProceduralTriangulator.h Tue Jan 04 11:37:39 2011 +0100
+++ b/library/include/ProceduralTriangulator.h Sat Jan 15 12:57:35 2011 +0100
@@ -40,7 +40,8 @@


class _ProceduralExport Triangulator
-{
+{
+public:
struct Triangle;
typedef std::list<Triangle> DelaunayTriangleBuffer;

You can see problem in right shape:
Right Shape is buggy
Right Shape is buggy
User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France
x 35

Re: Ogre Procedural v0.1 released!

Post by Mikachu »

@makiolo : thanks for pointing out this regression, it should be fixed now...
OgreProcedural - Procedural Geometry for Ogre3D
User avatar
tdev
Silver Sponsor
Silver Sponsor
Posts: 244
Joined: Thu Apr 12, 2007 9:21 pm
Location: Germany
x 14

Re: Ogre Procedural v0.1 released!

Post by tdev »

just had a look at it, the overhead with the buffers is quite something ...

also, you might want to use:

AxisAlignedBox *aab=new AxisAlignedBox();
aab->merge(Vector3(...)); // for each position
manual->setBoundingBox(*aab);
User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France
x 35

Re: Ogre Procedural v0.1 released!

Post by Mikachu »

tdev wrote:just had a look at it, the overhead with the buffers is quite something ...
Indeed... :(
There was no intermediate buffers in 0.1, but for future complex operations like CSG, directly outputing to hardware buffers may not be the right way to do it : from what I can understand, HW buffers are preferrably used for write only operations (there is a read/write mode, but I don't know the potential impact on runtime performance..)
If possible, I'll see if I can make these intermediate buffers optional in the future...
tdev wrote:also, you might want to use:

AxisAlignedBox *aab=new AxisAlignedBox();
aab->merge(Vector3(...)); // for each position
manual->setBoundingBox(*aab);
Didn't know about that function, I'm using it now. :)
OgreProcedural - Procedural Geometry for Ogre3D
Post Reply