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!
csb_tom_new
Gnoblar
Posts: 24
Joined: Tue Mar 01, 2011 5:03 am

Re: Ogre Procedural v0.1 released!

Postby csb_tom_new » Tue Mar 08, 2011 1:49 pm

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!
0 x

User avatar
FrameFever
Platinum Sponsor
Platinum Sponsor
Posts: 414
Joined: Fri Apr 27, 2007 10:05 am

Re: Ogre Procedural v0.1 released!

Postby FrameFever » Tue Mar 08, 2011 2:31 pm

Like I said, I dont want that every body has to reinvent the wheel and create his own code for some standard primitives.
And an addon is an addional library, which has to be founded and downloaded and I have to link against it.
Thats why I would like to have it in Ogre directly.

But we can disscur as match as we want, only a vote of the community would be fair.
0 x

User avatar
Zonder
Gargoyle
Posts: 1070
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England

Re: Ogre Procedural v0.1 released!

Postby Zonder » Tue Mar 08, 2011 5:21 pm

jacmoe wrote: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.


Maybe they should be internal only
0 x
There are 10 types of people in the world: Those who understand binary, and those who don't...
My Blog - http://www.dreamwalkerblog.com

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
Contact:

Re: Ogre Procedural v0.1 released!

Postby spacegaier » Tue Mar 08, 2011 5:24 pm

Zonder wrote:Maybe they should be internal only

Why? They cause no harm for those who do not need them, but are beneficial to quite some folks out there, when they quickly need some test objects without firing up a modeling tool.
0 x
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...

User avatar
zarfius
Gnome
Posts: 367
Joined: Wed Jan 03, 2007 12:44 pm
Location: Brisbane, Australia
Contact:

Re: Ogre Procedural v0.1 released!

Postby zarfius » Tue Mar 08, 2011 11:04 pm

Zonder wrote:Maybe they should be internal only


Besides, making them internal wouldn't solve anything as they need to be external for the demos. I doubt they are used internally at all.

There's really only 3 options:
- don't do anything. Easy.
- remove them. Breaking existing code.
- make more of them. Work required.

My guess is that we will go for option 1 because people are inherenty lazy. :-P
0 x
Craftwork Games - hand crafted entertainment.
http://www.craftworkgames.com/

User avatar
zarfius
Gnome
Posts: 367
Joined: Wed Jan 03, 2007 12:44 pm
Location: Brisbane, Australia
Contact:

Re: Ogre Procedural v0.1 released!

Postby zarfius » Wed Mar 09, 2011 12:45 am

csb_tom_new wrote: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!


I don't think you're going to find any kind of magic bullet for this. You're going to have to do some calculations based on your model and the starting position of the pipe. In other words, it really depends on what your hydrant looks like, how you model it in 3DS max and where you want the pipe to connect to it.

You might be able to make your life easier by making the connection point easier to calculate. For example, model it so that the pipe should connect to the very middle of the bounding box, then you can use the BoundingBox property of the Entity multiplied by the Scale of the SceneNode (or something like that). The easiest way is to just get in there and have a go :) If you run into problems, the Using Ogre in Practice forum is a better place to ask questions like this. Nobody is likely to give you the answer directly, but if you have a go yourself and post a code snippet people will be happy to help.
0 x
Craftwork Games - hand crafted entertainment.
http://www.craftworkgames.com/

csb_tom_new
Gnoblar
Posts: 24
Joined: Tue Mar 01, 2011 5:03 am

Re: Ogre Procedural v0.1 released!

Postby csb_tom_new » Wed Mar 09, 2011 10:16 am

Is Ogre Procedural a plug-in for Ogre 3D? How can I use Ogre Procedural in Ogre 3D? I use VS2005 as development platform and what configuration should I make to use Ogre Procedure in Ogre 3D? Can you give me some operation steps? Thank you!
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: Ogre Procedural v0.1 released!

Postby jacmoe » Wed Mar 09, 2011 12:05 pm

Instructions is in the first post of this topic.
Do you expect people to teach you C++ programming?
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
Zonder
Gargoyle
Posts: 1070
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England

Re: Ogre Procedural v0.1 released!

Postby Zonder » Wed Mar 09, 2011 2:48 pm

All I was meaning is if it is somthing that shouldn't be in the API as it's just a utility technically it should be internal. It is of course handy to have them
0 x
There are 10 types of people in the world: Those who understand binary, and those who don't...
My Blog - http://www.This post is suspected as SPAM! If you feel otherwise contact a moderator.

