Page 1 of 3
Suzanne model
Posted: Tue Apr 29, 2025 11:29 am
by threedslider
Hi, I have exported from Blender 4.4 for Suzanne model and successfully in loading with Purebasic 6.20
Here the screenshot :
Enjoy and happy coding !
Re: Suzanne model
Posted: Tue Apr 29, 2025 1:27 pm
by Caronte3D
Nice memories of this cute Blender pet

BTW: if you post the code and the model or the steps to export it, more users can test it

Re: Suzanne model
Posted: Tue Apr 29, 2025 2:39 pm
by threedslider
Caronte3D wrote: Tue Apr 29, 2025 1:27 pm
Nice memories of this cute Blender pet

BTW: if you post the code and the model or the steps to export it, more users can test it
Yes of course I can share you to all

!
Here the code and the model :
https://drive.google.com/file/d/1DSdlu9 ... sp=sharing
Re: Suzanne model
Posted: Tue Apr 29, 2025 3:01 pm
by threedslider
First to export by Blender 4.4, you need it :
1/ go to download with blender2ogre :
https://github.com/OGRECave/blender2ogre/releases and get the latest version and then put to export from zip which only the folder io_ogre into the Blender( example : c:\blender\4.4\scripts\addons_core\)
2/ go to download the ogre with dlls and program :
https://www.ogre3d.org/download/sdk/sdk-ogre and take the msvc if you are in windows 10/11 and unzip into the drive C:\ (example : C:\ogre_msvc\)
3/ go to download for ogre meshviewer :
https://github.com/OGRECave/ogre-meshviewer/releases and get the latest version and unzip again into the drive to C:\
4/ Some it is needed the program for the export from blender2ogre and go to download it :
https://imagemagick.org/script/download.php and take if you are in windows/10/11 as "ImageMagick-i686-pc-mingw32.tar.gz" and then unzip into the drive to C:\
5/ Now the last is to setup the path correctly so open your Blender 4.4 and go from menu edit->preferences->Add-ons and type in the box to search as "Ogre" and toggle to activate it and click the arrow to expand more info, setup it the paths as here :
Enjoy for testing this model with blender 4.4 and Purebasic 6.20

Re: Suzanne model
Posted: Tue Apr 29, 2025 3:20 pm
by threedslider
If you don't know how to export it as model, you need it that :
1/ go to Blender 4.4 and open it : delete the cube default, type on keyboard "shift+a->Mesh->Monkey" and type again as "ctrl+2" and then type "w->Shade smooth" and finally select all the light and camera with the key "shift".
2/ go on the menu File->Export->Ogre3D and save it in the drive C:\ogre and then click the button to export ogre.
Yoooohooooh got it ? !
If you have an issue so ask me ok
PS : See my code on how to load the model from my above topic, thanks.
Re: Suzanne model
Posted: Tue Apr 29, 2025 4:08 pm
by Caronte3D
Thank you for that detailed info, this will be a good starting point for beginners on 3D with PB

What's next?
PBR materials?
Skeletal animation?
BTW: In your example better change the Add3DArchive path, so the code works in the same folder where unziped

Change this:
Code: Select all
Add3DArchive("C:\ogre", #PB_3DArchive_FileSystem)
To this:
Code: Select all
Add3DArchive(".\", #PB_3DArchive_FileSystem)
Re: Suzanne model
Posted: Tue Apr 29, 2025 5:12 pm
by threedslider
Thank you @Caronte3D for the path
Next ? Well I will see it there is a tuto for that
Fisrt learn to Blender 4.4 on Youtube there is a plenty of tuto, learn to create a simple model, adding color, adding uvmapping, animate it etc...
I am still new to Ogre 3D but I will do my best to help you

Re: Suzanne model
Posted: Tue Apr 29, 2025 7:57 pm
by Caronte3D
Opss!

seems you misunderstood me

I just encourage you to learn and teach what you know to the newer users.
I was a professional Blender user long time ago (many years)

Re: Suzanne model
Posted: Wed Apr 30, 2025 8:37 am
by threedslider
@Caronte3D : Nice !
Do you have a portfolio to show us ? Thanks.
And the last, do you make a game or not from Ogre 3D with Purebasic ? If yes, any showing your good project ?
Happy coding !
Re: Suzanne model
Posted: Wed Apr 30, 2025 9:26 am
by Caronte3D
Sorry, I don't have a portfolio from that long ago and I'm not doing that anymore, but I can show you something.

Anyway, it was 3DFX, not code.
Here is a couple of short films where I worked in the 3DFX:
https://www.youtube.com/watch?v=9B-X2frY_6g
https://www.youtube.com/watch?v=rH0yY5qo9_g
https://www.dropbox.com/scl/fi/4awovr5g ... o8nnr&dl=0
Long time ago I also worked on a prototype game in Unity (unfinished):
https://www.dropbox.com/scl/fi/x9o45ccm ... 946sv&dl=0
https://drive.google.com/file/d/0B_xdDC ... MO0J9TRohw
Re: Suzanne model
Posted: Wed Apr 30, 2025 10:43 am
by threedslider
Awesome work !
Thank you for sharing !
Re: Suzanne model
Posted: Wed Apr 30, 2025 1:14 pm
by threedslider
New tutorial in coding for using with material
Here the code and model/material :
https://drive.google.com/file/d/1dTeeG1 ... sp=sharing
Now it looks like monkey with shading and specular

Re: Suzanne model
Posted: Wed Apr 30, 2025 5:43 pm
by Caronte3D
Rotating to see better the specularity
Code: Select all
InitEngine3D()
InitSprite()
InitKeyboard()
OpenWindow(0, 0,0, 800/DesktopResolutionX(), 600/DesktopResolutionY(), "Suzanne model",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, 800, 600, 0, 0, 0)
Add3DArchive(".\", #PB_3DArchive_FileSystem)
Parse3DScripts()
LoadMesh(0, "Suzanne.mesh")
;CreateMaterial(0, 0, RGB(255, 155, 0))
CreateLight(0, RGB(255,255,255), 100, 50, 50)
CreateEntity(0, MeshID(0), #PB_Material_None)
MoveEntity(0, 60, 0, 0)
CreateCamera(0, 0, 0, 100, 100)
MoveCamera(0, 60, 0, 3, #PB_Absolute)
Define rotY.d
Repeat
rotY+0.5
RotateEntity(0,0,rotY,0)
Repeat
event = WindowEvent()
Select Event
Case #PB_Event_CloseWindow
quit = 1
EndSelect
Until event = 0
ExamineKeyboard()
RenderWorld()
FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape) Or Quit = 1
End
Re: Suzanne model
Posted: Wed Apr 30, 2025 10:31 pm
by threedslider
Oh very nice for rotation !
Ok I put mine too so here the zip again for update

:
https://drive.google.com/file/d/1YZQ-OI ... sp=sharing
Thank you @Caronte3D

Re: Suzanne model
Posted: Thu Jun 12, 2025 1:08 pm
by MikeHart
@threedslider: With your latest version and PB 6.21 I get this error:
[14:06:57] Waiting for executable to start...
[14:06:57] Executable type: Windows - x64 (64bit, Unicode)
[14:06:57] Executable started.
[14:06:57] [ERROR] Monkey2.pb (Line: 30)
[14:06:57] [ERROR] The specified #Material is not initialised.