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!
User avatar
saejox
Goblin
Posts: 260
Joined: Tue Oct 25, 2011 1:07 am
x 36

Re: Ogre Procedural [v0.2 officially out]

Post by saejox »

Great, i was planning to make an AngelScript one, since syntax is identical to c++. But this will do nicely :)

I have a few questions,
1. I don't like default mouse look. Can i disable it?
2. Is it possible to stop it from grabbing the mouse? [DISCL_FOREGROUND, DISCL_NONEXCLUSIVE]
3. Would you enable mWindow->setDeactivateOnFocusChange(false); ?
4. How do i create a random number ?

Thank you!
Nimet - Advanced Ogre3D Mesh/dotScene Viewer
asPEEK - Remote Angelscript debugger with html interface
ogreHTML - HTML5 user interfaces in Ogre
User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France
x 35

Re: Ogre Procedural [v0.2 officially out]

Post by Mikachu »

saejox wrote:Great, i was planning to make an AngelScript one, since syntax is identical to c++. But this will do nicely :)
The Lua bindings are based on SWIG, which brings very little work compared to manual binding.
But SWIG doesn't have support for AngelScript...
saejox wrote:1. I don't like default mouse look. Can i disable it?
You mean the cursor? it's not visible on my computer when the exe is launched..
saejox wrote:2. Is it possible to stop it from grabbing the mouse? [DISCL_FOREGROUND, DISCL_NONEXCLUSIVE]
Yes, at the moment, you can still alt+tab to jump to your text editor, but no mouse grabbing at all would be better..
saejox wrote:3. Would you enable mWindow->setDeactivateOnFocusChange(false); ?
Ok.
saejox wrote:4. How do i create a random number ?
You can read Lua's documentation! :wink:
There's something about it here
EDIT : the standard lua libraries aren't loaded from the c++ code, I thought I read somewhere you could do it from the lua script itself, but I'm not so sure now...

I'm away from a dev computer for a few days, due to christmas stuff, but will have a look at your requests when I get back.
OgreProcedural - Procedural Geometry for Ogre3D
User avatar
saejox
Goblin
Posts: 260
Joined: Tue Oct 25, 2011 1:07 am
x 36

Re: Ogre Procedural [v0.2 officially out]

Post by saejox »

Thank you! No rush
I don't like default mouse look. Can i disable it?
What meant was:
It has a default fps like move mouse look. Since this is basically a mesh editor, that behavior is disrupting. A simple 'turn camera only when ALT is down' would suffice.
Thanks
Nimet - Advanced Ogre3D Mesh/dotScene Viewer
asPEEK - Remote Angelscript debugger with html interface
ogreHTML - HTML5 user interfaces in Ogre
User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France
x 35

Re: Ogre Procedural [v0.2 officially out]

Post by Mikachu »

@saejox : done (in the source, I haven't updated the binaries).
But there's a small bug (coming from OIS?) : if you gain focus to the main window with alt+tab, OIS considers that the left mouse button is down, until you actually click it.
If you gain focus by clicking on the window, you don't have this bug...
OgreProcedural - Procedural Geometry for Ogre3D
User avatar
saejox
Goblin
Posts: 260
Joined: Tue Oct 25, 2011 1:07 am
x 36

Re: Ogre Procedural [v0.2 officially out]

Post by saejox »

Mikachu wrote:@saejox : done (in the source, I haven't updated the binaries).
But there's a small bug (coming from OIS?) : if you gain focus to the main window with alt+tab, OIS considers that the left mouse button is down, until you actually click it.
If you gain focus by clicking on the window, you don't have this bug...
Thank you.
I can confirm that is a OIS bug. i have a similar program and same bug.
OIS registers mouse clicks on taskbar icon as a mouse click on application. That would be fine if it sent mouse released it but it doesn't.
Nimet - Advanced Ogre3D Mesh/dotScene Viewer
asPEEK - Remote Angelscript debugger with html interface
ogreHTML - HTML5 user interfaces in Ogre
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

Re: Ogre Procedural [v0.2 officially out]

Post by Transporter »

  • Add TextTexture class as texture modifier to draw text on texture (freetype required)
  • Bugfix for a few doxygen warnings
freetype.patch
Freetype + doc bugfix
(19.85 KiB) Downloaded 72 times
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.2 officially out]

Post by Klaim »

I was wondering: do you think it's too soon to ask for a dedicated sub-forum for Ogre Procedural? Everything is mixed here. Patchers could provide their patch in user-specific threads and other discussions on different topics would be more visible.
Only visibility of the forum itself would be reduced.

What do you think? Too early?
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

Re: Ogre Procedural [v0.2 officially out]

Post by Transporter »

Klaim wrote:What do you think? Too early?
No, I agree!
johan07
Greenskin
Posts: 144
Joined: Fri Dec 21, 2012 11:38 pm

Re: Ogre Procedural [v0.2 officially out]

Post by johan07 »

Hi,
i tried to work with ogre procedural .
i downloaded it from the link in the first post
i modifate the proprieties of my project where i add the include,lib and the dll of the ogreprocedural

in my create scene i added just this line

Code: Select all

Procedural::Root::getInstance()->sceneManager = mSceneMgr;
my app do not want run , it crach
proc.jpg
proc.jpg (18.48 KiB) Viewed 2833 times
if i delete it the project run without error

i use OgreSDK_vc10_v1-7-4 version
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.2 officially out]

