Orge exporter version
- Distorted Pixel
- Enthusiast
- Posts: 233
- Joined: Sun Aug 29, 2021 4:34 am
Orge exporter version
Hi, what version of Orge exporter do we need for meshes in PB 6? Is it 0.14.0?
Edit: 9-26-22
The reason I'm asking is I have been trying to modify the example code from the help files of creating a plane with a mesh, texture and material I created, but I get the following error:
[ERROR] The specified #mesh is not initialized.
I can post the code after work today
Edit: 9-26-22
The reason I'm asking is I have been trying to modify the example code from the help files of creating a plane with a mesh, texture and material I created, but I get the following error:
[ERROR] The specified #mesh is not initialized.
I can post the code after work today
To be popular is way to much work. I just want to be me, myself and I. Oh no, does that mean I'm bipolar?
No one cares how much you know until they know how much you care
No one cares how much you know until they know how much you care
- Distorted Pixel
- Enthusiast
- Posts: 233
- Joined: Sun Aug 29, 2021 4:34 am
Re: Orge exporter version
Here is the code. It errors on CreateEntity() line
I'm sorry for starting this thread here, I probably should have started it in the 3d section. My intention for starting it here is because I still consider myself a beginner sorta.
I'm sorry for starting this thread here, I probably should have started it in the 3d section. My intention for starting it here is because I still consider myself a beginner sorta.
Code: Select all
UsePNGImageDecoder
InitSprite() : InitEngine3D
OpenWindow(0, 0, 0, 1024, 768, "Plane example", #PB_Windows_SystemMenu | #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, 1024, 768, 0, 0, 0)
Add3dArchive("Entities\testfield.mesh", #PB_3DArchive_FileSystem)
Add3DArchive("Entities\testfield.material", #PB_Archive_FileSystem)
LoadMesh(0, "Entities\testfield.mesh")
LoadTexture(0, "Entities\testfield.png")
CreateMaterial(0, 0)
CreateEntity(0, MeshID(0), MaterialID(0)
SetEntityMaterial(0, MaterialID(0)
CreateCamera(0, 0, 0, 100, 100)
MoveCamera(0, 10, 1, 10, #PB_Absolute | #PB_Local)
CameraLookAt(0, 0, 0, 0)
Repeat
RenderWorld()
FlipBuffers()
Until WaitWindowEvent(1) = #PB_Event_CloseWindow
Last edited by Distorted Pixel on Mon Sep 26, 2022 7:45 pm, edited 1 time in total.
To be popular is way to much work. I just want to be me, myself and I. Oh no, does that mean I'm bipolar?
No one cares how much you know until they know how much you care
No one cares how much you know until they know how much you care
Re: Orge exporter version
Your code is full of syntax errors (on almost every line)
If you are a beginner, it is better that you study code that works (in this forum there is a lot) and modify it little by little to learn.
If you are a beginner, it is better that you study code that works (in this forum there is a lot) and modify it little by little to learn.
Re: Orge exporter version
Code: Select all
UsePNGImageDecoder()
InitEngine3D()
InitSprite()
OpenWindow(0, 0, 0, 1024, 768, "Plane example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, 1024, 768, 0, 0, 0)
Add3DArchive("C:\Program Files\PureBasic\Examples\3D\Data\Textures", #PB_3DArchive_FileSystem )
Add3DArchive("C:\Program Files\PureBasic\Examples\3D\Data\Models", #PB_3DArchive_FileSystem)
LoadMesh(0, "C:\Program Files\PureBasic\Examples\3D\Data\Models\chassis.mesh")
LoadTexture(0, "C:\Program Files\PureBasic\Examples\3D\Data\Textures\RustySteel.jpg")
CreateMaterial(0, TextureID(0))
CreateEntity(0, MeshID(0), MaterialID(0) )
SetEntityMaterial(0, MaterialID(0))
CreateCamera(0, 0, 0, 100, 100)
MoveCamera(0, 10, 1, 10, #PB_Absolute | #PB_Local)
CameraLookAt(0, 0, 0, 0)
Repeat
RenderWorld()
FlipBuffers()
Until WaitWindowEvent(1) = #PB_Event_CloseWindow
- Distorted Pixel
- Enthusiast
- Posts: 233
- Joined: Sun Aug 29, 2021 4:34 am
Re: Orge exporter version
I may have made some mistakes in posting the code because I typed it in by hand while reading it from a print out I brought to work. When I run it it doesn't get an error until the CreateEntity() line
I ran the help file code example for creating a plane and it works.
I understand what you are saying, yes I might be trying to modify too much to fast
To be popular is way to much work. I just want to be me, myself and I. Oh no, does that mean I'm bipolar?
No one cares how much you know until they know how much you care
No one cares how much you know until they know how much you care
Re: Orge exporter version
Small help, in your code :You should add a safety by replacing these two lines with this :If it displays 0 anywhere in the debugger output, this means the compiler does not find anything about files.
With this, what are the results now you can get in the debugger ?
Code: Select all
LoadMesh(0, "C:\Program Files\PureBasic\Examples\3D\Data\Models\chassis.mesh")
LoadTexture(0, "C:\Program Files\PureBasic\Examples\3D\Data\Textures\RustySteel.jpg")
Code: Select all
mesh = LoadMesh(#PB_Any, "chassis.mesh")
texture = LoadTexture(#PB_Any, "RustySteel.jpg")
Debug "mesh load = " + mesh
Debug "texture load = " + texture
End
With this, what are the results now you can get in the debugger ?
- Distorted Pixel
- Enthusiast
- Posts: 233
- Joined: Sun Aug 29, 2021 4:34 am
Re: Orge exporter version
The code you just suggested a safety about is Caronte3D's code. Mine is in the second post from top. I will work on this when I get off work in a couple of hoursOlli wrote: ↑Mon Sep 26, 2022 7:58 pm Small help, in your code :You should add a safety by replacing these two lines with this :Code: Select all
LoadMesh(0, "C:\Program Files\PureBasic\Examples\3D\Data\Models\chassis.mesh") LoadTexture(0, "C:\Program Files\PureBasic\Examples\3D\Data\Textures\RustySteel.jpg")
If it displays 0 anywhere in the debugger output, this means the compiler does not find anything about files.Code: Select all
mesh = LoadMesh(#PB_Any, "chassis.mesh") texture = LoadTexture(#PB_Any, "RustySteel.jpg") Debug "mesh load = " + mesh Debug "texture load = " + texture End
With this, what are the results now you can get in the debugger ?
To be popular is way to much work. I just want to be me, myself and I. Oh no, does that mean I'm bipolar?
No one cares how much you know until they know how much you care
No one cares how much you know until they know how much you care
Re: Orge exporter version
I've always known how to make a mess, and, what's more, without doing it on purpose!Distorted Pixel wrote:The code you just suggested a safety about is Caronte3D's code. Mine is in the second post from top.
- Distorted Pixel
- Enthusiast
- Posts: 233
- Joined: Sun Aug 29, 2021 4:34 am
Re: Orge exporter version
You're fine, I should have posted this in 3D area so we're in the same boat lol
To be popular is way to much work. I just want to be me, myself and I. Oh no, does that mean I'm bipolar?
No one cares how much you know until they know how much you care
No one cares how much you know until they know how much you care
- Distorted Pixel
- Enthusiast
- Posts: 233
- Joined: Sun Aug 29, 2021 4:34 am
Re: Orge exporter version
Ok,
I started with the CreatePlane() example code and only modified it just a bit and it works.
I should have modified a little at a time, Thank you all for helping
I started with the CreatePlane() example code and only modified it just a bit and it works.
I should have modified a little at a time, Thank you all for helping
Code: Select all
InitEngine3D()
InitSprite()
Add3DArchive("C:\Program Files\PureBasic\PureBasic Projects\Ultimate Football Manager\Images", #PB_3DArchive_FileSystem)
OpenWindow(0, 0, 0, 1024, 768, "Plane example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, 1024, 768, 0, 0, 0)
LoadTexture(0, "field.png")
CreateMaterial(0, TextureID(0))
; Camera
CreateCamera(0, 0, 0, 100, 100)
MoveCamera(0, 1, 1, 1, #PB_Absolute | #PB_Local)
CameraLookAt(0, 0, 0, 0)
; Create the plane and attach it to the scene
CreatePlane(0, 1, 1, 1, 1, 0, 0)
CreateEntity(0, MeshID(0), MaterialID(0))
Repeat
RenderWorld()
FlipBuffers()
Until WaitWindowEvent(1) = #PB_Event_CloseWindow
To be popular is way to much work. I just want to be me, myself and I. Oh no, does that mean I'm bipolar?
No one cares how much you know until they know how much you care
No one cares how much you know until they know how much you care
- Distorted Pixel
- Enthusiast
- Posts: 233
- Joined: Sun Aug 29, 2021 4:34 am
Re: Orge exporter version
I believe I understand what the Add3dArchive() is now, it is simply to set the directory of where the media you want to load is at, then you just load given files you need
To be popular is way to much work. I just want to be me, myself and I. Oh no, does that mean I'm bipolar?
No one cares how much you know until they know how much you care
No one cares how much you know until they know how much you care
Re: Orge exporter version
Yes, but it seems that Caronte3D wrote UsePNGimageDecoder() with brackets : here you have again forgotten these brackets. And the whole function also, until you want to load a png file.
- Distorted Pixel
- Enthusiast
- Posts: 233
- Joined: Sun Aug 29, 2021 4:34 am
Re: Orge exporter version
I'll check my code after work today, I believe I didn't need to call UsePNGimageDecoder() in this part of my code because I called it earlier in my program already
To be popular is way to much work. I just want to be me, myself and I. Oh no, does that mean I'm bipolar?
No one cares how much you know until they know how much you care
No one cares how much you know until they know how much you care
- Distorted Pixel
- Enthusiast
- Posts: 233
- Joined: Sun Aug 29, 2021 4:34 am
Re: Orge exporter version
Back to a question I had in beginning of this thread.
What version of Orge exporter works with PureBasic 6?
What version of Orge exporter works with PureBasic 6?
To be popular is way to much work. I just want to be me, myself and I. Oh no, does that mean I'm bipolar?
No one cares how much you know until they know how much you care
No one cares how much you know until they know how much you care