A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Mansur
Gnoblar
Posts: 7 Joined: Fri Dec 23, 2005 5:40 pm
Location: Germany
Quote
0
login to like this post
Post
by Mansur » Fri Dec 23, 2005 6:10 pm
Hello,
i tried to generate a sun with Ogre!
I used the particlesystem for my "first-light".
This is my particle script:
Code: Select all
Space/Sun
{
material Examples/Flare
particle_width 20
particle_height 20
cull_each false
quota 100
billboard_type point
// Area emitter
emitter Ellipsoid
{
angle 30
emission_rate 30
time_to_live_min 2
time_to_live_max 5
direction 0 1 0
velocity 0.001
colour 0.15 0.1 0.0
width 5
height 5
depth 5
}
// Fader
affector ColourFader
{
red -0.010
green -0.025
blue -0.025
}
}
For a better result you have to change the flare.png from the example textures! Around the flare it should be realy black, then you see no edges at the sun
Perhaps someone can use it, or post something better
PS:
I know my english is bad...
Last edited by
Mansur on Fri Dec 23, 2005 8:40 pm, edited 1 time in total.
steven
Gnoll
Posts: 657 Joined: Mon Feb 28, 2005 1:53 pm
Location: Australia - Canberra (ex - Switzerland - Geneva)
Contact:
Quote
0
login to like this post
Post
by steven » Fri Dec 23, 2005 7:56 pm
Nice
There are so many message that it will quickly be lost if not on the wiki.
You could wiki it for example on :
http://www.ogre3d.org/wiki/index.php/Co ... 6_Textures
In fact a section of the wiki could be dedicated for such ressources : mesh, texture, etc.
PS : If you don't know it your wiki account is the same as the forum.
Mansur
Gnoblar
Posts: 7 Joined: Fri Dec 23, 2005 5:40 pm
Location: Germany
Quote
0
login to like this post
Post
by Mansur » Sat Dec 24, 2005 11:47 am
draxd80
Gnoblar
Posts: 4 Joined: Sun Dec 25, 2005 12:41 am
Quote
0
login to like this post
Post
by draxd80 » Sun Dec 25, 2005 12:43 am
Can you upload source of that nice looking SUN
. I need something like that for little game i plan to make
nikki
Old One
Posts: 2730 Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:
Quote
0
login to like this post
Post
by nikki » Sun Dec 25, 2005 10:40 am
Can you upload source of that nice looking SUN. I need something like that for little game i plan to make
He has already shown the script in the first post!
Last edited by
nikki on Mon Jun 30, 2008 3:40 pm, edited 1 time in total.
rookie1
Gnoblar
Posts: 2 Joined: Mon Dec 26, 2005 5:09 am
Quote
0
login to like this post
Post
by rookie1 » Mon Dec 26, 2005 5:12 am
Mansur, can you upload your flare.png as well? i had a few attempts, but couldn't get the result to look as nice as yours.
Mansur
Gnoblar
Posts: 7 Joined: Fri Dec 23, 2005 5:40 pm
Location: Germany
Quote
0
login to like this post
Post
by Mansur » Mon Dec 26, 2005 8:08 am
draxd80
Gnoblar
Posts: 4 Joined: Sun Dec 25, 2005 12:41 am
Quote
0
login to like this post
Post
by draxd80 » Mon Dec 26, 2005 3:01 pm
Hello me again , Im lame ogre newbie , I would realy love when you would upload source of that nice looking sun you made so I could C how you made it
...btw I know my english sux ar*
IFASS
Gnome
Posts: 387 Joined: Tue Jan 04, 2005 12:07 pm
Location: Netherlands
Quote
0
login to like this post
Post
by IFASS » Mon Dec 26, 2005 6:22 pm
draxd80 wrote: Hello me again , Im lame ogre newbie , I would realy love when you would upload source of that nice looking sun you made so I could C how you made it
...btw I know my english sux ar*
The source is in the startpost....
Robomaniac
Hobgoblin
Posts: 508 Joined: Tue Feb 03, 2004 6:39 am
Quote
0
login to like this post
Post
by Robomaniac » Mon Dec 26, 2005 6:23 pm
He already did, all you need is the .particle file he posted in the first post...
Rackle
Gnome
Posts: 375 Joined: Sat Jul 16, 2005 1:42 am
Location: Montreal
Quote
0
login to like this post
Post
by Rackle » Fri Jan 06, 2006 1:53 am
The code in Samples/ParticleFX provides additional examples. Hopefully this can get you started:
Code: Select all
/* http://www.ogre3d.org/wiki/index.php/ParticleExampleSun
* Requires:
* Media/Particle/Sun.particle
*/
#include "ExampleApplication.h"
class Application : public ExampleApplication
{
protected:
public:
Application()
{
}
~Application()
{
}
protected:
void chooseSceneManager(void)
{
mSceneMgr = mRoot->getSceneManager(ST_EXTERIOR_CLOSE);
}
void createScene(void)
{
mSceneMgr->setSkyBox( true, "Examples/SpaceSkyBox" );
ParticleSystem* sunParticle = ParticleSystemManager::getSingleton().createSystem("Sun", "Space/Sun");
SceneNode* particleNode = mSceneMgr->getRootSceneNode()->createChildSceneNode("Particle");
particleNode->attachObject(sunParticle);
}
};
#if OGRE_PLATFORM == PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#include "windows.h"
INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
#else
int main(int argc, char **argv)
#endif
{
Application app;
try
{
app.go();
}
catch( Exception& e )
{
#if OGRE_PLATFORM == PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WIN32
MessageBox( NULL, e.getFullDescription().c_str(), "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
#else
fprintf(stderr, "An exception has occured: %s\n",e.getFullDescription().c_str());
#endif
}
return 0;
}
crawmm
Halfling
Posts: 51 Joined: Mon Oct 17, 2005 2:53 am
Location: Mojave Desert, CA
Quote
0
login to like this post
Post
by crawmm » Fri Jan 06, 2006 6:37 am
Just curious... how big could you make something like that? Outside of machine limitations of course. I don't recall seeing any limits in OGRE itself that would limit the size of something like that.
ScurvyKnave
Gremlin
Posts: 150 Joined: Mon Oct 10, 2005 5:57 pm
Contact:
Quote
0
login to like this post
Post
by ScurvyKnave » Fri Jan 13, 2006 7:19 pm
Big in terms of how many particles, or how large it would appear on screen? I'm pretty sure you can use as many particles as you like, although this will eventually slow the framerate if you go overboard.
crawmm
Halfling
Posts: 51 Joined: Mon Oct 17, 2005 2:53 am
Location: Mojave Desert, CA
Quote
0
login to like this post
Post
by crawmm » Sat Jan 14, 2006 8:38 am
Either one actually.
hansondr
Gnoblar
Posts: 1 Joined: Tue Jun 06, 2006 9:43 pm
Quote
0
login to like this post
Post
by hansondr » Tue Jun 06, 2006 9:46 pm
Rackle wrote: The code in Samples/ParticleFX provides additional examples. Hopefully this can get you started:
Dagon requires the following change:
from:
Code: Select all
ParticleSystem* sunParticle = ParticleSystemManager::getSingleton().createSystem("Sun", "Space/Sun");
to:
Code: Select all
ParticleSystem *sunParticle = mSceneMgr->createParticleSystem("Sun", "Space/Sun");
SAT
Halfling
Posts: 64 Joined: Thu Aug 11, 2005 2:01 am
Quote
0
login to like this post
Post
by SAT » Wed Feb 06, 2008 12:53 am
Can you put your flare.png back up? or a new link please?
daanavitch
Gnoblar
Posts: 11 Joined: Tue Jun 03, 2008 1:20 pm
Quote
0
login to like this post
Post
by daanavitch » Mon Jun 30, 2008 3:39 pm
Every time I try to load a particle this error occurs:
An exception has occurred: OGRE EXCEPTION(2:InvalidParametersException): Cannot find required template 'Space/Sun' in ParticleSystemManager::createSystem at /Users/daan/ogre/Mac/Ogre/../../OgreMain/src/OgreParticleSystemManager.cpp (line 298)
What am I doing wrong?
xadhoom
Minaton
Posts: 973 Joined: Fri Dec 28, 2007 4:35 pm
Location: Germany
x 1
Quote
0
login to like this post
Post
by xadhoom » Tue Jul 01, 2008 8:26 am
Just "Sun"? Or do you miss to specifiy the folder in ressource.cfg. So Ogre can find the file...
daanavitch
Gnoblar
Posts: 11 Joined: Tue Jun 03, 2008 1:20 pm
Quote
0
login to like this post
Post
by daanavitch » Thu Jul 03, 2008 12:02 pm
I found the solution. I had to put the .particle file in Ogremain/samples/media/particle
vudy9900
Gnoblar
Posts: 2 Joined: Fri Feb 10, 2012 5:08 am
Quote
0
login to like this post
Post
by vudy9900 » Wed Mar 07, 2012 2:38 am
Hey guys,
I am getting a similar error to what 'daanavitch' got - posted Tue Jul 01, 2008 2:39 am.
I am using Dell Inspiron 1520 Windows XP SP3 with MSVC++ 2010 Express and Ogre version 1.7.3
My code compiles but on run, it shows me an prompt box that says:
"OGRE EXCEPTION(2:InvalidParametersException): Cannot find required template 'Space/Sun' in ParticleSystemManager::createSystem at ..\..\..\..\OgreMain\src\OgreParticleSystemManager.cpp (line 327)"
I'd appreciate any help,
Thank You.
Kind Regards,
vudy9900
Attachments
This is a screenshot of my error
vudy9900
Gnoblar
Posts: 2 Joined: Fri Feb 10, 2012 5:08 am
Quote
0
login to like this post
Post
by vudy9900 » Sun Mar 11, 2012 10:04 am
Hey,
Just to continue from my last message,....
I have tried all the suggestions above but I still have this problem....
Would really appreciate for any help on this..
Thanks in advance.
vudy9900
jheld
Halfling
Posts: 90 Joined: Sat Feb 21, 2009 10:32 am
Quote
0
login to like this post
Post
by jheld » Sun Mar 11, 2012 11:19 am
You've got the same problem as daanavich--
The Check your resources.cfg file in both bin/debug and bin/release folders (depending on what you're running)
Make sure your "FileSystem=..\..\media\particle" is uncommented,
then check that the particle file has Space/Sun and is in the right folder
Cheers
J