PB 6.00 shadows

Everything related to 3D programming
pfaber11
Enthusiast
Enthusiast
Posts: 145
Joined: Sat Apr 13, 2019 12:17 pm

PB 6.00 shadows

Post 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
Krix
User
User
Posts: 65
Joined: Fri Mar 11, 2005 6:24 pm
Location: Toronto

Re: PB 6.00 shadows

Post 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.
pfaber11
Enthusiast
Enthusiast
Posts: 145
Joined: Sat Apr 13, 2019 12:17 pm

Re: PB 6.00 shadows

Post 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 .
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1243
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Re: PB 6.00 shadows

Post 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?
Image Image
pfaber11
Enthusiast
Enthusiast
Posts: 145
Joined: Sat Apr 13, 2019 12:17 pm

Re: PB 6.00 shadows

Post 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 .
pfaber11
Enthusiast
Enthusiast
Posts: 145
Joined: Sat Apr 13, 2019 12:17 pm

Re: PB 6.00 shadows

Post by pfaber11 »

Got my shadows working nicely now really not too difficult . Thanks for the help.
Post Reply