>>>>> PB 6.20 -Bugs <<<<<
- pf shadoko
- Enthusiast
- Posts: 386
- Joined: Thu Jul 09, 2015 9:07 am
>>>>> PB 6.20 -Bugs <<<<<
version 6.20 integrates the latest version of ogre branch 1 (ogre 1.14.3)
this update posed a number of problems
some are still unresolved (as of PB 6.20 beta 1 release date)
- ScaleµEntity causes a material lighting bug (but it works correctly from the shaders)
- shaders only take into account the first light created (and not the nearest light)
- sprites rarely display correctly
moreover (but these are not bugs) :
- Add3DArchive paths, texture and script file names... are case sensitive
- use of shadows and terrains requires the addition of an Add3DArchive folder
this update posed a number of problems
some are still unresolved (as of PB 6.20 beta 1 release date)
- ScaleµEntity causes a material lighting bug (but it works correctly from the shaders)
- shaders only take into account the first light created (and not the nearest light)
- sprites rarely display correctly
moreover (but these are not bugs) :
- Add3DArchive paths, texture and script file names... are case sensitive
- use of shadows and terrains requires the addition of an Add3DArchive folder
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
Re: >>>>> PB 6.20 -Bugs <<<<<
Lets use this thread for found problems for these betas then
I found issue with ConvertLocalToWorldPosition(). For example next code should return the value of 0.0 for GetZ(), but it returns 29.7
Another curious thing is the code hangs at the line of ConvertLocalToWorldPosition() command in PB version 6.12 , 6.04 and may be others

I found issue with ConvertLocalToWorldPosition(). For example next code should return the value of 0.0 for GetZ(), but it returns 29.7
Another curious thing is the code hangs at the line of ConvertLocalToWorldPosition() command in PB version 6.12 , 6.04 and may be others

