BooBoo with 3D support
Posted by tremblin on 2024-09-22, 9:46pm
Avatar
BooBoo 2.0.30 has 3D model and 3D animation support. Until I find or develop another exporter, my DirectX .X model exporter for Blender only works on Blender 2.78. It's in the Shim repo on Codeberg. You have to fine tune the settings on export such as using a right handed coordinate system and exporting all the data you need/want.

There is simplified 3D transforms by way of memorized transforms for models. So if you rotate 5 degrees it stays that way etc. I hope to add line segment/model collision detection something like:


number collides
model_collides model collides x1 y1 z2 x2 y2 z2


You can mix 2D and 3D by calling set_2d and set_3d.

Replies (20)
Posted by tremblin on 2024-09-22, 10:44pm
Avatar
I also want to add some camera functions to move and point the camera
Posted by tremblin on 2024-09-22, 10:45pm
Avatar
I added just 9 functions for 3D so far.
Posted by tremblin on 2024-09-23, 8:34pm
Avatar
The next version will have more 3d stuff, including drawing arbitrary geometry.

Posted by tremblin on 2024-09-23, 10:13pm
Avatar
2.0.31 is now available with everything and some fixes.
Posted by tremblin on 2024-09-24, 12:55am
Avatar
I added an example of texturing in git... online now

Posted by tremblin on 2024-09-24, 9:07am
Avatar
2.0.33 is out with model-point collision detection and billboards.
Posted by tremblin on 2024-09-24, 1:50pm
Avatar
I've added back D3D support. See the README, it won't work unless you do. Fullscreen changes are instant on D3D just like on Linux.
Posted by tremblin on 2024-09-24, 5:33pm
Avatar
Several fixes releases and now we're at 2.0.36. Hopefully a stable build.
Posted by tremblin on 2024-09-25, 8:43pm
Avatar
There were other issues, the current build seems to fix.
Posted by tremblin on 2024-09-26, 7:04pm
Avatar

number model

model_load model "zeus.x"

model_translate model 0 0 -2.5

model_set_animation model "ArmatureAction"

set_3d

function draw
{
        clear 100 100 255

        model_draw model 255 255 255 255
}


An example of drawing a model with animated bones.
Posted by tremblin on 2024-09-26, 7:09pm
Avatar
I also added model/line segment collision detection.
Posted by tremblin on 2024-09-26, 7:13pm
Avatar
I accidentially double-translated the billboards so I need to do another fix release.
Posted by tremblin on 2024-09-27, 5:31am
Avatar
That was done in 2.0.41
Posted by tremblin on 2024-10-01, 9:36pm
Avatar
3D view now preserves the aspect and buffer sizes like 2D always did:



This is in git.
Posted by tremblin on 2024-10-03, 3:54pm
Avatar


Shim has had this devsettings feature for a while, it now works with any projection set in git. It only works in debug builds or if you pass +debug on the commandline, Then you press F9 to get to devsettings. You can register your own variables with this system which you can then modify online (some are read only).

The recording is causing some glitches/flashes. Not sure if it's my fault

Also added delta mouse movements and mouse/key movement in the billboards example.
Posted by tremblin on 2024-10-04, 8:31pm
Avatar
As you see the toplevel list only has Shim. Wedge also registers a bunch of stuff, then wedge is added to the toplevel in Wedge games.
Posted by tremblin on 2024-10-05, 5:26pm
Avatar
If you want look up/down with the mouse, this diff adds just a few lines to enable it:


--- ../examples/billboards/data/scripts/main.boo        2024-10-03 09:01:53.739874300 -0600
+++ billboards/data/scripts/main.boo        2024-10-05 11:23:49.526123800 -0600
@@ -27,6 +27,8 @@
 
 number angle
 = angle 0
+number anglex
+= anglex 0
 
 number x y z
 = x 0
@@ -62,6 +64,9 @@
         if (!= 0 dx) set_x2
                 = joy_x2 (/ dx 10)
         :set_x2
+        if (!= 0 dy) set_y2
+                = joy_y2 (/ dy 10)
+        :set_y2
 
         number w a s d
         key_get w KEY_w
@@ -103,6 +108,7 @@
         / joy_y2 10
 
         + angle joy_x2
+        + anglex joy_y2
 
         number xi yi zi
         = xi (+ angle (/ PI 2))
@@ -127,6 +133,7 @@
         + z zi zi2
 
         identity_3d
+        rotate_3d anglex 1 0 0
         rotate_3d angle 0 1 0
         translate_3d x y z
 }
Posted by tremblin on 2024-10-05, 10:00pm
Avatar
This is what's in git

Posted by tremblin on 2024-10-05, 10:01pm
Avatar
There's no linear algebra in the api at least not yet so pleasant remains at the centre of the seen so that proper facing can be done, however to have her move around I first need some vector math.
Posted by tremblin on 2024-10-12, 2:21am
Avatar
I got this done a few days ago

Post a Reply

Please log in to reply.

© 2024 CMYKilluminatiNetwork