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!

Ogre Procedural [v0.2 officially out]

Postby Mikachu » Sun Oct 10, 2010 5:30 pm

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

For this message the author Mikachu has received 8 kudos
User avatar
Mikachu
Gnoll
 
Posts: 602
Kudos: 36
Joined: 28 Jul 2005
Location: Nice, France

Re: Ogre Procedural v0.1 released!

Postby betajaen » Sun Oct 10, 2010 5:32 pm

Wow!

Totally beat me to it with Orangutan. My hat is off to you sir.
User avatar
betajaen
OGRE Moderator
OGRE Moderator
 
Posts: 3446
Kudos: 57
Joined: 18 Jul 2005
Location: Wales, UK

Re: Ogre Procedural v0.1 released!

Postby jacmoe » Sun Oct 10, 2010 5:51 pm

I really dig this! :D
Awesome - fun and useful.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, Fueled by Passion.
Ogre AppWizards - Ogre project wizards for VC 8-10, Code::Blocks and KDevelop.
OgreAssimpConverter - command-line to convert models to Ogre format.
TwOgreGUI - wrapper for AntTweakBar GUI library.
I accept donations | Me on Google+
User avatar
jacmoe
OGRE Moderator
OGRE Moderator
 
Posts: 21024
Kudos: 162
Joined: 22 Jan 2004
Location: Denmark

Re: Ogre Procedural v0.1 released!

Postby betajaen » Sun Oct 10, 2010 6:04 pm

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
betajaen
OGRE Moderator
OGRE Moderator
 
Posts: 3446
Kudos: 57
Joined: 18 Jul 2005
Location: Wales, UK

Re: Ogre Procedural v0.1 released!

Postby Brutal » Sun Oct 10, 2010 6:16 pm

Very nice work :)
**Certified Ogre Professional Amateur
User avatar
Brutal
Greenskin
 
Posts: 142
Kudos: 2
Joined: 07 Nov 2009
Location: Gainesville, FL

Re: Ogre Procedural v0.1 released!

Postby Mikachu » Sun Oct 10, 2010 7:54 pm

Thanks for your positive feedback! :D

@betajaen : looking forward to hearing more about Orangutan, looks great :)
OgreProcedural - Procedural Geometry for Ogre3D
User avatar
Mikachu
Gnoll
 
Posts: 602
Kudos: 36
Joined: 28 Jul 2005
Location: Nice, France

Re: Ogre Procedural v0.1 released!

Postby Akis » Mon Oct 11, 2010 1:39 am

Really great job !
Akis
Gnoblar
 
Posts: 24
Kudos: 0
Joined: 02 Jul 2010

Re: Ogre Procedural v0.1 released!

Postby jacmoe » Mon Oct 11, 2010 1:53 am

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.
Ogre AppWizards - Ogre project wizards for VC 8-10, Code::Blocks and KDevelop.
OgreAssimpConverter - command-line to convert models to Ogre format.
TwOgreGUI - wrapper for AntTweakBar GUI library.
I accept donations | Me on Google+
User avatar
jacmoe
OGRE Moderator
OGRE Moderator
 
Posts: 21024
Kudos: 162
Joined: 22 Jan 2004
Location: Denmark

Re: Ogre Procedural v0.1 released!

Postby Praetor » Mon Oct 11, 2010 4:51 am

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
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
 
Posts: 3335
Kudos: 3
Joined: 21 Jun 2005
Location: Rochester, New York, US

Re: Ogre Procedural v0.1 released!

Postby Mikachu » Mon Oct 11, 2010 8:55 am

@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
User avatar
Mikachu
Gnoll
 
Posts: 602
Kudos: 36
Joined: 28 Jul 2005
Location: Nice, France

Re: Ogre Procedural v0.1 released!

Postby grol » Mon Oct 11, 2010 10:09 am

nice work!

I will try it!
grol
Gnoblar
 
Posts: 9
Kudos: 0
Joined: 07 Apr 2010

Re: Ogre Procedural v0.1 released!

Postby Klaim » Mon Oct 11, 2010 11:05 am

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.
User avatar
Klaim
Old One
 
Posts: 2436
Kudos: 57
Joined: 11 Sep 2005
Location: Lille, France

Re: Ogre Procedural v0.1 released!

