Author Topic: Openb3d Roapmap  (Read 2107 times)

Offline GW

  • Jr. Member
  • **
  • Posts: 90
Re: Openb3d Roapmap
« Reply #15 on: August 11, 2017, 07:30:28 PM »
I think you'll need to use a Delegate

Offline angros47

  • Jr. Member
  • **
  • Posts: 8
Re: Openb3d Roapmap
« Reply #16 on: August 11, 2017, 07:40:18 PM »
Those commands need a callback function.

This should be a tutorial on how to call them: http://andyrushton.co.uk/csharp-calling-c-functions-csharp-callbacks/

Offline markcwm

  • Full Member
  • ***
  • Posts: 199
Re: Openb3d Roapmap
« Reply #17 on: September 24, 2017, 02:19:56 AM »
Hello,

if you're writing your own wrapper I suggest you start your own thread for it.

I have been quiet lately as I just want to get on with some basic functionality, it's coming along but there's still lots to be done. Last time I posted I had Assimp 3.2 with 64-bit and streams, but if anyone builds with TDM GCC 5.1 they'll find 3DS files won't load but all other models are fine, so I decided rather than expect users to upgrade to at least GCC 5.4 I should provide native model loaders. This decision was also because I couldn't incorporate Spinduluz's zipstream C++ code as it needed too modern C++ features. So I've got pretty solid native 3DS and B3D loaders but animation doesn't work as I have to figure that out yet! I'll also add an MD2 loader but not X because there isn't a binary loader for it and 3DS has hierarchy animation, B3D has boned animation and MD2 has vertex morphing which covers all 3 animation types. When I get these 3 formats with animation done that covers what Spinduluz did so I'll probably update the library after that. I also "nominated" a new b3d texture flag bit (4096) for streams and updated LoadTexture to support it.

@Angros, I have added Spinduluz's DDS support to the library, I suggest you add this as it's good for anyone porting code from a DX engine. The native 3DS loader is from Warner although I had to fix some issues, I suggest you port it as it can pretransform vertices and loads meshes instead of surfaces. I'm not sure if Openb3d supports hierarchy animation but I think it does, have you any X test models to share as the examples I tried just crashed (try mak_robotic.x - xof 0302txt 0064)! Another question, in the B3D model.cpp code you have a commented bit at 317 that says "***todo*** - load tex after setting values" and I wonder do we need to do anything here, it seems not to be necessary? Thanks.

Offline angros47

  • Jr. Member
  • **
  • Posts: 8
Re: Openb3d Roapmap
« Reply #18 on: September 24, 2017, 11:46:02 AM »
If with hierarchy animation you mean an animation involving child entities being moved and rotated, forming a complex structure, this is possible by attaching them to the bones of a bone animation.

The "todo" section is still there since the original work by Simon Harris, I never had any reason to modify it, since the loader seems to work correctly in its current form. It can be removed.

As I stated in the past, adding support for more formats in OpenB3D is something I would prefer to avoid, since it would increase the size and the complexity (and the amount of bugs), without providing a real advantage to the final result (the same result could be achieved by converting the texture to .png or any other supported format).

By the way, I have already decided to created a new library, that I am going to call "OpenB3d Plus", and I am working on it: I came to such a decision because I see that any further improvement to OpenB3D would likely be incompatible with some systems that are currently supported. As you might have noticed, I always tried to add features that could work on every system, even on old systems that relied on fixed function pipeline: CSG, geosphere rendering, marching cubes, particle system. Actually, OpenB3D could work even if VBOs are not supported. Once I compiled a version that required VBO to be enabled, I immediately received a compliant from someone, that the new version didn't work on his system. But at the point OpenB3D is, to add new features I would have to rely mostly on the programmable pipeline, and this would mean leaving some users behind. To avoid that situation, the best solution is to put the new features in a different library, and keeping OpenB3D in its current form.
This doesn't mean OpenB3D won't be updated. Currently, I am adding support for geometry shaders (I forgot to do it in the past), and fixing some bugs. But the new features that I am going to add will likely be in the upcoming new library, not into the core OpenB3D.

