Shard Posted December 6, 2009 Share Posted December 6, 2009 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" } Quote 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 More sharing options...
Marleys Ghost Posted December 6, 2009 Share Posted December 6, 2009 Range 10 is not a good thing. try a higher value 500 or something. "range"="500.0" Quote 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 More sharing options...
DaDonik Posted December 6, 2009 Share Posted December 6, 2009 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. Quote (Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI) Link to comment Share on other sites More sharing options...
macklebee Posted December 6, 2009 Share Posted December 6, 2009 oops i might have accidently left that at 10 when i was screwing around with the settings... Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Shard Posted December 6, 2009 Author Share Posted December 6, 2009 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... 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. Quote 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 More sharing options...
Porsche Posted December 7, 2009 Share Posted December 7, 2009 I'll work on this with you Shard. Quote 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 More sharing options...
Josh Posted December 7, 2009 Share Posted December 7, 2009 shadowdistance Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Shard Posted December 7, 2009 Author Share Posted December 7, 2009 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 Quote 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 More sharing options...
Volker Posted December 7, 2009 Share Posted December 7, 2009 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 Quote 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 More sharing options...
Porsche Posted December 7, 2009 Share Posted December 7, 2009 (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. Quote 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 More sharing options...
Recommended Posts
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.