User avatar
NoodlesOnMyBack
Goblin
Posts: 200
Joined: Tue Feb 05, 2008 4:14 am
Location: Buenos Aires, Argentina
Contact:

Re: Ogre Procedural v0.1 released!

Postby NoodlesOnMyBack » Thu Mar 10, 2011 1:53 pm

Nice work, im just implementing this... can you add a debug version for the VS2010 SDK? I dont feel like compiling the thing.
Thanks in advance.
0 x
Image

csb_tom_new
Gnoblar
Posts: 24
Joined: Tue Mar 01, 2011 5:03 am

Re: Ogre Procedural v0.1 released!

Postby csb_tom_new » Sat Mar 12, 2011 9:37 am

Mikachu wrote:@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...


In v0.1, the extruder is not supported and the above 3 codelines cannot be compiled. So personally I'm looking forward to v0.2.
How about the development of v0.2 ?
0 x

afshin
Kobold
Posts: 34
Joined: Wed Nov 10, 2010 11:12 pm
Location: Canada

Re: Ogre Procedural v0.1 released!

Postby afshin » Sat Mar 12, 2011 8:34 pm

csb_tom_new wrote: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::Extrud


How can I use the add point in a loop if I don't want to add each point manually. Lets say I already have a list of vectors in an array and I wanted to go through the list and add it to my Path object.


[/EDIT]

got it ... First generate the path with no points


Code: Select all

Procedural::Path p = Procedural::BezierPath().realizePath();
p.addPoint(2,2,2);
0 x

User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France

Re: Ogre Procedural v0.1 released!

Postby Mikachu » Sat Mar 12, 2011 9:33 pm

csb_tom_new wrote:In v0.1, the extruder is not supported and the above 3 codelines cannot be compiled. So personally I'm looking forward to v0.2.
How about the development of v0.2 ?

V0.2 will be realeased... when it's done! ;)

Seriously, there is still some minor things to implement, plus a lot of extra testing, and I haven't got much free time to work on this recently..
Still, if you don't want to wait for it, get the latest source from the code repository (instructions here: http://code.google.com/p/ogre-procedura ... e/checkout), and compile it.. (if you don't know too much about Mercurial and CMake, just look at the Ogre docs, the building process is quite similar)

afshin wrote:got it ... First generate the path with no points


Code: Select all

Procedural::Path p = Procedural::BezierPath().realizePath();
p.addPoint(2,2,2);

Ouch... not really :o :wink:
It would rather be :

Code: Select all

Procedural::Path p = Procedural::Path().addPoint(2,2,2);
0 x
OgreProcedural - Procedural Geometry for Ogre3D

afshin
Kobold
Posts: 34
Joined: Wed Nov 10, 2010 11:12 pm
Location: Canada

Re: Ogre Procedural v0.1 released!

Postby afshin » Sat Mar 12, 2011 9:49 pm

Mikachu wrote:
afshin wrote:got it ... First generate the path with no points


Code: Select all

Procedural::Path p = Procedural::BezierPath().realizePath();
p.addPoint(2,2,2);

Ouch... not really :o :wink:
It would rather be :

Code: Select all

Procedural::Path p = Procedural::Path().addPoint(2,2,2);


What if I specifically want BezierPath ?

I guess the realizePath should be done at the very end right? So what I have below does make sense?

Code: Select all

- (Procedural::Path) generateBezierPath: (NSArray *) pathPoints segments: (int) seg isClosed: (BOOL) closed{
   
   Procedural::BezierPath p;
   p.setNumSeg(seg);
   
   for ( someVector3Type * point in pathPoints) {
      
      p.addPoint(point.x, point.y, point.z);
      
   }
   
   if(closed){
      p.close();
      
   }

      Procedural::Path path = p.realizePath();

   return path;
}




And after all the steps above I have my Path object properly initialized to given points (I hope).
Last edited by afshin on Sat Mar 12, 2011 10:12 pm, edited 1 time in total.
0 x

User avatar
Slappy
Bronze Sponsor
Bronze Sponsor
Posts: 139
Joined: Fri Sep 28, 2007 8:30 pm
Location: Slovakia

Re: Ogre Procedural v0.1 released!

Postby Slappy » Sat Mar 12, 2011 10:04 pm

Nice!!!
Finally someone had created it - these primitives missed in Ogre for a long time!
Few months ago I wanted to do create simple pipes but I managed it by myself, but your solution looks more elegant!!!
0 x
Cool looking Graphical Installers in NSIS and Inno Setup: http://www.graphical-installer.com - FREE for Ogre projects
I offer NSIS/Inno Setup scripting, C/C++/C#/Delphi programming: http://www.unsigned.sk
Develop NSIS/Inno Setup projects directly in Visual Studio 2005-2015: http://www.visual-installer.com/
or RAD Studio 2009-XE8: http://www.rad-installer.com/

