MiniB3D module for Cerberus - where to get it ?

semar

New member
Joined
Sep 4, 2019
Messages
11
Hi all,
I'm a Blitz3D user and I've read that there's a MiniB3D module for Cerberus, is it available somewhere ?
Can it be used also for HTML5 target ?

Thanks for your attention,
Sergio
 

MikeHart

Administrator
CX Code Contributor
3rd Party Module Dev
3rd Party Target Dev
3rd Party Tool Dev
Joined
Jun 19, 2017
Messages
3,453
Works great on OSX 10.14.8 on GLFW and HTML5
 

semar

New member
Joined
Sep 4, 2019
Messages
11
The MiniB3D module for Cerberus works like a charm, however I can't seem to run some of the examples, in particular:
minib3d_collision_test and minib3d_mojo_bunnies
I get this in the debuglog:
Code:
..FullShader success

..FastBrightShader success
WebGL 1.0
..WEBGL 1
Cerberus Runtime Error : NetworkError: A network error occurred.
C:/Cerberus/modules/mojo/app.cxs<220>
C:/Cerberus/modules/minib3d/tmodelobj.cxs<486>
C:/Cerberus/modules/minib3d/tmodelobj.cxs<214>
C:/Cerberus/modules/minib3d/tmodelobj.cxs<103>
C:/Cerberus/modules/minib3d/monkeyutility.cxs<223>
C:/Cerberus/modules/minib3d/examples/minib3d_mojo_bunnies.cxs<43>
C:/Cerberus/modules/minib3d/app.cxs<53>
C:/Cerberus/modules/minib3d/app.cxs<63>
C:/Cerberus/modules/mojo/app.cxs<105>

Furthermore, these commands are not accepted as overload:
Code:
SetFont(LoadImage("mojo_font.png",96,Image.XPadding))
----> Unable to find overload for SetFont(Image)
and
Code:
DrawImage(GetFont(), 100,200)
--->Unable to find overload for DrawImage(Font,int,int)
Am I missing something obvious ? I've renamed the directory to minib3d as suggested and copied it to the modules directory of Cerberus.
The animation_test, firepaint3d and pick_collision_test work fine.
Using Cerberus V2019-05-05 Trans V2019-02-21 QT V5.9.2
Ted V2019-05-04
Windows 10

Best regards,
Sergio.
 
Last edited:

adamredwoods

New member
3rd Party Tool Dev
Joined
Jun 23, 2017
Messages
42
Yup the SetFont() stuff changed (must be a Font class), which is fine I can fix that. The network error is odd. Is that just with the minib3d_mojo_bunnies?
 

semar

New member
Joined
Sep 4, 2019
Messages
11
Hi Adam,
with mojo_bunnies I get the "Unable to find overload for SetFont(Image)" error.
Once I commented it I get the (above described) Drawimage(Font,Int,Int) error.
If I comment that also I get then:
Code:
WebGL 1.0
..WEBGL 1

..FullShader success    

..FastBrightShader success    
WebGL 1.0
..WEBGL 1
Cerberus Runtime Error : NetworkError: A network error occurred.
C:/Cerberus/modules/mojo/app.cxs<220>
C:/Cerberus/modules/minib3d/tmodelobj.cxs<486>
C:/Cerberus/modules/minib3d/tmodelobj.cxs<214>
C:/Cerberus/modules/minib3d/tmodelobj.cxs<103>
C:/Cerberus/modules/minib3d/monkeyutility.cxs<223>
C:/Cerberus/modules/minib3d/examples/minib3d_mojo_bunnies.cxs<43>
C:/Cerberus/modules/minib3d/app.cxs<53>
C:/Cerberus/modules/minib3d/app.cxs<63>
C:/Cerberus/modules/mojo/app.cxs<105>

With collision_test I don't get the SetFont or DrawImage error, but directly the network error:
Code:
WebGL 1.0
..WEBGL 1

..FullShader success   

..FastBrightShader success   
Cerberus Runtime Error : NetworkError: A network error occurred.
C:/Cerberus/modules/mojo/app.cxs<220>
C:/Cerberus/modules/minib3d/tmodelobj.cxs<486>
C:/Cerberus/modules/minib3d/tmodelobj.cxs<214>
C:/Cerberus/modules/minib3d/tmodelobj.cxs<103>
C:/Cerberus/modules/minib3d/monkeyutility.cxs<223>
C:/Cerberus/modules/minib3d/examples/minib3d_collision_test.cxs<61>
C:/Cerberus/modules/minib3d/examples/minib3d_collision_test.cxs<235>
C:/Cerberus/modules/mojo/app.cxs<113>
 

adamredwoods

New member
3rd Party Tool Dev
Joined
Jun 23, 2017
Messages
42
It can't load something for some reason. Is this Windows or Linux? Which browser?
 

semar

New member
Joined
Sep 4, 2019
Messages
11
Using Cerberus V2019-05-05 Trans V2019-02-21 QT V5.9.2
Ted V2019-05-04
Windows 10
Browser Firefox Quantum 68.0.2esr (32-Bit)

Tested now with Chrome, I get this:
Code:
WebGL 1.0 (OpenGL ES 2.0 Chromium)
..WEBGL 1

..FullShader success   

..FastBrightShader success   
WebGL 1.0 (OpenGL ES 2.0 Chromium)
..WEBGL 1
Cerberus Runtime Error : NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'http://localhost:61737/data/minib3d_logo.mtl'.
C:/Cerberus/modules/mojo/app.cxs<220>
C:/Cerberus/modules/minib3d/tmodelobj.cxs<486>
C:/Cerberus/modules/minib3d/tmodelobj.cxs<214>
C:/Cerberus/modules/minib3d/tmodelobj.cxs<103>
C:/Cerberus/modules/minib3d/monkeyutility.cxs<223>
C:/Cerberus/modules/minib3d/examples/minib3d_mojo_bunnies.cxs<43>
C:/Cerberus/modules/minib3d/app.cxs<53>
C:/Cerberus/modules/minib3d/app.cxs<63>
C:/Cerberus/modules/mojo/app.cxs<105>
It seems that the file minib3d_logo.mtl is missing someway.
I'll investigate further..
 
Last edited:

semar

New member
Joined
Sep 4, 2019
Messages
11
The mojo_bunnies demo does work :)
The file minib3d_logo.mtl was missing. I've used another file and it worked.
There's no such a logo file in the whole minib3d directory though.
The overload errors by the setFont and DrawImage command are still there.
 

semar

New member
Joined
Sep 4, 2019
Messages
11
The problem resides maybe in the file monkeyutility.cxs
In the function CreateMiniB3DMonkey:TMesh()
Local MINIB3DMONKEY1$= "o minib3d_logo.obj~nmtllib minib3d_logo.mtl

By the way, was the .mtl file created with blender ? May be the texture file is missing ?
 

SLotman

Active member
3rd Party Module Dev
Tutorial Author
Joined
Jul 3, 2017
Messages
233
Hey, it's me, the annoying guy once again :p

I have a question about miniB3D: does BackBufferToTex works? I was trying to port an old 'bloom' FX I had on blitzmax, and when calling it, first I got an error on TTexture:


Cerberus:
    Method BackBufferToTex(mipmap_no=0,frame=0)
   
        TRender.render.BackBufferToTex(Self, mipmap,frame)

    End

So I changed mipmap to mipmap_no and tried again to compile. But this time, I get an error: "Indentifier BackBufferToTex not found".
If I go to TRender, I can't find a method with that name anywhere. Am I missing something?
 

SLotman

Active member
3rd Party Module Dev
Tutorial Author
Joined
Jul 3, 2017
Messages
233
Another thing: I found a small bug, which I don't know exactly how to fix.

I'm creating a mesh on the fly (trying to implement a 'trail' for moving objects) and the trail was disappearing out of nowhere. Investigating it further, I saw on TRender.RenderCamera that the 'mesh' center had a crazy value, like 100000000.

So after updating my mesh using VertexCoords, I set 'mesh.reset_bounds = true', and now it is displaying all the time as it should. It appears that VertexCoords doesn't force a 'mesh bound update'?
 
Top Bottom