Code: Select all
#CameraSpeed = 0.05
InitEngine3D(#PB_Engine3D_NoLog,#PB_Compiler_Home+"Compilers\Engine3d.dll")
InitSprite()
InitKeyboard()
InitMouse()
ExamineDesktops():dx=800:dy=600
OpenWindow(0,0,0,dx,dy, " ConvertLocalToWorldPosition - [Esc] quit",#PB_Window_ScreenCentered|#PB_Window_BorderLess)
OpenWindowedScreen(WindowID(0), 0, 0, dx, dy, 0, 0, 0)
Add3DArchive(#PB_Compiler_Home + "examples/3d/Data/Textures", #PB_3DArchive_FileSystem)
Add3DArchive(#PB_Compiler_Home + "examples/3d/Data/Models", #PB_3DArchive_FileSystem)
Add3DArchive(#PB_Compiler_Home + "examples/3d/Data/Packs/skybox.zip", #PB_3DArchive_Zip)
Add3DArchive(#PB_Compiler_Home + "examples/3d/Data/Scripts", #PB_3DArchive_FileSystem)
Parse3DScripts()
CreateCube(0, 5)
CreateMaterial(0, LoadTexture(0, "Dirt.jpg"))
CreateEntity(0, MeshID(0), MaterialID(0)):Pitch(EntityID(0),30,#PB_Relative|#PB_World)
SkyBox("stevecube.jpg")
CreateCamera(0,0,0,100,100)
MoveCamera(0,0,0,30, #PB_Absolute)
Repeat
While WindowEvent():Wend
ExamineKeyboard():ExamineMouse()
MouseX.f = -MouseDeltaX() * #CameraSpeed
MouseY.f = -MouseDeltaY() * #CameraSpeed
ConvertLocalToWorldPosition(CameraID(0),0,0,-30); <- GetZ() should be 0.0
debug StrF(GetX(),2)+","+StrF(GetY(),2)+","+StrF(GetZ(),2); <- GetZ() should be 0.0
;MoveEntity(0,GetX(),GetY(),GetZ(),#PB_Absolute)
RenderWorld()
FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape)
- skinkairewalker
- Enthusiast
- Posts: 782
- Joined: Fri Dec 04, 2015 9:26 pm
Re: >>>>> PB 6.20 -Bugs <<<<<
I will test some 3D examples on MacOS:
CarPhysics.pb = I can't change the numbers in the parameters next to it.
Character.pb = when moving the camera around the ogre, it seems that the camera or the 3d model starts to shake. (video below)
FacialAnimation.pb = Apparently it's ok
FPSFirstPerson = Line 86 [ERROR] The specified #Material is not initialised.
MaterialScripts.pb = Line: 522 [ERROR] The specified #Material is not initialised.
MeshManualFlag.pb = Apparently it's ok
MeshManualParametrics.pb = Apparently it's ok
MeshMorphing.pb Line: 43 [ERROR] The specified #Material is not initialised.
Pinball.pb = Apparently it's ok
Tank.pb = Apparently it's ok
ThirdyPerson.pb = I don't know what's going on... the character leans to the side as if physics impacted him (screenshot below)
Video Character.pb : https://i.imgur.com/T0Lu0oF.mp4 or https://imgur.com/a/mFoxbkG
Screenshot ThirdyPerson.pb :
CarPhysics.pb = I can't change the numbers in the parameters next to it.
Character.pb = when moving the camera around the ogre, it seems that the camera or the 3d model starts to shake. (video below)
FacialAnimation.pb = Apparently it's ok
FPSFirstPerson = Line 86 [ERROR] The specified #Material is not initialised.
MaterialScripts.pb = Line: 522 [ERROR] The specified #Material is not initialised.
MeshManualFlag.pb = Apparently it's ok
MeshManualParametrics.pb = Apparently it's ok
MeshMorphing.pb Line: 43 [ERROR] The specified #Material is not initialised.
Pinball.pb = Apparently it's ok
Tank.pb = Apparently it's ok
ThirdyPerson.pb = I don't know what's going on... the character leans to the side as if physics impacted him (screenshot below)
Video Character.pb : https://i.imgur.com/T0Lu0oF.mp4 or https://imgur.com/a/mFoxbkG
Screenshot ThirdyPerson.pb :

- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
Re: >>>>> PB 6.20 -Bugs <<<<<
In "CreateRenderTexture.pb", after line 65 if you insert (as line 66) : 'MeshVertexTextureCoordinate(0.5,0.5)',
then the code ignores this command.
then the code ignores this command.
- pf shadoko
- Enthusiast
- Posts: 386
- Joined: Thu Jul 09, 2015 9:07 am
Re: >>>>> PB 6.20 -Bugs <<<<<
@ Psychophanta
good idea to gather bug reports here
concerning ConvertLocalToWorldPosition: I'm looking for...
concerningMeshVertexTextureCoordinate: it's not a bug, it doesn't belong here
I answer anyway: MeshVertex contains UV, by adding MeshVertexTextureCoordinate, you specify a 2nd UV that is not taken into account by this material.
@skinkairewalker
the shader doesn't seem to work on your machine
can you confirm this with the examples :water.pb and shader... .pb?
moreover, in your screenshot (ThirdPerson.pb) the ground colors are not correct
can you confirm this by doing a startdrawing test (it seems that the red and blue components are inverted)?
good idea to gather bug reports here
concerning ConvertLocalToWorldPosition: I'm looking for...
concerningMeshVertexTextureCoordinate: it's not a bug, it doesn't belong here
I answer anyway: MeshVertex contains UV, by adding MeshVertexTextureCoordinate, you specify a 2nd UV that is not taken into account by this material.
@skinkairewalker
the shader doesn't seem to work on your machine
can you confirm this with the examples :water.pb and shader... .pb?
moreover, in your screenshot (ThirdPerson.pb) the ground colors are not correct
can you confirm this by doing a startdrawing test (it seems that the red and blue components are inverted)?
Re: >>>>> PB 6.20 -Bugs <<<<<
The only thing I found yet is some Z-order issue between sprites and world entities, when the camera is too close to a world entity. (world entity render overlaps the sprite) If needed, I can provide example to recreate the issue.- sprites rarely display correctly
- pf shadoko
- Enthusiast
- Posts: 386
- Joined: Thu Jul 09, 2015 9:07 am
Re: >>>>> PB 6.20 -Bugs <<<<<
-ConvertLocalToWorldPosition() with camera : fixed
@miso : I know, if the distance is < 1 unit (we have to remove the dephcheck)
@miso : I know, if the distance is < 1 unit (we have to remove the dephcheck)
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
Re: >>>>> PB 6.20 -Bugs <<<<<
Nice

Be aware when the camera is attached to a node or any. I think the 'ConvertLocalToWorldPosition()' must be based on the world absolute coordinates and world absolute orientation of the object.
Re: >>>>> PB 6.20 -Bugs <<<<<
If nodes become fixed, it would be a very powerful tool for pb.-ConvertLocalToWorldPosition() with camera : fixed
@pf shadoko
I'm not reporting a bug now, but I dont want to do feature request or pm you, and seems to be the place where I can still address you in this thread regarding the engine3d. I humbly hope I'm not doing something wrong.
- For shaders I can address textures up to 4 shadertextures. Is that enough? Could that be increased up to 8 in the future?
- Is there any way to change the entities visibility mask to cameras on the fly?
Ps:I'm not requesting anything, just asking.
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
Re: >>>>> PB 6.20 -Bugs <<<<<
Allow me to post here a request.
It is just an idea, so disregard it if is it not interesting:
Replace 'ConvertLocalToWorldPosition()' and 'ConvertWorldToLocalPosition()' functions by anothe unique:
'ConvertPosition(ObjectID, x, y, z [,Object2ID])
where ObjectID is the source (or -1 if the source is the world, in which case Object2ID is mandatory), and Object2ID is the target (-1 to get the world referred position)
It is just an idea, so disregard it if is it not interesting:
Replace 'ConvertLocalToWorldPosition()' and 'ConvertWorldToLocalPosition()' functions by anothe unique:
'ConvertPosition(ObjectID, x, y, z [,Object2ID])
where ObjectID is the source (or -1 if the source is the world, in which case Object2ID is mandatory), and Object2ID is the target (-1 to get the world referred position)
- pf shadoko
- Enthusiast
- Posts: 386
- Joined: Thu Jul 09, 2015 9:07 am
Re: >>>>> PB 6.20 -Bugs <<<<<
for this version Fred doesn't want to add any new functions, the transition is painful enough!
it'll be for the next one (I've planned some big changes)
@miso :
- MaterialShaderTexture: this function can be called several times, so you can put as many textures as you like
(this should be specified in the doc!)
- I think we'd need a SetCameraAttribute() function with, among other things, the VisibilityMask parameter.
@Psychophanta :
would you like this? :
here I've replaced objectid2 with entity because for the moment we don't have a general position/orientation function: but the next version will integrate functions like move(obectid), rotate(obectid), lookat(obectid) ...
it'll be for the next one (I've planned some big changes)
@miso :
- MaterialShaderTexture: this function can be called several times, so you can put as many textures as you like
(this should be specified in the doc!)
- I think we'd need a SetCameraAttribute() function with, among other things, the VisibilityMask parameter.
@Psychophanta :
would you like this? :
Code: Select all
Procedure convertposition(objectid1,x,y,z,entity)
ConvertLocalToWorldPosition(objectid1,x,y,z)
MoveEntity(entity,GetX(),GetY(),GetZ(),#PB_Absolute|#PB_World)
EndProcedure
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
Re: >>>>> PB 6.20 -Bugs <<<<<
Noooo, please don't move anything, just want to know transformed coordinates, nothing more.


Re: >>>>> PB 6.20 -Bugs <<<<<
@pf shadoko
Thank you for your time. For now, my questions considered to be answered.
Thank you for your time. For now, my questions considered to be answered.
- skinkairewalker
- Enthusiast
- Posts: 782
- Joined: Fri Dec 04, 2015 9:26 pm
Re: >>>>> PB 6.20 -Bugs <<<<<
hello all
sorry for the delay
My Mac`s config :
results:
water.pb
ShaderSkyWaterBump.pb
ShaderPointSpriteSphere.pb
ShaderCubicEnv.pb
Shader.pb
sorry for the delay
I tested all the ones you mentioned, and as you predicted, examples involving shaders don't work on my Mac, what could be wrong?pf shadoko wrote: Fri Dec 13, 2024 11:31 am @skinkairewalker
the shader doesn't seem to work on your machine
can you confirm this with the examples :water.pb and shader... .pb?
moreover, in your screenshot (ThirdPerson.pb) the ground colors are not correct
can you confirm this by doing a startdrawing test (it seems that the red and blue components are inverted)?
My Mac`s config :
Code: Select all
CPU: 2,6 GHz Intel Core i7 6-Core
Graphics: Radeon Pro 555X 4 GB - Intel UHD Graphics 630 1536 MB
RAM: 32 GB 2400 MHz DDR4
OsVersion : MacOs Sonoma 14.7.1
results:
water.pb
Code: Select all
[10:26:37] Waiting for executable to start...
[13:26:38] Executable type: MacOSX - x64 (64bit, Unicode)
[13:26:38] Executable started.
[10:26:38] [ERROR] Water.pb (Line: 36)
[10:26:38] [ERROR] Invalid memory access.
Code: Select all
[10:23:10] Waiting for executable to start...
[13:23:11] Executable type: MacOSX - x64 (64bit, Unicode)
[13:23:11] Executable started.
[10:23:11] [ERROR] ShaderSkyWaterBump.pb (Line: 35)
[10:23:11] [ERROR] The specified #Material is not initialised.
Code: Select all
[10:23:29] Waiting for executable to start...
[13:23:29] Executable type: MacOSX - x64 (64bit, Unicode)
[13:23:29] Executable started.
[10:23:30] [ERROR] ShaderPointSpriteSphere.pb (Line: 30)
[10:23:30] [ERROR] The specified #Material is not initialised.
Code: Select all
[10:23:55] Waiting for executable to start...
[13:23:55] Executable type: MacOSX - x64 (64bit, Unicode)
[13:23:55] Executable started.
[10:23:56] [ERROR] ShaderCubicEnv.pb (Line: 40)
[10:23:56] [ERROR] The specified #Material is not initialised.
Code: Select all
[10:24:07] Waiting for executable to start...
[13:24:08] Executable type: MacOSX - x64 (64bit, Unicode)
[13:24:08] Executable started.
[10:24:08] [ERROR] Shader.pb (Line: 33)
[10:24:08] [ERROR] The specified #Material is not initialised.
Re: >>>>> PB 6.20 -Bugs <<<<<
StaticGeometry example
StaticGeometry.pb
Using WorldShadows(#PB_Shadow_Additive) decreases the framerate considerably.
Go to 'ground' level and 'move' around - very clear when moving from one side
to the other.
No problem in version 6.1
StaticGeometry.pb
Using WorldShadows(#PB_Shadow_Additive) decreases the framerate considerably.
Go to 'ground' level and 'move' around - very clear when moving from one side
to the other.
No problem in version 6.1
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.