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
PsyCowboy
Halfling
Posts: 74
Joined: Fri Apr 24, 2009 8:01 am

Re: Ogre Procedural v0.1 released!

Post by PsyCowboy »

Congratulation for this project! I'm very interested in it! In my point of view, it's a huge lack of Ogre to don't have such kind of primitives implemented directly into the OgreMain library (but an Ogitor plugin is a good solution, too). It was the first thing I had to implement when I started to work with Ogre. It can very useful to debug, to represent physics primitives, and so on.

Anyway, could you explain which rules did you used to do the UV mapping? Personally, I followed the VRML specifications. It could be nice to have a certain control over this.
Is it possible to set the orientation of the primitives? It could increase performances to don't add a useless scene node to fix the orientation, but to generate directly the right orientation.
What kind of spheres can we generate? IcoSphere and/or UvSpheres?
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 »

PsyCowboy wrote:Congratulation for this project! I'm very interested in it!
Thanks! 8)

I know the "more prefab primitives" feature stayed a long time in the "help wanted" part of Ogre. But procedural geometry may in fact not belong to the Ogre Core, which target is to deliver hardware accelerated graphics and not to produce assets.. Some people on the forum already complain that Ogre Core is too big!
PsyCowboy wrote:Anyway, could you explain which rules did you used to do the UV mapping?
The rules are specific to each primitive, I used what I thought was the most intuitive solution... (even if, for some primitives, it doesn't look so great)
I'll take a look at what VRML says about that, but I would not be surprised if we had quite similar results.
Anyway, more documentation on that in OgreProcedural wouldn't hurt..
PsyCowboy wrote:It could be nice to have a certain control over this.
There are already settings for uTile and vTile, I'll probably add some more (for example, to target a specific part of a texture atlas)
PsyCowboy wrote:Is it possible to set the orientation of the primitives?
Not right now, but I also plan on allowing this.
I don't think the impact on performances would be noticeable (scene nodes are already fairly optimised), but it would simplify the scene building part..
PsyCowboy wrote:What kind of spheres can we generate? IcoSphere and/or UvSpheres?
Yes, both types of spheres are supported.
OgreProcedural - Procedural Geometry for Ogre3D
User avatar
Gohla
Gnoblar
Posts: 10
Joined: Mon Jun 09, 2008 9:43 pm

Re: Ogre Procedural v0.1 released!

Post by Gohla »

Thank you for this library, this is really handy to quickly build objects! I cannot get it to work with the latest Ogre 1.8 (both with Visual Studio 2008 and 2010) though. I used the latest version of your repository on Google code but the only shape that seems to work is the rounded box shape, all other shapes are invisible. It occurs in both your primitives example and in my own program, any idea what might be causing this?
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 »

It should be fixed now.
I usually develop against Ogre 1.7, so I didn't see that one... but I really don't know why it worked with 1.7 and not 1.8, though :roll:
OgreProcedural - Procedural Geometry for Ogre3D
User avatar
Gohla
Gnoblar
Posts: 10
Joined: Mon Jun 09, 2008 9:43 pm

Re: Ogre Procedural v0.1 released!

Post by Gohla »

Thanks, it works now! Very small fix :P I have also submitted a patch that fixes two problems I had in the library, but I've only tested them under Ogre 1.8
User avatar
koirat
Orc
Posts: 446
Joined: Mon Feb 25, 2008 7:56 pm
x 13

Re: Ogre Procedural v0.1 released!

Post by koirat »

Awsome project.
I was looking for something like this some time ago.
This is a block of text that can be added to posts you make. There is a 255 character limit.
User avatar
FrameFever
Platinum Sponsor
Platinum Sponsor
Posts: 414
Joined: Fri Apr 27, 2007 10:05 am

Re: Ogre Procedural v0.1 released!

Post by FrameFever »

would be nice to see such a functionality in the ogre core, you have my vote for it!
User avatar
Zonder
Ogre Magi
Posts: 1168
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England
x 73

Re: Ogre Procedural v0.1 released!

Post by Zonder »

FrameFever wrote:would be nice to see such a functionality in the ogre core, you have my vote for it!
this shouldn't be in ogre core as it's a render not a geometry engine :)
There are 10 types of people in the world: Those who understand binary, and those who don't...
User avatar
FrameFever
Platinum Sponsor
Platinum Sponsor
Posts: 414
Joined: Fri Apr 27, 2007 10:05 am

Re: Ogre Procedural v0.1 released!

Post by FrameFever »

the creation of some basic shapes belongs to me to a core feature, because I want to render some basic shapes.
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 »

In this case you can create meshes and save them as mesh, which are loaded by Ogre.
For online creation maybe this library is usable as add-on. In this case there would be no need for adding to the core.
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.
csb_tom_new
Gnoblar
Posts: 24
Joined: Tue Mar 01, 2011 5:03 am

