Just starting out? Need help? Post your questions and find answers here.
- Posts: 48
- Joined: Sat Apr 13, 2019 12:17 pm
Hi I've opened a 3d window and got a .obj mesh . How can I put it onto the screen .I have a camera .
Code: Select all
InitEngine3D() This is where I'm at.
OpenWindow(0, 0, 0, 1366, 768, "window")
OpenWindowedScreen(WindowID(0), 250, 250, 500, 500)
CompilerIf #PB_Compiler_OS = #PB_OS_Windows
Add3DArchive(#PB_Compiler_Home + "C:/users/pfabe/documents", #PB_3DArchive_FileSystem)
;CompilerElseIf #PB_Compiler_OS = #PB_OS_Linux
; Add3DArchive(#PB_Compiler_Home + "c:/users/pfabe/documents", #PB_3DArchive_FileSystem)
CreateCamera(0, 0, 0, 100, 100)
MoveCamera(0, 0, 100, 100)
- Posts: 95
- Joined: Mon Sep 03, 2012 8:52 pm
Pure Basic Ogre3D only supports the ogre3d .mesh format. The Mesh.pb example in the 3D folder of Pure Basic would explain it better.
- Posts: 1404
- Joined: Sun Jun 25, 2006 7:28 pm
natively PB can load only *.mesh files. look the examples.
but if you want to load specificaly wavefront *.obj models then we need first to extract the the coordinates, ..., and display it either by the usual OpenGl or by the native PB ogre 3d graphics. and this is complex when we consider also the normals values and texture coordinates, look a primary code to load .obj files:
while you are viewing some file, right click to show the mouse cursor and load another file
for unknown reasons the file LoadObjMesh_Tri.pb display woman.obj in PB 5.46 better than v5.71