Jump to content

Shadow Rendering Error


Shard
 Share

Recommended Posts

Hey everyone. This is a continuation of the previous thread to a more specific question: Shadows Not Rendering Correctly.

http://leadwerks.com/werkspace/index.php?/topic/287-24-lights-not-loading/

 

Video of Problem: http://www.youtube.com/watch?v=G6yd85tgP70

 

I'm not sure if this is a code error on my part or the engine because I recall the engine demo that I downloaded doing some strange things with shadows too.

 

Directional Light Ini File

classname=light_directional
color=255,255,255,255
intensity=1
range=10
resolution=2
linearoffset=0.31,0.4,0.7
shadowdistance=6.0,20.0,100.0
inversesquarefalloff=1

 

From the sbx

Model {
path="light_directional.gmf"
position=19.9999981,54.0000000,-82.9999924
rotation=55.0000076,-179.999985,179.999985
scale=0.999999881,1.00000036,1.00000036
id=328282888
"class"="Model"
"classname"="light_directional"
"intensity"="1"
"inversesquarefalloff"="1"
"linearoffset"="0.31,0.4,0.7"
"name"="directional_2"
"range"="10"
"reloadafterscript"="1"
"resolution"="2"
"shadowdistance"="6.0,20.0,100.0"
}

simpleSigPNG.png

 

Programmer/Engineer/Student

www.reikumar.com

 

2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM

C++ - Visual Studio Express - Dark GDK - Leadwerks SDK

Link to comment
Share on other sites

Range 10 is not a good thing. try a higher value 500 or something.

 

"range"="500.0"

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

In your video you can see the 3 shadow stages of the directional light. (these circles of popping up shadows).

Try changing the light's range to something higher, like Marley suggested. If that doesn't work for you,

you can set the distance for every shadow stage. Look up SetShadowDistance.

(Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI)

Link to comment
Share on other sites

In your video you can see the 3 shadow stages of the directional light. (these circles of popping up shadows).

Try changing the light's range to something higher, like Marley suggested. If that doesn't work for you,

you can set the distance for every shadow stage. Look up SetShadowDistance.

 

 

oops i might have accidently left that at 10 when i was screwing around with the settings... :):lol:

 

 

Thanks Marley! And no troubles macklebee. It looks good now.

 

I do have another question: shadows have different qualities that they switch between, the high and the low. Which value can I change so that the switch between low-high happens at a further distance? Right now I can move and see the change happen and it looks kinda bad. :):blink:

simpleSigPNG.png

 

Programmer/Engineer/Student

www.reikumar.com

 

2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM

C++ - Visual Studio Express - Dark GDK - Leadwerks SDK

Link to comment
Share on other sites

shadowdistance

 

 

Thanks Josh.

 

I've tried multiple values but it seems like its not working.

 

If I use 10 for the first value, the shadow quality is perfect but the distance is very short. If I change it to 20, the distance increases but the quality drops.

 

What exactly do these numbers mean? As in what is the first number do and the second number and the third number?

 

I looked it up in the wiki but it only references the BlitzMax code version of it, not Lua/Ini or editor.

http://www.leadwerks.com/wiki/index.php?title=SetShadowDistance

simpleSigPNG.png

 

Programmer/Engineer/Student

www.reikumar.com

 

2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM

C++ - Visual Studio Express - Dark GDK - Leadwerks SDK

Link to comment
Share on other sites

Thanks Josh.

 

I've tried multiple values but it seems like its not working.

 

If I use 10 for the first value, the shadow quality is perfect but the distance is very short. If I change it to 20, the distance increases but the quality drops.

 

What exactly do these numbers mean? As in what is the first number do and the second number and the third number?

 

I looked it up in the wiki but it only references the BlitzMax code version of it, not Lua/Ini or editor.

http://www.leadwerks.com/wiki/index.php?title=SetShadowDistance

 

Try to change the stage parameter of Shadowdistance.

Do you do some scaling for your scene?

May be this thread helps:

http://forum.leadwerks.com/viewtopic.php?f=2&t=4819

Core2DuoE6570 / Windows7 64bit / 4 Gb RAM / Geforce GTX 260 896Mb / LE 2.3

Dell Inspiron 1720 / Vista SP2 / C2D 2.4 / 8600 GM

Link to comment
Share on other sites

(Monday) Shard, speak with me before you reply again here. These are things I need to show you on my side of the table so that you wont have to ask. :)

simpleSigPNG.png

Artist, Animator, Musician, P/T Programmer

Dual Core @ 2.6GHz per /nVidia 9600 GT/ 4 GBs DDR3 6800 / XP Pro 32/64 Bit

Photoshop CS3 / 3D Studio Max 8 / VS '08

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...