Re: Ogre Procedural v0.1 released!

Post by csb_tom_new »

Can I use this tool to render cylinder conveniently? You know, now I want to achieve 3D display for water supplying pipelines, I need a tool to conviently generate cylinder and can I make it using this tool?
User avatar
koirat
Orc
Posts: 446
Joined: Mon Feb 25, 2008 7:56 pm
x 13

Re: Ogre Procedural v0.1 released!

Post by koirat »

FrameFever wrote:would be nice to see such a functionality in the ogre core, you have my vote for it!
Mine too.

Some basic shapes are so often needed for example while debugging that it could be a part of a core.
Even when violating some rules.

And making it an add-on will make it harder to get into MOgre. :)
This is a block of text that can be added to posts you make. There is a 255 character limit.
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 »

csb_tom_new wrote:Can I use this tool to render cylinder conveniently? You know, now I want to achieve 3D display for water supplying pipelines, I need a tool to conviently generate cylinder and can I make it using this tool?
http://www.ogre3d.org/forums/viewtopic. ... 73#p415038
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
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 »

FrameFever wrote:would be nice to see such a functionality in the ogre core, you have my vote for it!
My vote goes to not putting it in the core. Although, it should be noted that there is already some geometry generation in the core.

virtual Entity * createEntity (const String &entityName, PrefabType ptype)
Create an Entity (instance of a discrete mesh) from a range of prefab shapes.

where PrefabType is one of:
PrefabType::PT_PLANE
PrefabType::PT_CUBE
PrefabType::PT_SPHERE

I believe these are used in some of the Ogre demo's but they really don't belong in a rendering engine. They are not very useful in a real world application because you have no control over the vertices and texture coordinates.
This procedural geometry generation library on the other hand could be very useful.
Craftwork Games - hand crafted entertainment.
http://www.craftworkgames.com/
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 agree that this doesn't belong in Ogre core.
But I disagree that those three prefabs should be removed. :)
They are very handy for testing purposes, and thus justified. IMO.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
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 »

jacmoe wrote:But I disagree that those three prefabs should be removed. :)
They are very handy for testing purposes, and thus justified. IMO.
Fair point, but in that case should there be more? One could argue that it's justified to have Cylinders, Capsules, Cones, Pyramids and whatever other shapes you can dream up. There's a bit of a double standard here. Whichever way you look at it, some things belong in the "rendering" cateogry and other things belong in the "geometry" category.

To be honest I don't really care if they are removed or not. I just think the rules need to be more clearly defined. There are far too many arguments over what belongs in the core.
Craftwork Games - hand crafted entertainment.
http://www.craftworkgames.com/
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: Ogre Procedural v0.1 released!

Post by spacegaier »

I am with jacmoe here. It is often handy to have those really primitive objects such as a cube, sphere and plane in the core, but everything even slightly more advanced is not core in my eyes, but rather a nice addition/plugin. And OgreProcedural is far too powerful to be considered "primitive" in my eyes.

I understand that this might sound a bit double standard, but I think it makes a lot of sense this way.
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
csb_tom_new
Gnoblar
Posts: 24
Joined: Tue Mar 01, 2011 5:03 am

Re: Ogre Procedural v0.1 released!

Post by csb_tom_new »

Ogre Procedural is rather good! But I would like to know if it can be compiled in VS2005? Or it must be compiled in VS2010?
You know, I have no VS2010 and only have VS2005.
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 and Spacegaier : agreed. Procedural geometry is a *huge* subject, even if, for now, OgreProcedural is still quite small... way to big to get into Ogre's core ;)
csb_tom_new wrote:Ogre Procedural is rather good! But I would like to know if it can be compiled in VS2005? Or it must be compiled in VS2010?
You know, I have no VS2010 and only have VS2005.
Yes, you can use VS2005 : just download the zipped source or clone the repository (see how to do in the "source" tab).
Then use CMake to generate project files for VS2005, and build the "INSTALL" target to create the VS2005 sdk.
OgreProcedural - Procedural Geometry for Ogre3D
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 »

csb_tom_new wrote:Can I use this tool to render cylinder conveniently? You know, now I want to achieve 3D display for water supplying pipelines, I need a tool to conviently generate cylinder and can I make it using this tool?
Look to this post of the previous page. It shows how to create a pipeline with Ogre Procedural.
zarfius wrote:One could argue that it's justified to have Cylinders, Capsules, Cones, Pyramids and whatever other shapes you can dream up.
For this case you can use ManualObject. This is a great class for dynamic creation of 3D objects.
For simple shapes it needs just a few lines of code, but it's much more flexible. (You can specify the size, count of corners, orientation, angles, etc.)
Much information about the ManualObject class I added to the related wiki page.

