2 GOOD Feature Request ^^
-
- Gnoblar
- Posts: 13
- Joined: Thu Jan 22, 2004 12:41 pm
- Location: France,grenoble
2 GOOD Feature Request ^^
Hello (i'm french ^^),
i have 2 feature requests for Ogre3D :
- Better FPS (frame per seconde) for shadows
- Soft Shadows
and next your engine will be the better free engine !!!
Thanks
Mickael
i have 2 feature requests for Ogre3D :
- Better FPS (frame per seconde) for shadows
- Soft Shadows
and next your engine will be the better free engine !!!
Thanks
Mickael
Mickael
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
The exsiting shadows implementations have an enormous amount of optimisations already in them. We do extensive culling checks, use hardware acceleration as much as possible, and use all the tricks you'll find in all the tech documents on the web for stencil shadows.
If you need them to be faster, be more sensible with poly count, number of lights and prefer modulative over additive (for stencil shadows) or texture size for texture based shadows. Shadows are inherently expensive and you need to balance them - there is no generic 'fast shadow' routine.
As for soft shadows, you can already do them with shaders and texture-based shadows (arguably the existing texture shadows are soft-ish). In the 1.0.0 release you can set up custom shaders for both the caster and receiver in order to do this - the receiver should use a filter. But this request is in direct competition with your first - making shadows softer is not going to make your shadows faster, quite the opposite.
If you need them to be faster, be more sensible with poly count, number of lights and prefer modulative over additive (for stencil shadows) or texture size for texture based shadows. Shadows are inherently expensive and you need to balance them - there is no generic 'fast shadow' routine.
As for soft shadows, you can already do them with shaders and texture-based shadows (arguably the existing texture shadows are soft-ish). In the 1.0.0 release you can set up custom shaders for both the caster and receiver in order to do this - the receiver should use a filter. But this request is in direct competition with your first - making shadows softer is not going to make your shadows faster, quite the opposite.
-
- Gnoblar
- Posts: 13
- Joined: Thu Jan 22, 2004 12:41 pm
- Location: France,grenoble
the .fx in this link : http://www.gamedev.net/columns/hardcore/softedgeshadow/
work good in ogre3D 1.0 ?
edit : i precise i don't know shader language :/
work good in ogre3D 1.0 ?
edit : i precise i don't know shader language :/
Mickael
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
You can use this technique in 1.0, provided you write the shaders. The trouble is that when you use techniques like this they dictate the rest of your content pipeline since everything has to be shader-based. OGRE can do that, but it requires you to make that choice to go completely shader, it's not something that can just be 'switched on'.
-
- Halfling
- Posts: 71
- Joined: Mon Aug 09, 2004 8:28 pm
- Location: Austria
In the 1.0.0 release you can set up custom shaders for both the caster and receiver in order to do this - the receiver should use a filter.
So now I've a question:
The caster in this case is the light, right?
The receiver ist for example the floor, or all the other geometry in the scene.
Now my thoughts are or better my problem is, i know I can apply shader like normal mapping cell shading for instance through setMaterialName().
How can i implement soft shadows that they effect all the geometry, obviouslt not with setMaterialName().
Can you give me a hint, a littel code snippet, an explaination where to start and how?
Thanks in advance
Meddten
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
No, the caster is the object casting the shadow.
Look at the API docs for SceneManager::setShadowTextureCasterMaterial, SceneManager::setShadowTextureReceiverMaterial and SceneManager::setShadowTexturePixelFormat; you'll need the CVS version until the 1.0.0 final is done in a few days. The article quoted shows the technique - it's the same in Ogre except without all the D3D-specific cruft.
Soft shadows will be slower.
Look at the API docs for SceneManager::setShadowTextureCasterMaterial, SceneManager::setShadowTextureReceiverMaterial and SceneManager::setShadowTexturePixelFormat; you'll need the CVS version until the 1.0.0 final is done in a few days. The article quoted shows the technique - it's the same in Ogre except without all the D3D-specific cruft.
Soft shadows will be slower.
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
-
- Halfling
- Posts: 71
- Joined: Mon Aug 09, 2004 8:28 pm
- Location: Austria
I thought I have that one, because I have CEGUIRenderer folder under Samples/Common, thats 1.0 branch isn't it
Checked out today in the morning
I definetley have 1.0 branch my version is 1.1.0 Dagon
Checked out today in the morning
I definetley have 1.0 branch my version is 1.1.0 Dagon
Code: Select all
Find all "setShadowTexture", Subfolders, Find Results 1, Entire Solution, "*.c;*.cpp;*.cxx;*.cc;*.tli;*.tlh;*.h;*.hpp;*.hxx;*.hh;*.inl;*.rc;*.resx;*.idl;*.asm;*.inc"
E:\01_Projects\Ogre\ogrenew\OgreMain\src\OgreSceneManager.cpp(3498):void SceneManager::setShadowTextureSize(unsigned short size)
E:\01_Projects\Ogre\ogrenew\OgreMain\src\OgreSceneManager.cpp(3505):void SceneManager::setShadowTextureCount(unsigned short count)
E:\01_Projects\Ogre\ogrenew\OgreMain\src\OgreSceneManager.cpp(3512):void SceneManager::setShadowTextureSettings(unsigned short size, unsigned short count)
E:\01_Projects\Ogre\ogrenew\OgreMain\include\OgreSceneManager.h(1600): virtual void setShadowTextureSize(unsigned short size);
E:\01_Projects\Ogre\ogrenew\OgreMain\include\OgreSceneManager.h(1610): virtual void setShadowTextureCount(unsigned short count);
E:\01_Projects\Ogre\ogrenew\OgreMain\include\OgreSceneManager.h(1615): @see setShadowTextureSize and setShadowTextureCount for details, this
E:\01_Projects\Ogre\ogrenew\OgreMain\include\OgreSceneManager.h(1619): virtual void setShadowTextureSettings(unsigned short size, unsigned short count);
E:\01_Projects\Ogre\ogrenew\OgreMain\include\OgreSceneManager.h(1642): virtual void setShadowTextureFadeStart(Real fadeStart)
E:\01_Projects\Ogre\ogrenew\OgreMain\include\OgreSceneManager.h(1651): virtual void setShadowTextureFadeEnd(Real fadeEnd)
E:\01_Projects\Ogre\ogrenew\Samples\Shadows\src\Shadows.cpp(432): mSceneMgr->setShadowTextureSettings(1024, 2);
E:\01_Projects\Ogre\ogrenew\Samples\Shadows\src\Shadows.cpp(437): mSceneMgr->setShadowTextureSettings(512, 2);
Total found: 11 Matching files: 3 Total files searched: 679
- DWORD
- OGRE Retired Moderator
- Posts: 1365
- Joined: Tue Sep 07, 2004 12:43 pm
- Location: Aalborg, Denmark
- Contact:
-
- Kobold
- Posts: 34
- Joined: Thu Dec 30, 2004 2:12 am
- Contact:
Hi Sinbad,sinbad wrote:You can use this technique in 1.0, provided you write the shaders. The trouble is that when you use techniques like this they dictate the rest of your content pipeline since everything has to be shader-based. OGRE can do that, but it requires you to make that choice to go completely shader, it's not something that can just be 'switched on'.
I'm still pretty new to 3d stuff and Ogre in particular and don't really understand the above statement regarding shaders. Any chance you could elaborate on that and/or point me to some additional info?
Thanks
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
-
- Kobold
- Posts: 34
- Joined: Thu Dec 30, 2004 2:12 am
- Contact: