Blitzmax OpenB3D Roapmap

Started by markcwm, June 23, 2017, 23:43:28

Previous topic - Next topic

markcwm

Blitzmax Openb3d is a fairly stable OpenGL 1.4+ engine like Minib3d but with extra features, like terrains and shaders. It still has some bugs and I will usually try to fix these before adding new features.

To do
* Copy of Blitz3d examples
* Soft shadow shader
* Better bumpmap lighting shader
* Good water shader
* MD3 loader
* glTF loader
* MS3D loader
* Better X loader
* PBR
* Better Physics with Newton
* Better Particlecandy engine

Maybe later
* Support for GLES - this may not be feasible
* Animated 3d model support with Assimp - wrapper needs a rewrite
* Quad system for stars, asteroids, trees, candle lights
* Scenegraph or Quadtree
* Split Shadow mapping

Downloads
The most up-to-date version is openb3d.mod and example source code is a separate download openb3d.docs. This has all fixes by DruggedBunny (B3Dsound & EntityName for GetChild, no Doxygen), all features by Spinduluz (DDS & file streams, FreeShader & FreeStencil), and all changes by Brucey (newton.mod). The latest OpenB3d library by Angros is currently 1.26 minib3d/files.

You need to install GCC to build modules, see the first two steps in this install guide. To use NG get the latest release or for the latest source follow the install guide.

You can use Terminal or Powershell to build modules, or from MaxIDE use the Quick Build option to avoid rebuilding everything, which can take a long time. So to build in 64-bit debug with overload warnings on (it will error if you don't):
bmk makemods -d -w -g x64 openb3dmax

Original topic
* MiniB3D for FreeBasic

Naughty Alien

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

markcwm

#2
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.

Naughty Alien

#3
Oh..Assimp looks beautiful..that would be actually betetr than FBX alone..

..one question i never asked..is OpenB3D available for C++ ??

markcwm

There's no examples for C++ but Angros answered this http://wasted.nz/posts.php?topic=107042

Krischan

#5
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" 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?

Kind regards
Krischan

Windows 10 Pro | i7 9700K@ 3.6GHz | RTX 2080 8GB]
Metaverse | Blitzbasic Archive | My Github projects

Krischan

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
Kind regards
Krischan

Windows 10 Pro | i7 9700K@ 3.6GHz | RTX 2080 8GB]
Metaverse | Blitzbasic Archive | My Github projects

markcwm

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

Krischan

#8
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 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, which is a useful addition, too:
' ------------------------------------------------------------------------------------------------
' 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
Kind regards
Krischan

Windows 10 Pro | i7 9700K@ 3.6GHz | RTX 2080 8GB]
Metaverse | Blitzbasic Archive | My Github projects

Naughty Alien

..VR support ? (Oculus or any other??)

angros47

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)

markcwm

Hi Angros, I thought v 1.15 was GLES2 not WebGL. Well good to know, thanks.

angros47

#12
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

markcwm

#13
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:
QuoteThe 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.

Kronos

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?