Postby Oogst » Mon Oct 11, 2010 1:02 pm

Where is the Teapot primitive? Kind of a standard geometrical primitive for lots of purposes! :D
blog.oogst3d.net: my dev blog and portfolio
Ronimo Games: my game dev company
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/PS3/PS4)
Swords & Soldiers: side-scrolling RTS (PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
Oogst
OGRE Expert User
OGRE Expert User
 
Posts: 1072
Kudos: 29
Joined: 29 Mar 2004
Location: the Netherlands

Re: Ogre Procedural v0.1 released!

Postby Mikachu » Mon Oct 11, 2010 1:56 pm

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
User avatar
Mikachu
Gnoll
 
Posts: 602
Kudos: 36
Joined: 28 Jul 2005
Location: Nice, France

Re: Ogre Procedural v0.1 released!

Postby Oogst » Mon Oct 11, 2010 2:04 pm

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.
blog.oogst3d.net: my dev blog and portfolio
Ronimo Games: my game dev company
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/PS3/PS4)
Swords & Soldiers: side-scrolling RTS (PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
Oogst
OGRE Expert User
OGRE Expert User
 
Posts: 1072
Kudos: 29
Joined: 29 Mar 2004
Location: the Netherlands

Re: Ogre Procedural v0.1 released!

Postby mikeInside » Sat Oct 16, 2010 4:20 am

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
mikeInside
Kobold
 
Posts: 37
Kudos: 0
Joined: 26 Apr 2007
Location: Sydney, Australia

Re: Ogre Procedural v0.1 released!

Postby zarfius » Sat Oct 16, 2010 10:43 pm

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/

For this message the author zarfius has received kudos
User avatar
zarfius
Gnome
 
Posts: 367
Kudos: 13
Joined: 03 Jan 2007
Location: Brisbane, Australia

Re: Ogre Procedural v0.1 released!

Postby al2950 » Tue Oct 19, 2010 5:45 pm

:shock: Have only just noticed this! Very nice work. Have just looked at the code as well and it is very clean :D
al2950
Orc
 
Posts: 457
Kudos: 18
Joined: 11 Dec 2008
Location: Bristol, UK

Re: Ogre Procedural v0.1 released!

Postby Beauty » Mon Jan 10, 2011 3:17 pm

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: 766
Kudos: 40
Joined: 10 Oct 2007
Location: Germany

Re: Ogre Procedural v0.1 released!

Postby Beauty » Mon Jan 10, 2011 3:21 pm

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
Beauty
OGRE Community Helper
OGRE Community Helper
 
Posts: 766
Kudos: 40
Joined: 10 Oct 2007
Location: Germany

Re: Ogre Procedural v0.1 released!

Postby Mikachu » Tue Jan 11, 2011 11:07 am

@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

For this message the author Mikachu has received kudos
User avatar
Mikachu
Gnoll
 
Posts: 602
Kudos: 36
Joined: 28 Jul 2005
Location: Nice, France

Re: Ogre Procedural v0.1 released!

Postby makiolo » Sat Jan 15, 2011 1:02 pm

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:

screenshot01152011_125011439.jpg
Right Shape is buggy
makiolo
Kobold
 
Posts: 25
Kudos: 0
Joined: 19 Feb 2008

Re: Ogre Procedural v0.1 released!

Postby Mikachu » Fri Jan 21, 2011 11:34 am

@makiolo : thanks for pointing out this regression, it should be fixed now...
OgreProcedural - Procedural Geometry for Ogre3D
User avatar
Mikachu
Gnoll
 
Posts: 602
Kudos: 36
Joined: 28 Jul 2005
Location: Nice, France

Re: Ogre Procedural v0.1 released!

Postby tdev » Sat Jan 22, 2011 2:26 pm

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
tdev
Silver Sponsor
Silver Sponsor
 
Posts: 244
Kudos: 14
Joined: 12 Apr 2007
Location: Germany

Re: Ogre Procedural v0.1 released!

Postby Mikachu » Sun Jan 23, 2011 3:22 pm

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
User avatar
Mikachu
Gnoll
 
Posts: 602
Kudos: 36
Joined: 28 Jul 2005
Location: Nice, France

Next

Return to Showcase

Who is online

Users browsing this forum: No registered users and 4 guests