pb-demo wanna take a look?

Started by Pfaber11, June 18, 2023, 12:12:41

Previous topic - Next topic

Pfaber11

Well here it is the link to my demo.

PB demo


I think it looks ok but there are areas where it is let down and for me its the shadows and the sun. I may return to it at some point but I like the comfort zone using AGK S . It took me months to do this and I do like the general result . If you look at the shadows when you are moving they resemble jelly fish and flicker around the edges. Anyway here it is . W&S and A&D to move. 
Windows 11 home edition
PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb ssd
HP Desktop; AMD 6700 A10 16GB ram 2 GB graphics card windows 10

Naughty Alien

Quote from: Pfaber11 on June 18, 2023, 12:12:41If you look at the shadows when you are moving they resemble jelly fish and flicker around the edges.
..it looks like shadowmap settings is not right..

Naughty Alien

..here is simple example, how you can soften up your shadows, without messing with Ogre materials/shaders..

Enumeration
   #cyl
   #TEX
   #TEX_plane
   #MAT
   #plane
   #LIGHT
   #CAMERA_ONE
   #BUTTON
   #mainwin
EndEnumeration
Global Quit.b = #False

If OpenWindow(#mainwin, 0, 0, 500, 480, "press ESC to exit...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)

InitEngine3D()
InitSprite()
InitKeyboard()
OpenWindowedScreen(WindowID(#mainwin), 0, 0, 500, 400, 0, 0, 0)
;WorldShadows(#PB_Shadow_Additive)
WorldShadows(#PB_Shadow_Modulative, -1, RGB(213, 250, 213))
SetFrameRate(60)

  Add3DArchive(#PB_Compiler_Home + "Examples/3D/Data/Textures", #PB_3DArchive_FileSystem)
 
  Add3DArchive("/", #PB_3DArchive_FileSystem)

CreateMaterial(#TEX_plane, LoadTexture(#TEX_plane, "white.jpg"))
CreatePlane(#plane, 10, 10, 1, 1, 1, 1)
CreateEntity (#plane, MeshID(#plane), MaterialID(#TEX_plane))
 
CreateCylinder(#cyl, 2, 4.5)
LoadTexture(#TEX, "DosCarte.png")
CreateMaterial(#MAT, TextureID(#TEX))

CreateEntity(#cyl, MeshID(#cyl), MaterialID(#MAT))
;ScaleEntity(#cyl,0.5,0.5,0.5)
EntityRenderMode(#cyl, #PB_Entity_CastShadow)
MoveEntity(#cyl,-3,2.5,0)

CreateLight(0,RGB(255,255,255),-100,40,30)
CreateLight(1,RGB(0,255,0),-100,40,30)
AmbientColor(RGB(10,10,10))

CreateCamera(#CAMERA_ONE, 0, 0, 100, 100)
MoveCamera(#CAMERA_ONE, 0, 4, 9)
CameraLookAt(#CAMERA_ONE, 0, 2, 0)

RotateCamera(#CAMERA_ONE, -15, 0, 0)
EndIf

Repeat
  Event = WindowEvent()
  RenderWorld()
  FlipBuffers()

   ExamineKeyboard()
   If KeyboardReleased(#PB_Key_Escape)
      Quit = #True
   EndIf

Until Quit = #True Or Event = #PB_Event_CloseWindow

Pfaber11

Hey thanks for the input I'm gonna have a look at it later. Bonjour
Windows 11 home edition
PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb ssd
HP Desktop; AMD 6700 A10 16GB ram 2 GB graphics card windows 10