SyntaxBomb - Indie Coders

Languages & Coding => BlitzMax / BlitzMax NG => MiniB3D => Topic started by: markcwm on June 23, 2017, 11:43:28 PM

Title: OpenB3DMax Roapmap
Post by: markcwm on June 23, 2017, 11:43:28 PM
What Is It?
OpenB3DMax is a free open-source OpenGL 1.4+ 3D engine with almost the same syntax as MiniB3D and based on the famous Blitz3D. Currently there are still unresolved issues and bugs as well as to-do features which are listed below. There are no GL 3+ features and GLES is not supported.

Where Can I Get It?
The most up-to-date version is on Github @openb3dmax.mod (https://github.com/markcwm/openb3dmax.mod) and example source code is a separate download @openb3dmax.docs (https://github.com/markcwm/openb3dmax.docs). The latest version has all fixes by DruggedBunny (B3Dsound & EntityName for GetChild, no Doxygen), all new features by Spinduluz (DDS & file streams, FreeShader & FreeStencil), and all changes by Brucey (Newton in openb3dlibs.mod & SDL compatible), so please don't use these forks. The latest OpenB3d library by Angros47 is on Sourceforge @minib3d/files (http://sourceforge.net/projects/minib3d/files/).

How Do I Install It?
You will need GCC to build modules, see the first two steps in this install guide (http://www.syntaxbomb.com/index.php/topic,61.0.html). To use NG the easiest way to start is to get a release (https://github.com/bmx-ng/bmx-ng/releases) no newer than v0.87 but it is possible to use later versions.

Why Does Latest NG Give A Build Error?
Some versions of NG releases with GCC 7.2 appeared to break the wrapper, I'm not sure what's going on there so please try another release if the module won't build for you.

How Do I Use Command Line?
I recommend to use the Cmd or Terminal to build modules, but if you do use MaxIDE then keep the Quick Build option on to avoid rebuilding everything. With NG always add -w overload warnings to avoid errors, so to build from Cmd in 64-bit debug only is:
Code: [Select]
bmk makemods -d -w -g x64 openb3dmaxOr for BRL (legacy) BlitzMax:
Code: [Select]
bmk makemods -d openb3dmax
Features - To do
* Quaternion math functions
* Port of more Blitz3D docs
* Better physics with Newton.mod

Features - Maybe later
* Terrain shader
* Soft shadow shaders
* Better bumpmap shader
* Water shader
* MS3D, MD3, BSP streamed loaders
* Quad system for stars, asteroids, trees, candle lights

Features - Probably not going to happen
* Support for GLES (unresolved build errors for Android)
* Animated 3d models with Assimp mod
* FBX streamed loader
* PBR
* Split Shadow mapping
* Hardware skinning
* Scenegraph or Quadtree
* Open Simplex Noise implementation

Old Topics
* MiniB3D for FreeBasic (http://www.freebasic.net/forum/viewtopic.php?t=15409)
* OpenB3D Wrapper Part 4 (http://mojolabs.nz/posts.php?topic=106095)
* OpenB3D Wrapper Part 3 (http://mojolabs.nz/posts.php?topic=105082)
* OpenB3D Wrapper Part 2 (http://mojolabs.nz/posts.php?topic=103682)
* OpenB3D Wrapper (http://mojolabs.nz/posts.php?topic=102556).
Title: Re: Openb3d Roapmap
Post by: Naughty Alien on June 24, 2017, 04:32:29 AM
-Hardware skinning
-FBX support(both static and animated, making OpenB3D widely open to variety of modeling tools)
-Bullet physics
-Integrate RakNet (its free now?)
-PBR
-Split Shadow mapping

I would recommend to make updates rock solid on existing platforms OpenB3D runs already, before any new target is introduced..
Title: Re: Openb3d Roapmap
Post by: markcwm on June 25, 2017, 04:18:58 AM
Yes, Raknet is free, have you used it? I've never looked at it. Do you mean Brucey's mod or RepeatUntil and jimon's mod? I can see it's got great docs which Gnet lacks, Bnet has a nice tutorial by Eikon, BnetEx was changed but seems not to be an improvement.

Android is a high priority for me, it won't be unstable if Angros has done the GLES port right but I'll put out a release before I update to GLES.

I think I'll probably use Assimp for FBX support, it uses Boost which makes it big but I think you can choose not to use it.
Title: Re: Openb3d Roapmap
Post by: Naughty Alien on June 25, 2017, 06:40:19 AM
Oh..Assimp looks beautiful..that would be actually betetr than FBX alone..

..one question i never asked..is OpenB3D available for C++ ??
Title: Re: Openb3d Roapmap
Post by: markcwm on June 25, 2017, 05:11:23 PM
There's no examples for C++ but Angros answered this http://wasted.nz/posts.php?topic=107042
Title: Re: Openb3d Roapmap
Post by: Krischan on June 25, 2017, 06:57:05 PM
I'm still missing a unique logo for OpenB3D, so I created one for myself (for example for a title screen logo "Made with OpenB3D"). I tried to maintain the old Blitzplus/Blitz3D/Blitzmax logo and color style but with a noticable difference: an enclosed "B3D" text in a rounded triangle with a free levitating "Open" above it to emphasize that it has to do with OpenGL or Open Source instead of the old circle in the background. The used font is the free "Monkirta Pursuit NC (http://www.dafont.com/de/monkirta-pursuit-nc.font)" font which looks quite similar to the old one, is futuristic and has a good readability. The logo aspect is 2:1 and it is available in resolutions up to 2048x1024. Oh, and because I've only used a few colors and color stepping the compression, scaling and readability is very good even in low resolutions ;D

What do you think?

(http://www.christianhart.de/bmax/openb3d/logo/openb3d_logo_512.png)
Title: Re: Openb3d Roapmap
Post by: Krischan on June 25, 2017, 07:07:15 PM
For the wishlist:

- what about TBatchsprites?
- a Quad system for stars, asteroids, trees, candle lights
- a Scenegraph or Quadtree
- a subdivided spherized cube algorithm for seamless orbit to planet surface transition
- open Simplex Noise implementation, which is very fast and free to use
- a BSP loader ;-) ok I nearly completed my own but without patches/VIS calculation
Title: Re: Openb3d Roapmap
Post by: markcwm on June 25, 2017, 11:12:52 PM
Hey thanks Krischan! 8) I've added it to my git readme now, it looks nice, good colors!

I think there is a sprite batch in there, I tried to make an example once but I didn't understand it.
The BSP loader would be nice.
Title: Re: Openb3d Roapmap
Post by: Krischan on June 26, 2017, 07:46:55 AM
Wow, looks good there 8) For the BSP loader: when I've finished it I think I should create a more general and stripped version of it or split it into a separate TBSPlevel and a TBSPentity type first. The TBatchsprite should use a single surface Entity but still work like sprites. For the Quads I can provide an example later, same for the TScenegraph.

For the OpenSimplex Noise I started a thread (http://wasted.nz/posts.php?topic=107264) in the old BB forum last year but unfortunately never got an answer, there is a C++ implementation linked to Github but I've never got it running in Blitzmax and I still don't know how to include it :-(

Oh, I forgot to mention the TBeat Type from the Code Archives (http://wasted.nz/codearcs.php?code=1721), which is a useful addition, too:
Code: [Select]
' ------------------------------------------------------------------------------------------------
' Usage: Global MainBeat:TBeat = New TBeat.Create (Rand(10,200) , FunctionToExecute)
' ------------------------------------------------------------------------------------------------
Type TBeat

Field Length:Int ' Length of Beat in Milli seconds
Field Ticker:TTimer ' The actual Timer
Field MyEvent:TEvent = New TEvent ' The Event the Timer is tied to
Field BeatFunction(Caller:TBeat, event:TEvent) ' The Function to be called on Beat

Method Create:TBeat (Length:Int = 1000, BeatFunction(Caller:TBeat, event:TEvent) = Null)

Self.Length = Length ' Let the New Beat length = length
Local hertz:Float = 1000.0 / Length ' Stupid Bmx Hertz
AddHook EmitEventHook, EventHook, Self ' Start the Hook
Self.Ticker = CreateTimer (hertz) ' Create the timer
Self.BeatFunction = BeatFunction ' Set the Function to call
Return Self ' Return the New TBeat

End Method

Function EventHook:Object(id:Int, data:Object, context:Object)

If TBeat(context) TBeat(context).Ev TEvent(data) ;Return data

EndFunction

Method free()

' Release the Hook
RemoveHook EmitEventHook, EventHook

' Do Garbage Collection
GCCollect()

End Method

Method Ev(event:TEvent)

' See if the Event was A Beat
If event.id = EVENT_TIMERTICK And event.source = Ticker

' Pass control tothe right Function
BeatFunction(Self, event)

EndIf

End Method

Method HowManyTicks:Int ()

' Return the number of Ticks
Return TimerTicks(Ticker)

EndMethod

Method GetFrequancy:Float ()

' Return the Hertz
Return (1000.0 / Length)

End Method

End Type
Title: Re: Openb3d Roapmap
Post by: Naughty Alien on July 19, 2017, 04:20:33 AM
..VR support ? (Oculus or any other??)
Title: Re: Openb3d Roapmap
Post by: angros47 on August 06, 2017, 04:36:20 PM
Actually, the last version supports Emscripten. I haven't tested on Android, but in theory it should work (WebGL is a subset of GLES2, so any code made for WebGL should work on GLES2, while the opposite is not always true)
Title: Re: Openb3d Roapmap
Post by: markcwm on August 07, 2017, 04:27:01 PM
Hi Angros, I thought v 1.15 was GLES2 not WebGL. Well good to know, thanks.
Title: Re: Openb3d Roapmap
Post by: angros47 on August 08, 2017, 10:10:14 PM
WebGL is basically GLES2, with some restrictions (for example, using VBO is mandatory in WebGL, while it's not in GLES2).

Also, I just put online version 1.20: improved the shader part (it should be faster and more stable), fixed some bugs, and added an experimental multipass postprocessor; so, SSAO, bloom and similar things should be possible
Title: Re: Openb3d Roapmap
Post by: markcwm on August 09, 2017, 08:37:06 AM
This is excellent news Angros, glad you are still updating the library. I'm looking forward to trying out the multipass shader stuff. 8)

So what I've been doing is trying to get Assimp working nicely which it is, now it just needs animations. I have added the 64-bit code, loading with koriolis.zipstream and updated from 3.1.1.to 3.2. After the update 3DS files completely stopped loading in windows, I'm happy though as FBX and BLEND had random crashes in 3.1.1.

I noticed 3.2 3DS loads fine in ubuntu (gcc 5.4) and Mac (*clang/llvm), so I realize it's time to drop tdm-gcc as they haven't updated 5.1 since 2013. I'm fairly sure it's impossible to update Assimp past 3.2 without updating gcc 5.1. The problem was an out-dated standard library header for "memory" this gets included by 3DS in 3.2, there are probably more issues.

* Mac uses llvm (low level virtual machine) as a compiler backend and clang as a frontend, gcc has it's own frontend and backend.

Edit:
Quote
The problem was an out-dated standard library header for "memory"
This is due to Assimp using later versions of GCC, I believe C++11 support.
Title: Re: Openb3d Roapmap
Post by: Kronos on August 11, 2017, 06:40:51 PM
Hi I have spent the last couple of days wrapping the OpenB3D.dll for C# using Angros47 freebasic as a guide however I am stuck on a couple of  commands which seem to call functions inside the calling functions.

declare sub FluidFunction cdecl alias "FluidFunction" (byval fluid as any ptr, ScalarField as Function(x as single, y as single, z as single) as single)
declare sub EmitterParticleFunction cdecl alias "EmitterParticleFunction" (byval emit as any ptr, EmitterFunction as Sub(ent as any ptr, life as integer))

Anyone know how I would wrap these?
Title: Re: Openb3d Roapmap
Post by: GW on August 11, 2017, 07:30:28 PM
I think you'll need to use a Delegate
Title: Re: Openb3d Roapmap
Post by: angros47 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/ (http://andyrushton.co.uk/csharp-calling-c-functions-csharp-callbacks/)
Title: Re: Openb3d Roapmap
Post by: markcwm on September 24, 2017, 02:19:56 AM
Hello,

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.
Title: Re: Openb3d Roapmap
Post by: angros47 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 (https://www.youtube.com/watch?v=yBZevbHlbKU)).
Title: Re: Openb3d Roapmap
Post by: RonTek 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?
Title: Re: Openb3d Roapmap
Post by: angros47 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
Title: Re: Openb3d Roapmap
Post by: RonTek 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.
Title: Re: Openb3d Roapmap
Post by: markcwm 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.

Title: Re: Openb3d Roapmap
Post by: angros47 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.
Title: Re: Openb3d Roapmap
Post by: markcwm 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.
Title: Re: Openb3d Roapmap
Post by: RonTek 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! :)

Title: Re: Openb3d Roapmap
Post by: angros47 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

Title: Re: Openb3d Roapmap
Post by: ms62 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.

Title: Re: Openb3d Roapmap
Post by: markcwm 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 (https://github.com/markcwm/openb3dlibs.mod) 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.
Title: Re: Openb3d Roapmap
Post by: ms62 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.
Title: Re: Openb3d Roapmap
Post by: ms62 on October 01, 2017, 03:16:36 PM
markcwm,

it seems my problem with loading MD2 model was not the scale, it was using LoadMesh instead of LoadAnimMesh. Openb3d doesn't have LoadMD2.
Title: Re: Openb3d Roapmap
Post by: ms62 on October 01, 2017, 03:24:55 PM
Just a question. Instead of relying on assimp, as it has dependencies, why not choosing a commonly used and tested 3d format like fbx as default for openb3d? Sometimes having too many choices is bad thing. Having just one good file format will create one good quality piece of work.
Title: Re: Openb3d Roapmap
Post by: markcwm on October 01, 2017, 05:53:44 PM
I haven't got AC3D, I will have to have a look at it. Ultimate Unwrap is a great converter as it has lots of formats. Animation will be added soon, first for the default formats then to the Assimp wrapper. Actually, I've changed my mind about X now so I'll try to improve it, maybe add a binary loader.

I recommend using Bmx NG 0.87 release then to use Bmx BRL/legacy only for testing if you think you've found a bug with NG. The next step would be to test with Bmx NG latest source and then post an issue on Github or on the Syntaxbomb board Brucey's Modules.

Yes you're right LoadMesh doesn't work with MD2, this is because the library assumes MD2 to be animated only, there is no code for the loader in LoadMesh. I haven't added a native MD2 loader yet, I'm in the process of doing just that. The commands "LoadMeshFormat" are temporary, there will be a flag so you can choose library or native/Bmx loaders.

FBX is a complicated format and I'd rather avoid adding any new default loaders, besides you can easily customize the Assimp wrapper to only build the FBX loader or whatever else you want, it's in the Readme.
Title: Re: Openb3d Roapmap
Post by: ms62 on October 01, 2017, 10:56:52 PM
Which 3d file format you have chosen to be the default one, or to be the main one for openb3d in long run, something like after 5 years? Or, to say, you like openb3d will be known for? You can invent yours, but modelers must support it or you need to provide loader for each of them.

Most 3D modelers support obj and fbx. The best 3d modeler, imo, is Maya and it supports both. However, it is up to you; converters have advanced and it seems they do good job.
Title: Re: Openb3d Roapmap
Post by: markcwm on October 02, 2017, 12:15:01 AM
B3D is the default file format as in Minib3d and Blitz3d, it supports skeletal animation and 2 uv sets for lightmaps but if speed becomes an issue then MD2 is supposedly faster. B3D is superior to 3DS as it only supports hierarchy animation (no vertices). X supports hierarchy and skeletal animation but the loader needs a rewrite. I have no intention to write a new file format as there are too many already. OBJ doesn't have any animation and has only 1 uv set. I think Maya is very expensive but I'm sure it's great.
Title: Re: Openb3d Roapmap
Post by: RonTek on October 02, 2017, 12:59:07 AM
B3D is the default file format as in Minib3d and Blitz3d, it supports skeletal animation and 2 uv sets for lightmaps but if speed becomes an issue then MD2 is supposedly faster. B3D is superior to 3DS as it only supports hierarchy animation (no vertices). X supports hierarchy and skeletal animation but the loader needs a rewrite. I have no intention to write a new file format as there are too many already. OBJ doesn't have any animation and has only 1 uv set. I think Maya is very expensive but I'm sure it's great.

I agree, but since it follows Blitz3D overall, I think it should be B3D only format all the way. You could ignore the MD2, X and Obj stuff, B3D is a complete and nice 3D format. I guess if you're following the complete command set (LoadMD2, etc.), you need to support it.
Title: Re: Openb3d Roapmap
Post by: ms62 on October 02, 2017, 05:18:27 AM
I don’t think that following Blitz3D exactly is reasonable, but sticking to one file format reduces the workload and helps reaching the final goal faster. Since b3d models  already work and are supported by openb3d, it makes sense to rely on that and spend time on other the issues.

One issue is to make applying shadows easier. I will look at the code examples that are in openb3d folder to see how I can use them for my app. I am sure I have to eliminate objects of the scene to get to the  core of the implimentation. That takes time. I wish there was a simple two objects example, one a box and the other a plane to see how it is done. Now I have to do open heart surgery on them   ??? Demos are not good tutorial. They are actually very bad tutorials. In other words, when features of a product are demonstrated, those demonstrations are not tutorial. They may actually turn off the beginners, while atract experienced customers.

Title: Re: Openb3d Roapmap
Post by: markcwm on October 02, 2017, 04:47:00 PM
Yes, you're right okay, here's a basic stencil shadows example.
Code: [Select]
' stencil_shadows3.bmx
' stencil shadows

Strict

Framework openb3d.B3dglgraphics

Graphics3D DesktopWidth(),DesktopHeight(),0,2

Local camera:TCamera=CreateCamera()
PositionEntity camera,0,0,-15

Local light_piv:TPivot=CreatePivot()
Local light:TLight=CreateLight(2,light_piv)
PositionEntity light,25,10,25

Local plane:TMesh=CreateCube()
ScaleEntity plane,25,0.1,25
MoveEntity plane, 0, -2, 0
Local tex:TTexture = LoadTexture("../media/Moss.bmp")
EntityTexture(plane, tex)

Local cube:TMesh = CreateCube()
Local tex2:TTexture = LoadTexture("../media/test.png", 0) ' solid
EntityTexture(cube, tex2)
Local cube_shadow:TShadowObject=CreateShadow(cube)

Local alpha_piv:TPivot=CreatePivot()

Local cube2:TMesh = CreateCube(alpha_piv)
PositionEntity cube2,-5,-1,-5
EntityTexture(cube2, tex2)
Local cube_shadow2:TShadowObject=CreateShadow(cube2)

Local alpha_cube:TMesh = CreateCube(alpha_piv)
PositionEntity alpha_cube,5,-1,5
Local alpha_tex:TTexture = LoadTexture("../media/alpha_map.png", 2) 'Change this to 0 or 1 for correct depth testing
EntityTexture(alpha_cube, alpha_tex)
'Local cube_shadow3:TShadowObject=CreateShadow(alpha_cube)


While Not KeyDown(KEY_ESCAPE)

TurnEntity alpha_piv,0,KeyDown(KEY_D)-KeyDown(KEY_A),0
TurnEntity light_piv,0,KeyDown(KEY_LEFT)-KeyDown(KEY_RIGHT),0
TurnEntity cube,1,1,1

CameraClsMode camera,1,1 ' by default alphamaps get blended with shadows
RenderWorld

Text 0,20,"Arrows: turn light, AD: turn alpha cube, Memory: "+GCMemAlloced()

Flip(1)
GCCollect

Wend
End
Title: Re: Openb3d Roapmap
Post by: ms62 on October 02, 2017, 07:37:38 PM
Yes, now I see its simplicity. Thanks.
Title: Re: Openb3d Roapmap
Post by: markcwm on October 02, 2017, 11:51:17 PM
@Angros, I've been looking at particle batch rendering as enabled by SpriteRenderMode 3 using point sprites to supposedly improve render times. It has some serious problems, first it depends on camera angle as to whether they are visible, they flicker constantly, they scale based on distance to the camera, there seems to be no way to control them independently. I've tried some GL things but nothing changed. Is there something I'm missing? Thanks.
Title: Re: Openb3d Roapmap
Post by: angros47 on October 04, 2017, 12:56:23 AM
Batch point sprites can leave a trail behind them: basically, the trail is made by other sprites, that will fade after a while (and that can slowly move in the direction set with ParticleVector, to simulate fire or smoke). You can control the main particle, not the temporary particles used to make the trail (and those particles are created only when in view). If you want several sprites that can be controlled individually, duplicate  them with CopyEntity, and they will work as regular sprites (but much faster). Also, each of them will be able to leave a trail behind (the particles that constitute the trails are managed automatically by OpenB3D)

I have the impression that you tried to create a single sprite with a long trail, mistaking the trail sprites for real ones.
Title: Re: Openb3d Roapmap
Post by: RonTek on October 06, 2017, 12:58:56 AM
Great update and now working with NG! I got an older NG version and I only tried 32bit, but still builds and runs the examples ok, just need to update timer.mod and timerdefault.mod.
Title: Re: Openb3d Roapmap
Post by: markcwm on March 21, 2018, 03:45:46 AM
Just bumping this to say Yay! You can now load animated B3Ds from zip or incbin using the native loader LoadB3D, see standard/load_b3d and minib3d/bones examples.
Title: Re: OpenB3DMax Roapmap
Post by: markcwm on February 25, 2019, 02:15:59 AM
Since the 1.25 update Openb3dmax now has lots of fixes:
shader::TurnOn crashing, vertex colors broken, CopyEntity not instancing, Begin/EndMax2d states, CameraViewport y value, FreeTexture not freeing GL memory, ClearWorld crashes.

And new features:
2nd 3DS stream loader (shouldn't be necessary as default works okay), LightMesh, AntiAlias with accum buffer, MSAntiAlias for Windows (needs custom brl.glgraphics).
Title: Re: OpenB3DMax Roapmap
Post by: Hardcoal on April 22, 2020, 11:07:58 AM
hi, where can i get openb3d demos ?
Title: Re: OpenB3DMax Roapmap
Post by: Santiago on April 22, 2020, 05:53:12 PM
Hi, now i discover this topic.

is still in develpment?

have a discord server?

im interest in this.

Sorry my english, sometimes my translator google dosent work  :-X
Title: Re: OpenB3DMax Roapmap
Post by: markcwm on April 22, 2020, 11:07:08 PM
Hi Hardcoal,

All openb3dmax demos are @openb3dmax.docs (https://github.com/markcwm/openb3dmax.docs), I've updated the original post to link to the docs now.

Hi Santiago,

yes, it's still in development but I don't have a lot of time now. No Discord server it's never been big enough for that, the MiniB3D forums have always been used, there's one over on Blitzcoder.org too.
Title: Re: OpenB3DMax Roapmap
Post by: Hardcoal on April 22, 2020, 11:26:09 PM
I do understand your great effort and very appreciated.
anyway, i was going through the files and i still didn't find any docs..
only code samples..

Ive probably missed it

cheers
Title: Re: OpenB3DMax Roapmap
Post by: DruggedBunny on April 23, 2020, 12:51:46 AM
@Hardcoal, markcwm's link there leads to the docs/samples, it's a separate repository:

https://github.com/markcwm/openb3dmax.docs (https://github.com/markcwm/openb3dmax.docs)
Title: Re: OpenB3DMax Roapmap
Post by: Hardcoal on April 23, 2020, 03:51:16 AM
Oh ok sorry I'm new to github
Title: Re: OpenB3DMax Roapmap
Post by: markcwm on April 23, 2020, 10:26:01 AM
Hi Hardcoal,

thanks man!

Yes it's confusing to name it "docs" and then there's no actual command documentation there so I'll make a copy of the doc/commands from openb3dmax.mod.
Title: Re: OpenB3DMax Roapmap
Post by: degac on May 12, 2020, 08:46:09 AM
Quick question:
on BlitzMax Vanilla I get this error

Code: [Select]
[C:/BlitzMax150/mod/openb3dmax.mod/newtonb3d.mod/newtonb3d.bmx;23;1]
Build Error: failed to compile C:/BlitzMax150/mod/openb3dmax.mod/newtonb3d.mod/newtonb3d.bmx
PROCESSO COMPLETATO
[ERROR]:ERRORE DI COMPILAZIONE

 Can't find interface for module 'newton.dynamics': Line:23 Col:1
I tried to install NewtonB3D.mod and compile it, but same error.

What am I doing wrong?

Thanks
Title: Re: OpenB3DMax Roapmap
Post by: markcwm on May 12, 2020, 03:04:15 PM
Hi degac,

yes it's my mistake, that module has now been moved to newton.mod because it depends on newton.dynamics, I have recently forked it here newton.mod (https://github.com/markcwm/newton.mod) to add the openb3dmax wrapper implementation by DruggedBunny (previously named newtonb3d) and fix a build error on Linux. Newton only runs in NG as there is a threads issue with Brl.Blitz where it MAVs at runtime.
SimplePortal 2.3.6 © 2008-2014, SimplePortal