V0.45
BlitzMax Forums/MiniB3D Module/V0.45
| ||
Download from here. All the issues from the beta have been addressed and I've finally caved in and added Max2D support so you don't have to keep adding the appropriate functions yourself. Note you must be running BlitzMax 1.26 or higher. PPC Mac users - make sure you are using the updated bmk (see here). |
| ||
Excellent, Well Done Si :-) |
| ||
Thank You. :) |
| ||
Thanks Simon! |
| ||
Simon; are you hinting that maybe BMax will be updated to work better with C++? |
| ||
No. There's an issue with BMax 1.28 on PPC Macs which prevents it compiling C++ code. |
| ||
oh.. I just tried it, and it worked just fine right out of the box.. :) |
| ||
In that case it must only be certain PPC Macs that are affected. |
| ||
Perhaps those Macs don't have XCode installed? If my laptop were working I'd test it for you, but it's in the shop. ADDITION: Okay so I just tried to update to the latest version and I get errors when I try to compile a program that uses miniB3D. I updated to the latest MingW and tried reinstalling BlitzMax when it wasn't working. I may try reinstalling everything one more time after eating something. Here is the error output: ADDITION 2: okay having reinstalled everything now it compiles without error, I just don't see anything being rendered. Note that Max2D graphics are showing up just fine, but I don't see any 3D graphics. On the off-chance that it'd work with an older version I installed BlitzMax 1.26 this time. I will try reinstalling everything from scratch one more time, using 1.28 this time. ADDITION 3: yay it works now, that was weird |
| ||
Thanks Simon. I'll test the performance on some of my projects that were a little slow when using the older versions of MiniB3d (compared to Blitz3D). |
| ||
err... is there a list of changes/improvements? EDIT: also, someone should stick it on the minib3d wiki. |
| ||
1.28 is necessary? |
| ||
The main improvements are much faster animation and collision detection. (by "faster animation" I am of course not referring to the playback speed, but how much of a hit animated characters have on the game's framerate.) |
| ||
i heard somewhere that v0.45 was gonna have something to do with terrain... confirm? |
| ||
Thanks for the update! |
| ||
Download added to the Wiki : MiniB3D Wiki Download Changelog etc will follow later on. Excellent work simonH. |
| ||
So... there are no octrees anymore? And for some reason with the new version the LoadMesh command returns a "Unhandled Memory Exception Error". Any Ideas? |
| ||
hm true, the CreateOctree command is gone. Is this related to the speedups in collision detection? Like, is this just done automatically now when you call the Collisions command? |
| ||
I get this error. any idea why? operator '+' can only be used with numeric types -> polys=polys+leaf_polys |
| ||
Well given that error message, I would assume either "polys" or "leaf_polys" is a variable of some type other than integers or floats. |
| ||
they are TPolygon variables |
| ||
Where is MouseYSpeed()? |
| ||
Heh, it seems MouseXSpeed() and MouseYSpeed() have been removed from 0.45. Here they are: Function MouseXSpeed:Float() Global oldmx:Float Local mxs:Float = MouseX() - oldmx oldmx = MouseX() Return mxs End Function Function MouseYSpeed:Float() Global oldmy:Float Local mys:Float = MouseY() - oldmy oldmy = MouseY() Return mys End Function Just make sure the Globals oldmx and oldmy don't conflict with anything in your own code. |
| ||
Any reason for leaving them out? or simply forgotten? |
| ||
I compared v042 and 045, even in the examples the Mouse speed commands have been omitted. Now that's strange, because it's deliberately omitted. |
| ||
So... there are no octrees anymore? Yes, there is - see minib3d.bmx. There are octrees, quadtrees and kd-trees - kd-trees are used by default, and are created automatically. And for some reason with the new version the LoadMesh command returns a "Unhandled Memory Exception Error". Any Ideas? Send me the b3d file and I'll take a look. I get this error. any idea why? operator '+' can only be used with numeric types -> polys=polys+leaf_polys You need to update your version of BlitzMax. From 1.26 onwards you can add arrays, which is what's happening here. Where is MouseYSpeed()? Any reason for leaving them out? or simply forgotten? They caused problems on Linux, so I decided to leave them out. They shouldn't really be a part of MiniB3D anyway. |
| ||
Memory errors here to with LoadMesh on meshes that used to load into v042 perfectly fine. |
| ||
The LoadMesh command works on my personal computer (higher specs). Did the minimum system requirements go up for some reason? |
| ||
Did you set use vbo to false in minib3d.bmx just to test if your card is just the problem or its capabilities. |
| ||
How do I stop sprites being clipped? If i use a large sprite it pops into view really late. |
| ||
I'm still getting scaling issues with animated meshes. The mesh on the right is a CopyEntity of the left mesh, scaled to 0.5, un-animated. This is fine. ![]() This time the mesh on the right is scaled to 0.5, then animated which causes him to get scaled further. ![]() If I don't scale the copied entity Animate has no effect on it's scale. However, if I scale the master mesh, then copy it, don't scale the copied mesh, then animate the copied mesh, it gets scaled again smaller than the master. |
| ||
@All haveing problems with loading meshes (unhandled memory error) could you please test this : In TSurface.bmx change the last method called FreeVBO() to this : Method FreeVBO() If vbo_id[0]<>0 Then glDeleteBuffersARB(6,vbo_id) End Method This should fix the problems. |
| ||
EdzUp, can you send me one of the .b3d files that causes the error please? Si - I'll look into that. |
| ||
simonh, the problem with loading meshes seems to be located in the method I have posted above. If you collapse the animmesh FreeVBO will be called and without checking if a vbo is attached this will result in a unhandled memory exception. I have tested it today on a not VBO capable machine and my fix seems to fix it. |
| ||
simonh sent the file to ya :) |
| ||
What have you done? I just compiled it (included MouseXYspeed before ;) ) and tried it with my project. And it's FAST!! In 0.42 it took 4-5 seconds to draw 1000 spheres on the hull of another big sphere and now, 1000 even 5000 spheres no problem. WOW! Cool and thanks |
| ||
Yes, there is - see minib3d.bmx. There are octrees, quadtrees and kd-trees - kd-trees are used by default, and are created automatically. To clarify, are you still recommending octrees for collision detection? I recall seeing something that indicated always use CreateOctree(mesh:TMesh,max_polys,max_levels) as part of setting up collision detection; is that still true? |
| ||
kd-trees are used by default, and are created automatically. I think this statement is clearly enough ;) You don't need to use the Octree anymore, you can use it if you want but kd seems to be faster. Thats the magic of VBOs A small summary about VBOs : Normally without VBOs you have to resend the vertexdata each time the model should be rendered. With VBOs the Vertexdata is stored onto the Gfx card and you only have to send a small int to say which data should be rendered. This saves a lot of bandwith and this is what makes this so fast. Btw: If you would make the spheres single surface instead of having 1000s of single objects your app will running again much faster than now ;) |
| ||
Just to clarify klepto's post, VBO's aren't related to kd-trees - the VBO comment was in response to Barbapapa. Kd-trees are what Blitz3D uses, and yes, they are generally faster than octrees and quadtrees. |
| ||
If you would make the spheres single surface instead of having 1000s of single objects your app will running again much faster than now ;) Unfortunately this is not possible as I have to keep track of every single one. Each sphere will be moving independently and later on even look different. So cool :) |
| ||
You can still modify the spheres on the mesh/vertices level, depending on your needs you can specify vertex color or UVW texture maps coordinates. For keeping track of them use a custom type. It's more tricky than having single objects but it's possible and you will feel the speed gain. |
| ||
klepto - just had a chance to look, and yes, your suggestion fixes it - thanks. |
| ||
is there something you have to do with the BeginMax2D()..EndMax2D() every time I use it I get the 2d images and no 3d. Even the Max2d example doesnt show the teapot. Just wondering as I wanted to display 2d ontop of 3d. |
| ||
first time user here, I downloaded the zip file, opened it, etc. and it compiled OK but there were a bunch of linking errors. Do you know what might cause this? |
| ||
What kind of linker errors? Which BMax Version? Which minGW Version? |
| ||
If you guys refer to my first post above, I experienced both errors before I reinstalled everything from scratch. That is, I removed BlitzMax from my system, deleted the BlitzMax directory left in Program Files, and removed MingW. Then I downloaded BlitzMax 1.18, updated to 1.28, installed the latest MingW (5.whatever) and finally put miniB3D in my mods folder to compile everything. I don't know what part exactly was causing the problems, but it all worked fine once I reinstalled from scratch. |