Author Topic: Shadows disappear  (Read 2583 times)

Offline BumbleBee

  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 891
    • View Profile
Shadows disappear
« on: 2013-Apr-07 »
Hi everyone

Don't be afraid. It's just me.  :) Gernot, could you fix the following bug please. 

Shadows disappear when player/camera is close to the Shadow-Casting-Objects or inside the shadow.
Please, run the Shadow example in the GLBasic 3D - Samples directory and change the camera position to:
 
 
Code: (glbasic) [Select]

   X_CAMERA 0,0,50,400*COS(mx),0,400*SIN(mx)
 

You are now close to the Donut. Follow the shadow by using your mouse.  :P When the light is about behind the Donut, then you are inside the shadow.   :) As you can see, the shadow disappears.

Can someone confirm this? Thx

Here's a Video where you can also see what i mean.
 
         http://img43.imageshack.us/img43/5956/ymjumacabzsapgzjwoywog.mp4

Don't ask me why but i think, clipping ain't perfect.    Sry, Gernot. Don't punish me.   :giveup:


Cheers
The day will come...

CPU Intel(R) Core(TM) i5-3570k, 3.4GHz, AMD Radeon 7800 , 8 GB RAM, Windows 10 Home 64Bit

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1544
    • View Profile
Re: Shadows disappear
« Reply #1 on: 2013-Apr-07 »
Room shadows are tricky I get this sort of things with two spotlights, where one is ignored in the other beam or something. I'm not sure what the issue here but I am going to take a wild guess at either turning off culling for shadow renders, the order of the objects or X_MAKE3D znear is too high (integer). Cool demo...reminds me of a great playstation game Croc. ;)

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3366
  • Integrated Brain
    • View Profile
Re: Shadows disappear
« Reply #2 on: 2013-Apr-07 »
HI Bumblebee the game it's very nice... about the shadows, something extrange , always the darks side of GLbasic it's the 3D, a bit more of powerfull will be of GLbasic "una Bestia parda!"  =D

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1142
    • View Profile
    • My GLBasic code archiv
Re: Shadows disappear
« Reply #3 on: 2013-Apr-07 »
Yeah thats one of several bugs in shadows/3D.

@matchy if you want more than one shadow source you need a render call for each of the sources, so with one shadow source you render everything 2 times with 2 sources 3 times... etc.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

Offline Marmor

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 918
  • 96A285CC
    • View Profile
    • my youtube channel
Re: Shadows disappear
« Reply #4 on: 2013-Apr-07 »
or use static lightmaps for the level .

Offline BumbleBee

  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 891
    • View Profile
Re: Shadows disappear
« Reply #5 on: 2013-Apr-10 »
Thx Guys

I hope he will fix this some day. If Kitty wants to see another example i got the ultimate Demo. =D  You will see something but you won't see anything. It's just amazing.  =D  So, I have to go to work now.

Cheers

The day will come...

CPU Intel(R) Core(TM) i5-3570k, 3.4GHz, AMD Radeon 7800 , 8 GB RAM, Windows 10 Home 64Bit

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5035
  • O Rly?
    • View Profile
Re: Shadows disappear
« Reply #6 on: 2013-Apr-10 »
BumbleBee in da house! :D
Whats up my friend?

I <3 DGArray's :D

PC:
AMD Ryzen 7 1700 @3.9GHz, 16GB HyperX Fury 3000MHz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard