>>>>> PB 6.20 -Bugs <<<<<

All bugs related to the 3D engine
User avatar
pf shadoko
Enthusiast
Enthusiast
Posts: 386
Joined: Thu Jul 09, 2015 9:07 am

>>>>> PB 6.20 -Bugs <<<<<

Post by pf shadoko »

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
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Re: >>>>> PB 6.20 -Bugs <<<<<

Post by Psychophanta »

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 :o

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)
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 782
Joined: Fri Dec 04, 2015 9:26 pm

Re: >>>>> PB 6.20 -Bugs <<<<<

Post by skinkairewalker »

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 : Image
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Re: >>>>> PB 6.20 -Bugs <<<<<

Post by Psychophanta »

In "CreateRenderTexture.pb", after line 65 if you insert (as line 66) : 'MeshVertexTextureCoordinate(0.5,0.5)',
then the code ignores this command.
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
pf shadoko
Enthusiast
Enthusiast
Posts: 386
Joined: Thu Jul 09, 2015 9:07 am

Re: >>>>> PB 6.20 -Bugs <<<<<

Post by pf shadoko »

@ 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)?
miso
Enthusiast
Enthusiast
Posts: 466
Joined: Sat Oct 21, 2023 4:06 pm
Location: Hungary

Re: >>>>> PB 6.20 -Bugs <<<<<

Post by miso »

- sprites rarely display correctly
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.
User avatar
pf shadoko
Enthusiast
Enthusiast
Posts: 386
Joined: Thu Jul 09, 2015 9:07 am

Re: >>>>> PB 6.20 -Bugs <<<<<

Post by pf shadoko »

-ConvertLocalToWorldPosition() with camera : fixed

@miso : I know, if the distance is < 1 unit (we have to remove the dephcheck)
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Re: >>>>> PB 6.20 -Bugs <<<<<

Post by Psychophanta »

pf shadoko wrote: Sat Dec 14, 2024 7:24 pm -ConvertLocalToWorldPosition() with camera : fixed
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.
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
miso
Enthusiast
Enthusiast
Posts: 466
Joined: Sat Oct 21, 2023 4:06 pm
Location: Hungary

Re: >>>>> PB 6.20 -Bugs <<<<<

Post by miso »

-ConvertLocalToWorldPosition() with camera : fixed
If nodes become fixed, it would be a very powerful tool for pb.

@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.
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Re: >>>>> PB 6.20 -Bugs <<<<<

Post by Psychophanta »

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)
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
pf shadoko
Enthusiast
Enthusiast
Posts: 386
Joined: Thu Jul 09, 2015 9:07 am

Re: >>>>> PB 6.20 -Bugs <<<<<

Post by pf shadoko »

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

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
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) ...
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Re: >>>>> PB 6.20 -Bugs <<<<<

Post by Psychophanta »

pf shadoko wrote: Mon Dec 16, 2024 4:34 pm would you like this? :
Noooo, please don't move anything, just want to know transformed coordinates, nothing more. :o :)
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
miso
Enthusiast
Enthusiast
Posts: 466
Joined: Sat Oct 21, 2023 4:06 pm
Location: Hungary

Re: >>>>> PB 6.20 -Bugs <<<<<

Post by miso »

@pf shadoko

Thank you for your time. For now, my questions considered to be answered.
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 782
Joined: Fri Dec 04, 2015 9:26 pm

Re: >>>>> PB 6.20 -Bugs <<<<<

Post by skinkairewalker »

hello all
sorry for the delay
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)?
I tested all the ones you mentioned, and as you predicted, examples involving shaders don't work on my Mac, what could be wrong?

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.
ShaderSkyWaterBump.pb

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.
ShaderPointSpriteSphere.pb

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.
ShaderCubicEnv.pb

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.
Shader.pb

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.
User avatar
DK_PETER
Addict
Addict
Posts: 904
Joined: Sat Feb 19, 2011 10:06 am
Location: Denmark
Contact:

Re: >>>>> PB 6.20 -Bugs <<<<<

Post by DK_PETER »

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
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.
Locked