Hi folks
because the stencilshadows sometimes are slow (on old computers or
large scenes) i want to enable them only if the program is idle and
switch them off if i move the camera...
for this i need some hints to solve it.
thanks
max
stencil shadows only on idle time
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
Unless you have a static camera 90% of the time, doesn't this kind of beat the point of having shadows at all? (not to mention that this would look rather ugly)
You could always set your shadow volume scene nodes as invisible while updating your camera to achieve what you want, might get a bit hard to manage though
EDIT:
To propose a better alternative, I'd suggest you look into shadow mapping and tweak this to your liking; it looks nicer than stencil shadows in general, and you should be able to make them as simple or as complex as you want depending on your performance needs
You could always set your shadow volume scene nodes as invisible while updating your camera to achieve what you want, might get a bit hard to manage though
EDIT:
To propose a better alternative, I'd suggest you look into shadow mapping and tweak this to your liking; it looks nicer than stencil shadows in general, and you should be able to make them as simple or as complex as you want depending on your performance needs
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Yeah, but shadow maps and old computers might be a problem. Moreover, there's no default implementation for them in Irrlicht. Maybe someone could suggest and provide an implementation for inclusion into the engine?!
The suggestion for changing visibility of the shadow nodes is correct, though I'm not sure if it works currently. Shadow nodes are handled slightly special, which means that there might be some issues with the default scene nodes handling. But giving it a try shouldn't hurt. Checking the times when to enable or disable them is up to you, though. There's no way to check for idle times or camera movement in Irrlicht automatically.
The suggestion for changing visibility of the shadow nodes is correct, though I'm not sure if it works currently. Shadow nodes are handled slightly special, which means that there might be some issues with the default scene nodes handling. But giving it a try shouldn't hurt. Checking the times when to enable or disable them is up to you, though. There's no way to check for idle times or camera movement in Irrlicht automatically.
-
- Posts: 15
- Joined: Fri Jun 03, 2011 9:35 am
[quote="Radikalizm"]Unless you have a static camera 90% of the time, doesn't this kind of beat the point of having shadows at all? (not to mention that this would look rather ugly)
You could always set your shadow volume scene nodes as invisible while updating your camera to achieve what you want, might get a bit hard to manage though
EDIT:
To propose a better alternative, I'd suggest you look into shadow mapping and tweak this to your liking; it looks nicer than stencil shadows in general, and you should be able to make them as simple or as complex as you want depending on your performance needs[/quote]
thanks for re
i tried to make the shadow volume scene nodes invisible and it works
in general, but the handling is the problem.
if shadows are on the mouse actions are very slow and the time
until i can switch off the visibility is very long (first click event).
The second is, if i release the mouse (cameramovement stops)
the shadows should come after a specified time....
max
You could always set your shadow volume scene nodes as invisible while updating your camera to achieve what you want, might get a bit hard to manage though
EDIT:
To propose a better alternative, I'd suggest you look into shadow mapping and tweak this to your liking; it looks nicer than stencil shadows in general, and you should be able to make them as simple or as complex as you want depending on your performance needs[/quote]
thanks for re
i tried to make the shadow volume scene nodes invisible and it works
in general, but the handling is the problem.
if shadows are on the mouse actions are very slow and the time
until i can switch off the visibility is very long (first click event).
The second is, if i release the mouse (cameramovement stops)
the shadows should come after a specified time....
max
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
Flexible render passes would make the implementation of various shadow mapping techniques much easier I suppose, I haven't had time yet to mess around with shadow maps in irrlicht, although I have some simple implementations in my own engine which I could port (given that they are good enough performance-wise for irrlicht, since my engine does not need to maintain compatibility with older or mobile systems)hybrid wrote:Yeah, but shadow maps and old computers might be a problem. Moreover, there's no default implementation for them in Irrlicht. Maybe someone could suggest and provide an implementation for inclusion into the engine?!
The suggestion for changing visibility of the shadow nodes is correct, though I'm not sure if it works currently. Shadow nodes are handled slightly special, which means that there might be some issues with the default scene nodes handling. But giving it a try shouldn't hurt. Checking the times when to enable or disable them is up to you, though. There's no way to check for idle times or camera movement in Irrlicht automatically.