The new library is not going to replace OpenB3D, but to complete it; it will be like the GLUT library for OpenGL. It will provide some pre-made shaders for special rendering (bump mapping, interior mapping, fur rendering, glass rendering), perhaps some pre-made post processors (to do), video saving in mpeg format, and 360° video rendering (here is an example: https://www.youtube.com/watch?v=yBZevbHlbKU).

Offline RonTek

  • Sr. Member
  • ****
  • Posts: 312
Re: Openb3d Roapmap
« Reply #19 on: September 25, 2017, 01:07:49 AM »
Hey angros47, are there any standalone examples besides the demos in the BlitzMax wrapper?

I tried to download the Emscripten build, but only see a Emscripten type of file/library. I have read on the archive forum that you also have Android builds, so how do you test these builds?

Offline angros47

  • Jr. Member
  • **
  • Posts: 8
Re: Openb3d Roapmap
« Reply #20 on: September 25, 2017, 08:21:28 AM »
I don't have Android builds, I just stated that they can be done (since WebGL used by in Emscripten is a superset of GLES on Android): at the moment I haven't published Emscripten examples, yet

Offline RonTek

  • Sr. Member
  • ****
  • Posts: 312
Re: Openb3d Roapmap
« Reply #21 on: September 26, 2017, 08:47:00 AM »
I don't have Android builds, I just stated that they can be done (since WebGL used by in Emscripten is a superset of GLES on Android): at the moment I haven't published Emscripten examples, yet

Ok got it, thanks.

Offline markcwm

  • Full Member
  • ***
  • Posts: 199
Re: Openb3d Roapmap
« Reply #22 on: September 26, 2017, 05:02:44 PM »
Hello Angros,

well your plan for Openb3d Plus sounds good, I always liked that Openb3d was designed to work on older hardware ie. GL 2.0+. I know GL 2.0/GLSL 1.10 is mostly unusable when it comes to shaders but I'm more interested in having solid basic features than latest tech. I see geometry shaders are a GL 3.2 feature so will these go into Openb3d Plus? Will the new premade shaders be for Openb3d Plus? I like the sound of video rendering/saving, mpeg is a good format.

Thanks for the tip on hierarchy animation, yes I meant child entities rotated. The todo comment is not made by Simon but I see now you just set these extra values (blend, etc) after LoadTexture and he before. I'm surprised you don't want to add it as DDS is a very common texture format, it supports compression, mipmaps and cubemaps and the code by Spinduluz appears to work perfectly. It appears you removed support for mipmaps in Openb3d and I wonder why.


Offline angros47

  • Jr. Member
  • **
  • Posts: 8
Re: Openb3d Roapmap
« Reply #23 on: September 27, 2017, 12:34:18 AM »
Mipmapped textures are supported in OpenB3D. If you look at LoadAnimTexture, a mipmap is created automatically (either using GLUT, or native functions). I don't understand why you say that I removed support for them. Currently, textures are all loaded by the same loader; to keep the structure simple, a second loader can be used, but I would rather to have it in a separate library. If you are going to wrap the second library, as well, for you the fact that the loader is in the second library would not make any difference.

About geometry shaders: actually, they are created using glCreateShader, that is available on GL 2.0, and is used to create vertex and fragment shaders; it has just a different parameter passed, to create geometry shader. So, it is a small change that does not break compatibility, as long as a compatible shader is loaded. Loading a geometry shader will fail on a system with a lower version of OpenGl (but currently, this operation is not possible anyway, so it is not an issue). Instead, the new premade shaders will be for OpenB3D plus; I needed geometry shaders to be able to create a simple fur shader.

Offline markcwm

  • Full Member
  • ***
  • Posts: 199
Re: Openb3d Roapmap
« Reply #24 on: September 27, 2017, 02:32:28 AM »
Yes I saw gluBuild2DMipmaps in LoadAnimTexture but didn't look it up, Minib3d uses glTexImage2D in a mip_level loop and TTexture has a no_mipmaps field not found in Openb3d so I assumed you had changed it to a single mipmap level. Actually I need to add mipmap support to my BMX LoadTexture function as I use pixmaps when there is a progressive jpg. Thanks for clarifying that.

Offline RonTek

  • Sr. Member
  • ****
  • Posts: 312
Re: Openb3d Roapmap
« Reply #25 on: September 28, 2017, 09:19:44 AM »
Some basic feature suggestions guys, if I might add..


Texture shadows
Full exact command list with Blitz3D
Optimized collisions
Built-in or plugin physics
Proper normal mapping with directional lighting
More post process and material shader examples


OpenB3D is really close with Blitz3D and easy to use. Keep it up! :)


Offline angros47

  • Jr. Member
  • **
  • Posts: 8
Re: Openb3d Roapmap
« Reply #26 on: September 29, 2017, 10:18:42 PM »
Quote
Texture shadows
I might add them, but they would be an alternative, not a replacement for current stencil shadows: in fact, shadow mapping requires a dedicated shader on all the objects receiving the shadow; and since shaders cannot be stacked on the same mesh, this would prevent the usage of any other material on the objects that are supposed to receive the shadow. Stencil shadows don't have this limit... on the other hand, texture shadows are more detailed (for example, a tree can cast a shadow where each leaf can have its own shadow, this is not possible with stencil method). Basically, every shadow technique has advantages and disadvantages.

