Collision detection and response ( with codes )
Collision detection and response ( with codes )
Sorry it's in french
http://perso.wanadoo.fr/comtois/sources ... ssante.zip
Need http://www.purebasic.com/beta/Ogre1.0.3.zip
If you want to compile the code , you need lib M3D_Matrix3D V2
viewtopic.php?t=17180
[EDIT]
Last demo with octree - PB4.0 Beta 7 - Dont need any lib
http://perso.wanadoo.fr/comtois/sources ... ssante.zip
Need http://www.purebasic.com/beta/Ogre1.0.3.zip
If you want to compile the code , you need lib M3D_Matrix3D V2
viewtopic.php?t=17180
[EDIT]
Last demo with octree - PB4.0 Beta 7 - Dont need any lib
Last edited by Comtois on Sat Mar 25, 2006 11:32 pm, edited 2 times in total.
Please correct my english
http://purebasic.developpez.com/
http://purebasic.developpez.com/
Why ?Kale wrote:@Fred:
Shouldn't this http://www.purebasic.com/beta/Ogre1.0.3.zip be password'ed?
Hi Kale,Kale wrote:Shouldn't this http://www.purebasic.com/beta/Ogre1.0.3.zip be password'ed?
Good Q.
Its the official "unofficial" release announced here: viewtopic.php?t=16337
Perhaps not passworded so that it can be tried with the demo version of Pure? But also perhaps an oversight?
@Comtois,
Thanks! Your work is inspiring and insightful for me.
@}--`--,-- A rose by any other name ..
Thank's all 
New demos using PB4.0 And http://www.delgine.com/
http://perso.wanadoo.fr/comtois/sources/Test3D.zip

New demos using PB4.0 And http://www.delgine.com/
http://perso.wanadoo.fr/comtois/sources/Test3D.zip
Please correct my english
http://purebasic.developpez.com/
http://purebasic.developpez.com/
Wohw. That's what I call fast sources for PB4.0Comtois wrote:Thank's all
New demos using PB4.0 And http://www.delgine.com/
http://perso.wanadoo.fr/comtois/sources/Test3D.zip

for sharing

regards,
benny!
-
pe0ple ar3 str4nge!!!
benny!
-
pe0ple ar3 str4nge!!!
The source is the same , just needed PB4 for material script 

Please correct my english
http://purebasic.developpez.com/
http://purebasic.developpez.com/
engine3D.dll from PB4.0 beta 1 ?
i try Castle.exe , and here is the Ogre.log
you can compare.
i try Castle.exe , and here is the Ogre.log
you can compare.
18:08:30: Creating resource group General
18:08:30: Registering ResourceManager for type Material
18:08:30: Registering ResourceManager for type Mesh
18:08:30: Registering ResourceManager for type Skeleton
18:08:30: OverlayElementFactory for type Panel registered.
18:08:30: OverlayElementFactory for type BorderPanel registered.
18:08:30: OverlayElementFactory for type TextArea registered.
18:08:30: Registering ResourceManager for type Font
18:08:30: ArchiveFactory for archive type FileSystem registered.
18:08:30: ArchiveFactory for archive type Zip registered.
18:08:30: DevIL version: Developer's Image Library (DevIL) 1.6.7 Aug 15 2005
18:08:30: DevIL image formats: jpg jpe jpeg pcx png tga vda icb vst raw
18:08:30: Registering ResourceManager for type HighLevelGpuProgram
18:08:30: Direct3D7 Rendering Subsystem created.
18:08:30: ----- DirectDraw Detection Starts
18:08:30: Detected DirectDraw driver Pilote d'affichage principal
18:08:30: Detected DirectDraw driver RADEON 9800 SERIES
18:08:30: ----- DirectDraw Detection Ends
18:08:30: Particle Emitter Type 'Point' registered
18:08:30: Particle Emitter Type 'Box' registered
18:08:30: Particle Emitter Type 'Ellipsoid' registered
18:08:30: Particle Emitter Type 'Cylinder' registered
18:08:30: Particle Emitter Type 'Ring' registered
18:08:30: Particle Emitter Type 'HollowEllipsoid' registered
18:08:30: Particle Affector Type 'LinearForce' registered
18:08:30: Particle Affector Type 'ColourFader' registered
18:08:30: Particle Affector Type 'ColourFader2' registered
18:08:30: Particle Affector Type 'ColourImage' registered
18:08:30: Particle Affector Type 'ColourInterpolator' registered
18:08:30: Particle Affector Type 'Scaler' registered
18:08:30: Particle Affector Type 'Rotator' registered
18:08:30: TerrainSceneManager: Registered a new PageSource for type Heightmap
18:08:30: Registering ResourceManager for type BspLevel
18:08:30: *-*-* OGRE Initialising
18:08:30: *-*-* Version 1.0.6 (Azathoth)
18:08:30: ***************************************
*** Direct3D Subsystem Initialising ***
***************************************
18:08:30: *****************************************
18:08:30: *** Direct3D Subsystem Initialised Ok ***
18:08:30: *****************************************
18:08:30: Registering ResourceManager for type GpuProgram
18:08:30: ResourceBackgroundQueue - threading disabled
18:08:30: Added resource location './Data/' of type 'FileSystem' to resource group 'General'
18:08:30: Added resource location './Data/skybox.zip' of type 'Zip' to resource group 'General'
18:08:30: Parsing scripts for resource group General
18:08:30: Parsing script Castle.material
18:08:30: Parsing script WareHouse.material
18:08:30: Parsing script waterworld.material
18:08:30: Finished parsing scripts for resource group General
18:08:30: D3D7 : Created D3D7 Rendering Window 'PureBasic Ogre' : 1280x1024, 32bpp
18:08:30: Creating DirectDraw surfaces for window with dimensions:
18:08:30: FULLSCREEN w:1280 h:1024 bpp:32
18:08:30: Successfully created full screen rendering surface / flipping chain.
18:08:30: ----- Direct3D Detection Starts
18:08:30: Detected Direct3D Device Microsoft Direct3D RGB Software Emulation
18:08:30: Direct3D Device Capabilities:
18:08:30: Hardware Accelerated: 0
18:08:30: Mipmapping: 1
18:08:30: Bilinear Filtering: 1
18:08:30: Trilinear Filtering: 1
18:08:30: Hardware Transform & Light: 0
18:08:30: Max rendering colour depth: 32
18:08:30: Max single-pass texture layers: 8
18:08:30: Pixel fog supported: 256
18:08:30: Vertex fog supported: 128
18:08:30: This device needs a Z-Buffer
18:08:30: Detected Direct3D Device Microsoft Direct3D Hardware acceleration through Direct3D HAL
18:08:30: Direct3D Device Capabilities:
18:08:30: Hardware Accelerated: 1
18:08:30: Mipmapping: 1
18:08:30: Bilinear Filtering: 1
18:08:30: Trilinear Filtering: 1
18:08:30: Hardware Transform & Light: 0
18:08:30: Max rendering colour depth: 32
18:08:30: Max single-pass texture layers: 8
18:08:30: Pixel fog supported: 256
18:08:30: Vertex fog supported: 128
18:08:30: This device needs a Z-Buffer
18:08:30: Detected Direct3D Device Microsoft Direct3D Hardware Transform and Lighting acceleration capable device
18:08:30: Direct3D Device Capabilities:
18:08:30: Hardware Accelerated: 1
18:08:30: Mipmapping: 1
18:08:30: Bilinear Filtering: 1
18:08:30: Trilinear Filtering: 1
18:08:30: Hardware Transform & Light: 1
18:08:30: Max rendering colour depth: 32
18:08:30: Max single-pass texture layers: 8
18:08:30: Pixel fog supported: 256
18:08:30: Vertex fog supported: 128
18:08:30: This device needs a Z-Buffer
18:08:30: ----- Direct3D Detection Ends
18:08:30: Determining best 3D Device...
18:08:30: Best 3D Device is: Microsoft Direct3D Hardware Transform and Lighting acceleration capable device
18:08:30: Direct3D - Creating Z-Buffer
18:08:30: Depth-Buffer created (32-bit, 8-bit stencil)
18:08:30: Registering ResourceManager for type Texture
18:08:30: RenderSystem capabilities
18:08:30: -------------------------
18:08:30: * Hardware generation of mipmaps: no
18:08:30: * Texture blending: yes
18:08:30: * Anisotropic texture filtering: yes
18:08:30: * Dot product texture operation: yes
18:08:30: * Cube mapping: yes
18:08:30: * Hardware stencil buffer: yes
18:08:30: - Stencil depth: 8
18:08:30: - Two sided stencil support: no
18:08:30: - Wrap stencil values: yes
18:08:30: * Hardware vertex / index buffers: no
18:08:30: * Vertex programs: no
18:08:30: * Fragment programs: no
18:08:30: * Texture Compression: no
18:08:30: * Scissor Rectangle: no
18:08:30: * Hardware Occlusion Query: no
18:08:30: * User clip planes: no
18:08:30: * VET_UBYTE4 vertex element type: no
18:08:30: * Infinite far plane projection: no
18:08:30: * Hardware render-to-texture: no
18:08:30: * Floating point textures: no
18:08:30: * Non-power-of-two textures: no
18:08:30: * Volume textures: no
18:08:30: Particle Renderer Type 'billboard' registered
18:08:30: Creating viewport on target 'PureBasic Ogre', rendering from camera 'MyCam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
18:08:30: Viewport for camera 'MyCam', actual dimensions L: 0 T: 0 W: 1280 H: 1024
18:08:30: Texture: Stevecube_fr.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with 0 generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
18:08:30: Texture: Stevecube_bk.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with 0 generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
18:08:30: Texture: Stevecube_lf.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with 0 generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
18:08:31: Texture: Stevecube_rt.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with 0 generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
18:08:31: Texture: Stevecube_up.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with 0 generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
18:08:31: Texture: Stevecube_dn.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with 0 generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
18:08:31: Mesh: Loading Castle.mesh.
18:08:31: Texture: Wall01.jpg: Loading 1 faces(PF_B8G8R8,256x256x1) with 0 generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
18:08:31: Texture: Wood01.jpg: Loading 1 faces(PF_B8G8R8,253x299x1) with 0 generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x512x1.
18:08:31: Texture: Wood02.jpg: Loading 1 faces(PF_B8G8R8,256x256x1) with 0 generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
18:08:31: Texture: Floor02.jpg: Loading 1 faces(PF_B8G8R8,256x256x1) with 0 generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
18:08:31: Texture: Roof03.jpg: Loading 1 faces(PF_B8G8R8,256x256x1) with 0 generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
18:08:31: Texture: Wall02.jpg: Loading 1 faces(PF_B8G8R8,256x256x1) with 0 generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
18:08:31: Texture: Floor04.jpg: Loading 1 faces(PF_B8G8R8,256x256x1) with 0 generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
18:08:31: Texture: spot_shadow_fade.png: Loading 1 faces(PF_B8G8R8,128x128x1) with 0 generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
Please correct my english
http://purebasic.developpez.com/
http://purebasic.developpez.com/
Thx Comtois.
Mine stops suddenly .. eg just writes this:
EDIT: hmmm.. starting to wonder if the d3d9dx lib is needed... since i just noticed i am missing that, however the other examples run fine on the other hand. *scratches head*
EDIT2: Updated dll s .. still nothing.. same on my other Machine ... hmm and yes i use the Beta 1 Engine3d.dll and the stl from /beta dir
Thalius
Mine stops suddenly .. eg just writes this:
The Buggy Example runs fine on teh otehr hand. Registers Textures and Objects nicely.18:16:39: Creating resource group General
18:16:39: Registering ResourceManager for type Material
18:16:39: Registering ResourceManager for type Mesh
18:16:39: Registering ResourceManager for type Skeleton
18:16:39: OverlayElementFactory for type Panel registered.
18:16:39: OverlayElementFactory for type BorderPanel registered.
18:16:39: OverlayElementFactory for type TextArea registered.
18:16:39: Registering ResourceManager for type Font
18:16:39: ArchiveFactory for archive type FileSystem registered.
18:16:39: ArchiveFactory for archive type Zip registered.
18:16:39: DevIL version: Developer's Image Library (DevIL) 1.6.7 Aug 15 2005
18:16:39: DevIL image formats: jpg jpe jpeg pcx png tga vda icb vst raw
18:16:39: Registering ResourceManager for type HighLevelGpuProgram
18:16:39: Direct3D7 Rendering Subsystem created.
18:16:39: ----- DirectDraw Detection Starts
18:16:39: Detected DirectDraw driver Primärer Anzeigetreiber
18:16:39: ----- DirectDraw Detection Ends
18:16:39: Particle Emitter Type 'Point' registered
18:16:39: Particle Emitter Type 'Box' registered
18:16:39: Particle Emitter Type 'Ellipsoid' registered
18:16:39: Particle Emitter Type 'Cylinder' registered
18:16:39: Particle Emitter Type 'Ring' registered
18:16:39: Particle Emitter Type 'HollowEllipsoid' registered
18:16:39: Particle Affector Type 'LinearForce' registered
18:16:39: Particle Affector Type 'ColourFader' registered
18:16:39: Particle Affector Type 'ColourFader2' registered
18:16:39: Particle Affector Type 'ColourImage' registered
18:16:39: Particle Affector Type 'ColourInterpolator' registered
18:16:39: Particle Affector Type 'Scaler' registered
18:16:39: Particle Affector Type 'Rotator' registered
18:16:39: TerrainSceneManager: Registered a new PageSource for type Heightmap
18:16:39: Registering ResourceManager for type BspLevel
18:16:39: *-*-* OGRE Initialising
18:16:39: *-*-* Version 1.0.6 (Azathoth)
EDIT: hmmm.. starting to wonder if the d3d9dx lib is needed... since i just noticed i am missing that, however the other examples run fine on the other hand. *scratches head*
EDIT2: Updated dll s .. still nothing.. same on my other Machine ... hmm and yes i use the Beta 1 Engine3d.dll and the stl from /beta dir
Thalius
here is a simple source (without collision) , can you try ?
Code: Select all
;Comtois 07/02/06
;PB4.0 Beta 1
;-Initialisation
If ExamineDesktops()
ScreenWidth = DesktopWidth(0)
ScreenHeight = DesktopHeight(0)
ScreenDepth = DesktopDepth(0)
Else
End
EndIf
If InitEngine3D() = 0
MessageRequester( "Erreur" , "Impossible d'initialiser la 3D , vérifiez la présence de engine3D.dll" , 0 )
End
EndIf
Add3DArchive("Data\" , #PB_3DArchive_FileSystem)
Add3DArchive("Data\skybox.zip", #PB_3DArchive_Zip)
Parse3DScripts()
If InitSprite() = 0 Or InitKeyboard() = 0 Or InitMouse() = 0
MessageRequester( "Erreur" , "Impossible d'initialiser DirectX 7 Ou plus" , 0 )
End
ElseIf OpenScreen( ScreenWidth , ScreenHeight , ScreenDepth , "Demo 3D" ) = 0
MessageRequester( "Erreur" , "Impossible d'ouvrir l'écran " , 0 )
End
EndIf
#PlayerSpeed = 7
;- Camera
CreateCamera(0, 0, 0 , 100 , 100)
CameraLocate(0,200,130,300)
AmbientColor(RGB(5,5,5))
;-Light
CreateLight(0,RGB(255,255,0))
;-SkyBox
SkyBox("Stevecube.jpg")
;-Mesh
Castle = LoadMesh(#PB_Any, "Castle.Mesh")
CreateEntity(#PB_Any, MeshID(Castle), 0)
Define.f KeyX,KeyY,MouseX,MouseY
Repeat
;ClearScreen(0)
If ExamineKeyboard()
If KeyboardPushed(#PB_Key_Left)
KeyX = -#PlayerSpeed
ElseIf KeyboardPushed(#PB_Key_Right)
KeyX = #PlayerSpeed
Else
KeyX = 0
EndIf
If KeyboardPushed(#PB_Key_Up)
KeyY = -#PlayerSpeed
ElseIf KeyboardPushed(#PB_Key_Down)
KeyY = #PlayerSpeed
Else
KeyY = 0
EndIf
EndIf
ExamineMouse()
MouseX = -(MouseDeltaX()/5)*#PlayerSpeed/2
MouseY = -(MouseDeltaY()/5)*#PlayerSpeed/2
RotateCamera(0, MouseX, MouseY, 0)
MoveCamera(0, KeyX, 0, KeyY)
RenderWorld()
FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape)
Please correct my english
http://purebasic.developpez.com/
http://purebasic.developpez.com/
Nice examples Comtois.
Looking forward to working with 3D in PB myself. Been waiting for this for some time now. Also, here's a cool terain editor that exports to the mesh format, http://freeworld3d.org/ .

www.posemotion.com
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Even the vine knows it surroundings but the man with eyes does not.
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Even the vine knows it surroundings but the man with eyes does not.