Problems with Shadows V2.0

Everything related to 3D programming
User avatar
Bananenfreak
Enthusiast
Enthusiast
Posts: 519
Joined: Mon Apr 15, 2013 12:22 pm

Problems with Shadows V2.0

Post by Bananenfreak »

Heyho,

I got Problems with our shadows... Could you open your example "TerrainShadow.pb" and use this lines down here instead of line 48 to 52?

Code: Select all

WorldShadows(#PB_Shadow_TextureAdditive, -1, RGB(105, 105, 105))
    
    ;- Light 
    ;
    light = CreateLight(#PB_Any ,RGB(255, 255, 255), 4000, 1200, 1000,#PB_Light_Directional)
Now run it and click anywhere. I do not see any shadow. Do you see a shadow? Write me please...
Image
applePi
Addict
Addict
Posts: 1404
Joined: Sun Jun 25, 2006 7:28 pm

Re: Problems with Shadows V2.0

Post by applePi »

the #PB_Shadow_TextureAdditive does not work, so use #PB_Shadow_TextureModulative which are found in character.pb example. it is not documented yet.
at first we should assign it a number, for your example give it number 1
different numbers from 0 to 5 gives different results . in the character.pb example it has value 5 , the surface there is not a terrain but a plane with CreatePlane.

Edit: i am not sure since the constant #PB_Shadow_Modulative have also value 1

Code: Select all

#PB_Shadow_TextureModulative = 1
WorldShadows(#PB_Shadow_TextureModulative, 0, RGB(127, 127, 127), 2048)
User avatar
Bananenfreak
Enthusiast
Enthusiast
Posts: 519
Joined: Mon Apr 15, 2013 12:22 pm

Re: Problems with Shadows V2.0

Post by Bananenfreak »

For me, it only works with 1, so only with "#PB_Shadow_Modulative".

I need shadows with alphaBlend-support... Is there a working one with that? (Modulative doesn´t Support it).
Image
Post Reply