csb_tom_new
Gnoblar
Posts: 24
Joined: Tue Mar 01, 2011 5:03 am

Re: Ogre Procedural v0.1 released!

Postby csb_tom_new » Sun Mar 13, 2011 11:12 am

Seriously, there is still some minor things to implement, plus a lot of extra testing, and I haven't got much free time to work on this recently..
Still, if you don't want to wait for it, get the latest source from the code repository (instructions here: http://code.google.com/p/ogre-procedura ... e/checkout), and compile it.. (if you don't know too much about Mercurial and CMake, just look at the Ogre docs, the building process is quite similar)


Mikachu, thank you for your helpful reply. But I meet another problem. I open the page "http://code.google.com/p/ogre-procedural/source/checkout" and I setup Mercurial in my local machine. I use command "hg clone https://ogre-procedural.googlecode.com/hg/ ogre-procedural" following the instruction on that page, and I smoothly download files. But when I used CMake to generate VS sln files, error happened showing "No ProceduralMultiShape.cpp file". And then I read CMakeList.txt and examine all cpp files in "library\src" subdirectory, I found there exist an almost empty file "ProceduralMeshGenerator.cpp", but lack file "ProceduralMultiShape.cpp", and thus I cannot continue to compile. :(
I don't know if I need to input another Mercurial command or I get ProceduralMultiShape.cpp from another location in repository. I suggest either modify CMakeList.txt or add "ProceduralMultiShape.cpp" in appropriate location in repository. And also I think the repository need improvement as the repository is hard to browse. I can hardly find any cpp file in repository.
Anyhow, thank you once more, I really appreciate your work and I hope I can make my effort to enhance it.
0 x

User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France

Re: Ogre Procedural v0.1 released!

Postby Mikachu » Sun Mar 13, 2011 12:01 pm

afshin wrote:What if I specifically want BezierPath ?

I guess the realizePath should be done at the very end right? So what I have below does make sense?

Ok, maybe I misunderstood what you wanted to do..

Indeed, realizePath() is the function that converts your BezierPath, defined by its control points, to a standard Path (just a line strip), so your BezierPath must be defined before you call realizePath().

And yes, your new example is ok :)

PS: If I understand well, you're using ObjectiveC, aren't you? So, do you know if OgreProcedural works on MacOSX ? :) I don't have any hardware to test it on.. :roll:
0 x
OgreProcedural - Procedural Geometry for Ogre3D

User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France

Re: Ogre Procedural v0.1 released!

Postby Mikachu » Sun Mar 13, 2011 12:58 pm

csb_tom_new wrote: But I meet another problem. I open the page "http://code.google.com/p/ogre-procedural/source/checkout" and I setup Mercurial in my local machine. I use command "hg clone https://ogre-procedural.googlecode.com/hg/ ogre-procedural" following the instruction on that page, and I smoothly download files. But when I used CMake to generate VS sln files, error happened showing "No ProceduralMultiShape.cpp file". And then I read CMakeList.txt and examine all cpp files in "library\src" subdirectory, I found there exist an almost empty file "ProceduralMeshGenerator.cpp", but lack file "ProceduralMultiShape.cpp", and thus I cannot continue to compile. :(

My bad, I forgot to add that file to the repository.
It should be fixed by now :) (just do a "hg pull --update" do get the latest changes)
csb_tom_new wrote:And also I think the repository need improvement as the repository is hard to browse. I can hardly find any cpp file in repository.

Hum... Library files are in "library" folder, .h in "include" subfolder and .cpp in "src" subfolder, I don't really see which part is hard to browse...
0 x
OgreProcedural - Procedural Geometry for Ogre3D

csb_tom_new
Gnoblar
Posts: 24
Joined: Tue Mar 01, 2011 5:03 am

Re: Ogre Procedural v0.1 released!

Postby csb_tom_new » Sun Mar 13, 2011 2:11 pm

Hum... Library files are in "library" folder, .h in "include" subfolder and .cpp in "src" subfolder, I don't really see which part is hard to browse...


When I have downloaded files, I know that. But when I browsed code server using IE, in the URL of "http://code.google.com/p/ogre-procedural/source/browse/", I only found two files ".hgtags" and "CMakeLists.txt", your mentioned directories "include" and "src"are veiled by those two files and only "library" directory can be reluctantly seen. When I clicked "library" directory, the content region of the page is blank.