If somebody needs to create entities with the Ogre Procedural library, I don't think it's much extra effort. Just add the library to the project and add 3 lines of code. (See example on the wiki page.)

Proposal:
Well, I propose to add the library to the official Ogre add-ons. Or add it as optional Ogre "component" (as done for the Terrain and paging component). So everybody has the choice to use or ignore the "extra code".
Nice would be if the Ogre team (or "helpers") offers precompiled binaries for each official released Ogre version. Additionally it would be useful to add these binaries to the OgreSDK. Also a tiny example application would be fine. (So that newcomers quickly can find this functionality.)
koirat wrote:Some basic shapes are so often needed for example while debugging that it could be a part of a core.
Even when violating some rules.
Maybe you like to use tetrahedrons?
I added the source code for a Mogre method to the wiki, which creates a tetrahedron with the ManualObject class. (see here)
koirat wrote:And making it an add-on will make it harder to get into MOgre.
Either we port the code or write a wrapper. (Details we can discuss in the Mogre forum.)
Even if Ogre Procedural is integrated to the Ogre core, there would be a need to create related wrapper code. I suppose it's the same work amount as writing a wrapper for the OP add-on.
PrefabType::PT_PLANE
PrefabType::PT_CUBE
PrefabType::PT_SPHERE

They are very handy for testing purposes, and thus justified.
Oh, sounds great.
I never heard about that, but it seems to be very useful (at least for me and jacmoe :wink: ).
Now I searched and found some information about.
Additionally I created a fresh wiki page called PrefabType. So other people have a better chance to find out that it exists and how to use it.
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
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 »

It already has a decent home at Google.code ??
What more do we want? :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
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 »

All right, a public repository is nice. I didn't remember.
What we want more?
Adding the binary and an example to the Ogre SDK. :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
FrameFever
Platinum Sponsor
Platinum Sponsor
Posts: 414
Joined: Fri Apr 27, 2007 10:05 am

Re: Ogre Procedural v0.1 released!

Post by FrameFever »

yeah, but I would like to see some more basic shapes in Ogre
Argumenting ogre is a render engine and not a geometry engine is the wrong compare.
Of course not all fancy prcedural geometries should be inserted, but some more basic shapes.

For example a cone can be a offten used primitive. When you want to draw a axis tripod or somethink similar.
Then you have to use first a 3d editor an create a mesh, or create a own manual object cone, again and again.

So I would like to see the following primitives:
* Box with option to RoundedBox
* Plane
* Sphere, IcoSphere
* Cylinder with option to Cone
* Torus, Torus knot (hey sinbads firm :D )
That would be enough.
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 »

Currently the 3 object types are "just" created by an enum.
For many other shapes you need more parameters like orientation, dimension, count of vessel walls, etc.
So an enum wouldn't be enough.

I'm not against adding more primitives.
On the other hand I would like to know what's the disadvantage of use an add-on for creation.
FrameFever wrote: or create a own manual object cone, again and again
In my application I have a method for creation of primitives by ManualObject.
This can be used for creation of as many objects as you like.
It also contains optional params for different sizes and materials.
The method you only need to write once and you can use it for all your Ogre applications. (Additionally it doesn't need much code for simple objects.)

Then it's just one line of code for each creation of an object.
For my wiki example you call just CreateTetrahedron(tetraName, position, size, materialName). That's all.
Additionally with such a "build method" you have much freedom of choice. With Ogre "standard primitives" you get the defined objects without the possebility to adjust it's settings.

If you don't want to build redundant ManualObjects again and again, just create it once and call convertToMesh(). Then you can add several instances of this mesh to your scene. Additionally you can change the material of each mesh instance.

Again: I'm not against adding more primitives.
But I wonder what's it's benifit.
Feel free to show me your point of view.


I still wrote it, but there was no reply about this.
In the case we really want to add classes for creation of such primitives to Ogre.
What's about the idea to add it as optional component?
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.
csb_tom_new
Gnoblar
Posts: 24
Joined: Tue Mar 01, 2011 5:03 am

Re: Ogre Procedural v0.1 released!

Post by csb_tom_new »

Beauty wrote: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:
The effect of pipeline is quite magnificent! I now want to build water supplying pipelines and it is quite appropriate for that. Thank you!
But I have a little question. You know, in water supplying pipelines, there are many equipments such as hydrants. I can use 3DS max to model hydrants. But how can I add hydrants to pipelines and make it perfectly connected? Especially note that pipes are generated via program and hydrants are generated manually. I am quite unfamiliar with computer graphics and a new beginner of OGRE and thus I need your help. Thanks!
Post Reply