Quote
Full exact command list with Blitz3D
This is not possible, of course: Blitz3D has many other commands, like the 2D commands, for example, and adding them would require its own library (that would be redundant, since BlitzMax has its own 2d command set). Also, there is a small, but important difference with Blitz3D that will require to modify your software anyway: for rotations, pitch works in reverse, RotateEntity x, 90,0,0 is equivalent to RotateEntity x, -90,0,0 when switching from Blitz3D to OpenB3D: by changing it, all the code already written for OpenB3D would be broken. Also CameraPick works in reverse, row number 0 is at bottom (OpenGL works in that way)
Currently, most features from Blitz3D are supported; unsupported features are animations in .x and .3ds files (but most animated files in Blitz3D were in .B3D format, also 3ds and x models can easily be converted to .B3D), BSP models (very specific, seldom used), and tweening in RenderWorld (I never saw anyone using it in Blitz3D anyway)
Other features, like SetBuffer, are less useful without the 2d library (TextureBuffer, for example, is useful only to use 2d commands on a texture; anyway, if you have a 2d library that can draw on buffers you can use BufferToTex). Also, the solution used to render on texture in Blitz3D (rendering in background, and copying it to textures) is not possible anymore, but is useless, since OpenB3D supports direct rendering to textures with CameraToTex.

Also, since Blitz3D is now available for free, and it's open source, anyone who needs a compatibility of 100% of the code can use it: if someone wants to use OpenB3D, it's to use its more advanced features (shaders, shadows, multiplatform, possibility to use it in different languages); and that would require to modify the code anyway.

Quote
Optimized collisions
Several types of collisions are available. If the collision is against meshes organized in an octree, some optimizations are performed , so only some of the meshes are evaluated. If meshes are not managed in that way, not many automatic optimizations are possible

Quote
Built-in or plugin physics
OpenB3D supports built in actions (including Newtonian movements), dynamic collisions, constraints (through Verlet integration), and rigid bodies. So, a quick and simple customized physic engine can be implemented easily. Adding support for external third part libraries would create extra dependencies, with issues due to licensing, and versions, and this is against the design goal I have for OpenB3D.

Quote
Proper normal mapping with directional lighting
It can't be easily done with fixed function pipeline, it requires a dedicated shader, so it will be in the Plus add on

Quote
More post process and material shader examples
Already working on it


Offline ms62

  • Full Member
  • ***
  • Posts: 109
Re: Openb3d Roapmap
« Reply #27 on: October 01, 2017, 12:41:04 AM »
The material of the directx model that I load with Blitz3D is the same as the original in the 3d modeler, but when I load the model with openb3d, it is not. In openb3d, its material is all over the place. Also, in openb3d, loading time is a lot more for models with higher poly.

It is good for openb3d to have an obj loader as this format is supported for all modelers and is great  for moving the model from one app to another.

openb3d b3d loader is good, but which modeler exports to b3d?

Does the md2 loader works? I don't get any error, but I don't see the model.


Offline markcwm

  • Full Member
  • ***
  • Posts: 199
Re: Openb3d Roapmap
« Reply #28 on: October 01, 2017, 05:44:00 AM »
The X loader in Openb3d is incomplete, it's from the BB code archives so is limited to text 0302 and no animation. There are no plans to improve it.

To load OBJ you can use the Assimp library module which supports lots of formats (including X) but no animation yet. Note that 3DS files don't work with MinGW GCC 5.1.

The B3D loader is from Minib3d source, there are lots of B3D exporters mostly plugins for modellers like Blender, Ultimate Unwrap, Milkshape.

The MD2 loader should work fine it's from Minib3d Extended, I haven't really tested it much but it supports vertex interpolation, see the examples/standard folder. It may be you can't see it because the camera's inside it, try ScaleEntity to shrink it down.

The wrapper also has native 3DS and B3D loaders (MD2 is todo and there's no animation yet). This is so streams can be used.

Offline ms62

  • Full Member
  • ***
  • Posts: 109
Re: Openb3d Roapmap
« Reply #29 on: October 01, 2017, 11:42:13 AM »
I forgot that I have Ultimate Unwrap. I will use it for b3d. AC3D exports to md2 also, I have that option. I use one of those two. I don’t need animation, the only animation for my spaceship will be its body part which I think I can do by using seperate meshes and rotation. In case of the md2 model, I thought it might be the scale, I will shrink the object more. The good think about x and Blitz3D is that x with only material looks good, and in the early stage of coding you don’t need more than that. Thanks, I think I know which way to go.

I forgot to say, I used the NG version of openb3d. I think using NG and its related modules and wrappers is the only way to keep hope that BlitzMax will continue.