I really have a screenshot of that page and made it as attachment.
Attachments
screenshot.JPG
the page of "http://code.google.com/p/ogre-procedural/source/browse/#hg%2Flibrary"
Last edited by csb_tom_new on Sun Mar 13, 2011 2:40 pm, edited 1 time in total.
0 x

csb_tom_new
Gnoblar
Posts: 24
Joined: Tue Mar 01, 2011 5:03 am

Re: Ogre Procedural v0.1 released!

Postby csb_tom_new » Sun Mar 13, 2011 2:36 pm

Oh, I feel shy to report another problem. I use "hg clone https://ogre-procedural.googlecode.com/hg/ ogre-procedural
" to checkout codes, but I found "ProceduralMultiShape.cpp" is still absent. Then I used "hg pull --update" and it responded "abort: repository default not found". I don't know how to do now. :wink:
I really appreciate your work. I hope you will not feel unhappy on my serial finding fault :)
Last edited by csb_tom_new on Sun Mar 13, 2011 2:44 pm, edited 1 time in total.
0 x

User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France

Re: Ogre Procedural v0.1 released!

Postby Mikachu » Sun Mar 13, 2011 2:42 pm

csb_tom_new wrote:I really have a screenshot of that page and made it as attachment.

:lol: Well, it seems that the answer to your problem is in the screenshot you provided... "Your version of Internet Explorer is not supported"
IE is a terrible browser IMHO, but if you really want to use it, at least upgrade to a newer version.
0 x
OgreProcedural - Procedural Geometry for Ogre3D

csb_tom_new
Gnoblar
Posts: 24
Joined: Tue Mar 01, 2011 5:03 am

Re: Ogre Procedural v0.1 released!

Postby csb_tom_new » Sun Mar 13, 2011 3:36 pm

Mikachu wrote:
csb_tom_new wrote:I really have a screenshot of that page and made it as attachment.

:lol: Well, it seems that the answer to your problem is in the screenshot you provided... "Your version of Internet Explorer is not supported"
IE is a terrible browser IMHO, but if you really want to use it, at least upgrade to a newer version.


Oh, I ignored the information. You remind me of that. You are right.
0 x

csb_tom_new
Gnoblar
Posts: 24
Joined: Tue Mar 01, 2011 5:03 am

Re: Ogre Procedural v0.1 released!

Postby csb_tom_new » Sun Mar 13, 2011 4:23 pm

After having changed browser from IE to Firefox, I can smoothly download all the files!
0 x

afshin
Kobold
Posts: 34
Joined: Wed Nov 10, 2010 11:12 pm
Location: Canada

Re: Ogre Procedural v0.1 released!

Postby afshin » Mon Mar 14, 2011 7:43 pm

Mikachu wrote:
Ok, maybe I misunderstood what you wanted to do..

Indeed, realizePath() is the function that converts your BezierPath, defined by its control points, to a standard Path (just a line strip), so your BezierPath must be defined before you call realizePath().

And yes, your new example is ok :)

PS: If I understand well, you're using ObjectiveC, aren't you? So, do you know if OgreProcedural works on MacOSX ? :) I don't have any hardware to test it on.. :roll:


Yap, I am writing a wrapper in Objective-C for Ogre-procedural. It does work on a Mac :)
0 x

User avatar
NoodlesOnMyBack
Goblin
Posts: 200
Joined: Tue Feb 05, 2008 4:14 am
Location: Buenos Aires, Argentina
Contact:

Re: Ogre Procedural v0.1 released!

Postby NoodlesOnMyBack » Tue Mar 15, 2011 12:07 am

Im having a problem here, i want to recreate the mesh for an editor, lets say, a capsule.
The first time i create the shape its ok, but next time, say i change the radius, changes are ignored, in fact it uses the first mesh always. Maybe im doing something wrong?.
Here is what im doing:

Code: Select all

      if (mEntity)
      {
         getSceneNode()->detachObject(mEntity);
         sceneMgr->destroyEntity(mEntity);
         sceneMgr->destroyManualObject(mName);
         mEntity = 0;
         //return;
      }
           Ogre::Real radius = getProceduralRadius();
      Ogre::Real height = getProceduralHeight();

      Procedural::CapsuleGenerator().setRadius(radius).setHeight(height).realizeMesh(mName);
                mEntity = sceneMgr->createEntity(mName);
                getSceneNode()->attachObject(mEntity);


I always get the original capsule, but when i restart my applications, the changes are commited.
So its a problem of Ogre Procedural aparently.
0 x
Image


Return to “Showcase”

Who is online

Users browsing this forum: No registered users and 3 guests