Post by Klaim »

It seems that your Ogre dll version isn't compatible with the last Ogre Procedural sources.
Check which version is required, then decide which to update. Sources of both projects are online for you to decide which version you want, and build it.
johan07
Greenskin
Posts: 144
Joined: Fri Dec 21, 2012 11:38 pm

Re: Ogre Procedural [v0.2 officially out]

Post by johan07 »

i downloaded this version "OgreProceduralSDK_vs10_v0.2.7z"
so i must download ogre1.8 ? (i use visual 2010), or if i download the version OgreProceduralSDK_vs9_v0.2.7z it work with visual 2010+ogre1.7.4
rimie2387
Halfling
Posts: 72
Joined: Sun Apr 01, 2012 7:33 pm

Re: Ogre Procedural [v0.2 officially out]

Post by rimie2387 »

Hi,
i added the ogreprocedural to my project

in my create scene i add this line

Code: Select all

Procedural::BoxGenerator().setSizeX(2.0).realizeMesh("mymesh");
i get this error

Code: Select all

error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Ogre::MeshPtr __thiscall Procedural::MeshGenerator<class Procedural::BoxGenerator>::realizeMesh(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?realizeMesh@?$MeshGenerator@VBoxGenerator@Procedural@@@Procedural@@QAE?AVMeshPtr@Ogre@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "private: void __thiscall QOgreWidget::createScene(void)" (?createScene@QOgreWidget@@AAEXXZ)
User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France
x 35

Re: Ogre Procedural [v0.2 officially out]

Post by Mikachu »

Transporter wrote:
  • Add TextTexture class as texture modifier to draw text on texture (freetype required)
  • Bugfix for a few doxygen warnings
freetype.patch
Thanks, I'll have a look at it tomorrow :)
Klaim wrote:I was wondering: do you think it's too soon to ask for a dedicated sub-forum for Ogre Procedural? Everything is mixed here. Patchers could provide their patch in user-specific threads and other discussions on different topics would be more visible.
Only visibility of the forum itself would be reduced.

What do you think? Too early?
I agree, because this forum is called 'showcase', and things can get messy with several conversations interleaved.
This thread would just be for showcasing and main announcements.

I'll ask the moderators if they agree with that.
OgreProcedural - Procedural Geometry for Ogre3D
User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France
x 35

Re: Ogre Procedural [v0.2 officially out]

Post by Mikachu »

johan07 wrote:i downloaded this version "OgreProceduralSDK_vs10_v0.2.7z"
so i must download ogre1.8 ? (i use visual 2010), or if i download the version OgreProceduralSDK_vs9_v0.2.7z it work with visual 2010+ogre1.7.4
The binary SDK was compiled against Ogre 1.8.0, so you have to use the same version of Ogre to be sure to have it working (1.8.1 and 1.8.2 may be ok, I'm not sure about it)
OgreProceduralSDK_vs9_v0.2.7z is also compiled against Ogre 1.8.0 but with Visual Studio 2008.
In your case, you can either switch to Ogre 1.8.0, or compile OgreProcedural from source (it's not that hard, really :) instructions are here)

Another reason for compiling from source is that you'll get all the new features.. :)
rimie2387 wrote:Hi,
i added the ogreprocedural to my project

in my create scene i add this line

Code: Select all

Procedural::BoxGenerator().setSizeX(2.0).realizeMesh("mymesh");
i get this error

Code: Select all

error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Ogre::MeshPtr __thiscall Procedural::MeshGenerator<class Procedural::BoxGenerator>::realizeMesh(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?realizeMesh@?$MeshGenerator@VBoxGenerator@Procedural@@@Procedural@@QAE?AVMeshPtr@Ogre@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "private: void __thiscall QOgreWidget::createScene(void)" (?createScene@QOgreWidget@@AAEXXZ)
Which version do you use?
Do you use CMake in your project?
Is the version you compiled against and the one of the DLL in your execution dir of the same?
OgreProcedural - Procedural Geometry for Ogre3D
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

Re: Ogre Procedural [v0.2 officially out]

Post by Transporter »

@Mikachu
Maybe you should add a small note about the required ogre version on main site (paragraph Here are the SDKs ).
johan07
Greenskin
Posts: 144
Joined: Fri Dec 21, 2012 11:38 pm

Re: Ogre Procedural [v0.2 officially out]

Post by johan07 »

hi,
i downloaded the ogre1.8 and i configurate my project to use ogreprocedural

i just added in my project "#include "Procedural.h""
i get this error

Code: Select all

C:\ogresdk\ogreproceduralsdk_vs10_v0.2\ogreproceduralsdk_vs10_v0.2\include\ogreprocedural\ProceduralUtils.h(46): error C2664: 'OutputDebugStringW' : cannot convert parameter 1 from 'const char *' to 'LPCWSTR'
EDIT
my problem is resolved , i used the seconde code in this reply .
[quote="saftschachtel"]Hi Mikachu,

congrats to the great work. I have one suggestion for your code.
In the file "ProceduralUtils.h" i replaced the code.

Code: Select all

static void log(const Ogre::String& st)
{
	Ogre::LogManager::getSingleton().logMessage("[PROCEDURAL] " + st);
	#if (PROCEDURAL_PLATFORM == PROCEDURAL_PLATFORM_WIN32)		
		OutputDebugString( (st + "\n").c_str() );
	#endif
}
rimie2387
Halfling
Posts: 72
Joined: Sun Apr 01, 2012 7:33 pm

Re: Ogre Procedural [v0.2 officially out]

Post by rimie2387 »

Hi again ,
i fixed my first problem, i have no error no,
to use ogre procedural i just added this line in create'scene()

Code: Select all

Procedural::SphereGenerator().setRadius(10.f).setUTile(1.5f).setPosition(0,0,0).realizeMesh("mySphere");
mSceneMgr->createEntity("mySphere");
BUt i did not see the sphere , i did not see any thing !!

if i add this line in init()

Code: Select all

Procedural::Root::getInstance()->getInstance->sceneManager = mSceneMgr;
i get error that procedural::root has no membre sceneManager
User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France
x 35

Re: Ogre Procedural [v0.2 officially out]

Post by Mikachu »

rimie2387 wrote:Hi again ,
i fixed my first problem, i have no error no,
to use ogre procedural i just added this line in create'scene()

Code: Select all

Procedural::SphereGenerator().setRadius(10.f).setUTile(1.5f).setPosition(0,0,0).realizeMesh("mySphere");
mSceneMgr->createEntity("mySphere");
BUt i did not see the sphere , i did not see any thing !!
I think you should first read a basic tutorial about Ogre! :wink:

(hint : you need to add your entity to a scenenode)
rimie2387 wrote:BUt i did not see the sphere , i did not see any thing !!

if i add this line in init()
CODE: SELECT ALL
Procedural::Root::getInstance()->getInstance->sceneManager = mSceneMgr;

i get error that procedural::root has no membre sceneManager
That's because it doesn't exist anymore (it did in the earlier versions of OgreProcedural)
OgreProcedural - Procedural Geometry for Ogre3D
rimie2387
Halfling
Posts: 72
Joined: Sun Apr 01, 2012 7:33 pm

Re: Ogre Procedural [v0.2 officially out]

Post by rimie2387 »

yes i tried to do that before, but it does not work
i made it with wrong way
now i regled the problem
johan07
Greenskin
Posts: 144
Joined: Fri Dec 21, 2012 11:38 pm

Re: Ogre Procedural [v0.2 officially out]

Post by johan07 »

the ogre procedural work now with my project
i have some questions , because is ly first time to create shapes i want to know
to ceate shape like this
cone.jpg
cone.jpg (1.53 KiB) Viewed 2755 times
i use Procedural::ConeGenerator() ? or is better ti use Procedural::CylinderGenerator()
and for this shape too
pelv.jpg
pelv.jpg (1.29 KiB) Viewed 2755 times
thanks very muxh for your idea
User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France
x 35

Re: Ogre Procedural [v0.2 officially out]

Post by Mikachu »

@johan07:
I would use Lathe (see here), it's defintely more flexible.
You can create the shape for the Lathe by using CatmullRomSpline2 (for example)
OgreProcedural - Procedural Geometry for Ogre3D
johan07
Greenskin
Posts: 144
Joined: Fri Dec 21, 2012 11:38 pm

Re: Ogre Procedural [v0.2 officially out]

Post by johan07 »

@Mikachu
thanks for the advice , but is tehre any code or exemple that help me to use lathe ? because i did not understand how it (lath) can help me ,why it's better to use cone shape for exemple ,
and more how i create shape for lath by using CatmullRomSpline2
User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France
x 35

Re: Ogre Procedural [v0.2 officially out]

Post by Mikachu »

@johan07:
Cone is good, it's just that it looks like a cone, which is not what your picture look like (or only as a raw approximation).
You can find sample code about lathe and CatmullRomSpline2 in Sample_Extrusion, which is included in the SDK.
OgreProcedural - Procedural Geometry for Ogre3D
johan07
Greenskin
Posts: 144
Joined: Fri Dec 21, 2012 11:38 pm

Re: Ogre Procedural [v0.2 officially out]

Post by johan07 »

@ Mikachu
ok i will see the sample.
EDIT
to run the sample i must create the project ? because it's not like the ogresdk sample where the sample is project

EDIT
i use cmake to generate the project
but i get this error

Code: Select all

CMake Error at CMakeLists.txt:27 (procedural_create_vcproj_userfile):
  Unknown CMake command "procedural_create_vcproj_userfile".
johan07
Greenskin
Posts: 144
Joined: Fri Dec 21, 2012 11:38 pm

Re: Ogre Procedural [v0.2 officially out]

Post by johan07 »

i can't generate project of the sample
any idea ?

EDIT
problem solved
Post Reply