Suzanne model

Everything related to 3D programming
threedslider
Enthusiast
Enthusiast
Posts: 396
Joined: Sat Feb 12, 2022 7:15 pm

Suzanne model

Post by threedslider »

Hi, I have exported from Blender 4.4 for Suzanne model and successfully in loading with Purebasic 6.20 :mrgreen: 8)

Here the screenshot :

Image

Enjoy and happy coding !
User avatar
Caronte3D
Addict
Addict
Posts: 1361
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: Suzanne model

Post by Caronte3D »

Nice memories of this cute Blender pet :D
BTW: if you post the code and the model or the steps to export it, more users can test it :wink:
threedslider
Enthusiast
Enthusiast
Posts: 396
Joined: Sat Feb 12, 2022 7:15 pm

Re: Suzanne model

Post by threedslider »

Caronte3D wrote: Tue Apr 29, 2025 1:27 pm Nice memories of this cute Blender pet :D
BTW: if you post the code and the model or the steps to export it, more users can test it :wink:
Yes of course I can share you to all :wink: !

Here the code and the model :
https://drive.google.com/file/d/1DSdlu9 ... sp=sharing
threedslider
Enthusiast
Enthusiast
Posts: 396
Joined: Sat Feb 12, 2022 7:15 pm

Re: Suzanne model

Post 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 : Image

Enjoy for testing this model with blender 4.4 and Purebasic 6.20 :mrgreen:
threedslider
Enthusiast
Enthusiast
Posts: 396
Joined: Sat Feb 12, 2022 7:15 pm

Re: Suzanne model

Post 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 ? ! :shock: :mrgreen:

If you have an issue so ask me ok :D

PS : See my code on how to load the model from my above topic, thanks.
Last edited by threedslider on Tue Apr 29, 2025 5:06 pm, edited 1 time in total.
User avatar
Caronte3D
Addict
Addict
Posts: 1361
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: Suzanne model

Post by Caronte3D »

Thank you for that detailed info, this will be a good starting point for beginners on 3D with PB :wink:
What's next?
PBR materials?
Skeletal animation?
8)

BTW: In your example better change the Add3DArchive path, so the code works in the same folder where unziped :wink:
Change this:

Code: Select all

Add3DArchive("C:\ogre", #PB_3DArchive_FileSystem)
To this:

Code: Select all

Add3DArchive(".\", #PB_3DArchive_FileSystem)
threedslider
Enthusiast
Enthusiast
Posts: 396
Joined: Sat Feb 12, 2022 7:15 pm

Re: Suzanne model

Post by threedslider »

Thank you @Caronte3D for the path :shock:

Next ? Well I will see it there is a tuto for that :wink:

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... :P

I am still new to Ogre 3D but I will do my best to help you :mrgreen:
User avatar
Caronte3D
Addict
Addict
Posts: 1361
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: Suzanne model

Post by Caronte3D »

Opss! :shock: seems you misunderstood me :D
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) :wink:
threedslider
Enthusiast
Enthusiast
Posts: 396
Joined: Sat Feb 12, 2022 7:15 pm

Re: Suzanne model

Post by threedslider »

@Caronte3D : Nice ! :D

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 ? :shock:

Happy coding !
User avatar
Caronte3D
Addict
Addict
Posts: 1361
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: Suzanne model

Post 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. :lol:
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
threedslider
Enthusiast
Enthusiast
Posts: 396
Joined: Sat Feb 12, 2022 7:15 pm

Re: Suzanne model

Post by threedslider »

Awesome work ! :shock:

Thank you for sharing !
threedslider
Enthusiast
Enthusiast
Posts: 396
Joined: Sat Feb 12, 2022 7:15 pm

Re: Suzanne model

Post by threedslider »

New tutorial in coding for using with material :D

Here the code and model/material :
https://drive.google.com/file/d/1dTeeG1 ... sp=sharing

Now it looks like monkey with shading and specular 8)
Last edited by threedslider on Wed Apr 30, 2025 10:33 pm, edited 1 time in total.
User avatar
Caronte3D
Addict
Addict
Posts: 1361
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: Suzanne model

Post by Caronte3D »

Rotating to see better the specularity :D

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
threedslider
Enthusiast
Enthusiast
Posts: 396
Joined: Sat Feb 12, 2022 7:15 pm

Re: Suzanne model

Post by threedslider »

Oh very nice for rotation ! :shock:

Ok I put mine too so here the zip again for update :mrgreen: : https://drive.google.com/file/d/1YZQ-OI ... sp=sharing

Thank you @Caronte3D 8)
User avatar
MikeHart
User
User
Posts: 17
Joined: Sat Sep 02, 2017 7:29 pm
Location: Germany

Re: Suzanne model

Post 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.
Post Reply