Spotlight Problem
Spotlight Problem
Hi all, I'm new to Irrlicht, previously i have worked with axiom3d and some XNA engine to develop game for my school project.
Recently for a change, I started using Irrlicht and encounter a problem right away. The spot light type for Irrlicht is giving me a lot of headache because of the way it shines onto mesh texture. It doesn't shine like how axiom does its lighting which give a dynamic shadow as well, instead it shines onto the triangles of the mesh and isn't very "flash light" like. I need to do a flash light/torch light for my game like how Left 4 Dead does it.
Is there any way i can work about this? I tried the per pixel lighting tutorial and the effect doesn't work well with just diffuse texture mapping.
Another tutorial i found was to use shader but the issue with that is dynamic shadow casting when shone onto it.
Any advice?
Recently for a change, I started using Irrlicht and encounter a problem right away. The spot light type for Irrlicht is giving me a lot of headache because of the way it shines onto mesh texture. It doesn't shine like how axiom does its lighting which give a dynamic shadow as well, instead it shines onto the triangles of the mesh and isn't very "flash light" like. I need to do a flash light/torch light for my game like how Left 4 Dead does it.
Is there any way i can work about this? I tried the per pixel lighting tutorial and the effect doesn't work well with just diffuse texture mapping.
Another tutorial i found was to use shader but the issue with that is dynamic shadow casting when shone onto it.
Any advice?
What im using to handle lighting in my game for my flashlight is using xEffects *search forums* it seems to do the effect you want.
http://wild.deathtouchstudios.com << My gamedev blog
<Programming is a way of life>
If at first you don't succeed press the delete key till you do
<Programming is a way of life>
If at first you don't succeed press the delete key till you do
XEffect problem
I am having some problem with XEffect loading. Most of the error is dimension2du related. Any help?
dimension2du is isn't in the current stable release you must download the svn and compile it yourself to have access to dimension2du..
http://wild.deathtouchstudios.com << My gamedev blog
<Programming is a way of life>
If at first you don't succeed press the delete key till you do
<Programming is a way of life>
If at first you don't succeed press the delete key till you do
I've managed to get it working by changing the dimension2du to 2di, manage to compile and get the things up but it is still not working ideally, especially when trying to attach the "Torchlight" to the camera.
I am actually quite confused by XEffect frankly. So, for creating the dynamic torch light, do i use effect-> or ILightSceneNode ?
Would be nice if u can provide a snippet code. Thanks in advance.
I am actually quite confused by XEffect frankly. So, for creating the dynamic torch light, do i use effect-> or ILightSceneNode ?
Would be nice if u can provide a snippet code. Thanks in advance.
you create the light like you normally would. xEffects just handles all the "lighting" and shadow effects. *Shadow effects require shadow lights*
http://wild.deathtouchstudios.com << My gamedev blog
<Programming is a way of life>
If at first you don't succeed press the delete key till you do
<Programming is a way of life>
If at first you don't succeed press the delete key till you do
XEffects from what i understand is pre rendered effects lights shadows all happen before its actually rendered. You must set a node to a "Shadow Node" in order for it to cast and receive shadows then you must create a shadow light to shine these shadows. Get what i mean? so anywhere you have a light you would create a shadow light there to same rotation etc.
Examples explain better then me
Examples explain better then me
http://wild.deathtouchstudios.com << My gamedev blog
<Programming is a way of life>
If at first you don't succeed press the delete key till you do
<Programming is a way of life>
If at first you don't succeed press the delete key till you do
If my understanding is correct, would that mean using XEffect for my FPS game would be out of the question? I am trying to recreate something like Left 4 Dead flashlight.wildrj wrote:XEffects from what i understand is pre rendered effects lights shadows all happen before its actually rendered. You must set a node to a "Shadow Node" in order for it to cast and receive shadows then you must create a shadow light to shine these shadows. Get what i mean? so anywhere you have a light you would create a shadow light there to same rotation etc.
Examples explain better then me
No its perfect for your fps game its how i use it right now.. You make the two lights "shadow light" and "spotlight" children of your "player" node you dont even need the shadowlight its for added effect.
http://wild.deathtouchstudios.com << My gamedev blog
<Programming is a way of life>
If at first you don't succeed press the delete key till you do
<Programming is a way of life>
If at first you don't succeed press the delete key till you do
Also check your scale. easily checkable just by looking at your position. if its like 0.013241234 << thats x.. time to scale up.
http://wild.deathtouchstudios.com << My gamedev blog
<Programming is a way of life>
If at first you don't succeed press the delete key till you do
<Programming is a way of life>
If at first you don't succeed press the delete key till you do
OOO disable all the post processing effects. you probably have bloom on. A.k.a comment out all the "addPostProcessingEffectFromFile lines"
Example:
Example:
Code: Select all
addPostProcessingEffectFromFile(irr::core::stringc("Media/Shaders/BlurHP.glsl"));
http://wild.deathtouchstudios.com << My gamedev blog
<Programming is a way of life>
If at first you don't succeed press the delete key till you do
<Programming is a way of life>
If at first you don't succeed press the delete key till you do