Page 1 of 1

PB 6.00 shadows

Posted: Sun Aug 14, 2022 3:44 pm
by pfaber11
Hi I am trying to add shadows but so far have none . I have been using

Code: Select all

 CreateLight(1,RGB(10,10,10),500,500,500,#PB_Light_Directional)

Code: Select all

WorldShadows(#PB_Shadow_Additive,100,#Black) 
 EntityRenderMode(1,#PB_Entity_CastShadow)
What I want to do is simulate the sun and have shadows .

Thanks for reading

Re: PB 6.00 shadows

Posted: Fri Aug 19, 2022 5:18 am
by Krix
You set your shadow distance to 100 so no shadow for objects that are further away from the camera. Try to increase this number first. There is also a WorldShadows.pb example in the Examples\3D folder. That is a working code so it's worth studying.

Re: PB 6.00 shadows

Posted: Sat Aug 20, 2022 8:19 pm
by pfaber11
Thanks for the reply Krix I will go and look at the example . I'm getting up to speed with PB now . I've been studying and experimenting for nearly 4 months and I think PB is worth the bother. Really looking forward to OpenGL when it's had terrain bug ironed out . Has anybody any idea when OpenGL
will be fully functional . I would settle for DirectX9 but for some reason DrawText doesn't want to work with it . Is there an alternative or work around or a different way to get my scoring and other 2d stuff on to the screen .
Thanks for reading .

Re: PB 6.00 shadows

Posted: Sat Aug 20, 2022 8:43 pm
by Paul
pfaber11 wrote: Sat Aug 20, 2022 8:19 pm Is there an alternative or work around or a different way to get my scoring and other 2d stuff on to the screen .
Since you are using 3D can you not use the Text3D commands?

Re: PB 6.00 shadows

Posted: Sun Aug 21, 2022 9:53 am
by pfaber11
I did look at that and I'm gonna go back over it in detail. Once the terrain issue in OpenGL is sorted I'll be using that.
Thanks for the suggestion . I'll post back when I have tried it .

Re: PB 6.00 shadows

Posted: Sat Oct 01, 2022 8:05 pm
by pfaber11
Got my shadows working nicely now really not too difficult . Thanks for the help.