Lightweight 3D engine

For the past few months I’ve been working on a lightweight 3D engine written in pure Xojo (no plugins required), together with a few basic support tools.

The core of this engine together with the tools are uploaded to GitHub for those who are interested.

X3 Core: Main modules of the X3 engine.
X3 FileAssist: Utility to convert .OBJ files to .X3M files.
X3 Viewer: Tool to view X3 Models (.x3m files).

The code is donated to the public domain so you are free to use it however you see fit (commercially or non-commercially).

Here is a screenshot of an .OBJ that was converted to an .X3M file with X3 FileAssist, and then rendered with X3:

Great work :slight_smile:

Hi guys,

The X3 engine has been updated with some improvements.

X3 FileAssist:

  • TGA 24-bit non-transparent texture images now supported in .obj=>.x3m.
  • Fixed bug with alternative texture orientations in TGA files.

X3 Core:

  • Fixed bug with texture rendering.

X3 Viewer:

  • Updated with latest X3 Core libraries.

Please update your local modules with the latest versions in GitHub to take advantage of these changes.

Nice. I am definitely going to work through the blog. Perhaps this is something that can eventually be added to the X3 engine.

Absolutely fantastic work!

I’ve tried to make a decent computer game (nice and 3D - not pong) at several different stages in my life only to be bogged down in the technicality of it… and then the dream slips away for a while, only to come back later and slam into the same brick wall again.

Xojo seems like the perfect language for a person with a dream to make a game in. All the complexity is lifted off the programmer and he’s free to do the fun stuff - until it comes to graphics. Unfortunately at the moment it’s easier to create graphics in C++ with a graphics engine like Irrlicht than it is to make graphics in Xojo. I really hope that changes because Xojo has everything else going in its favour.

Hi guys,

I’ve just updated X3 Core, X3 FileAssist and X3 Viewer with a critical fix on OS X. Please pull the latest libraries from GitHub if you plan to deploy your compiles to OS X.

Thanks to Pascal Chiotasso for helping me track down this one.

Ok, found more bugs that needed to be squashed… the next version of X3 Core, X3 FileAssist and X3 Viewer is tagged in GitHub.

Here are some screenshots of models that was successfully converted to .X3M files (from .OBJ) with X3 FileAssist:

If you want to view the models in 3D on your computer, you can download the X3M files from http://www.xojo3d.com/heros.zip. Simply download the latest version of X3 Viewer and run the project with Xojo to view the X3M files.

You can get the latest core library source code used for file IO and rendering from GitHub.

Does this engine support collision detection? I would even be interested if it has very basic collision detection.

Btw thanks

Looks really awesome btw!! Could be very useful even without collision detection, but I do not think it would to too difficult or complex to implement basic cuboid on cuboid collision detection.

Thanks

I’m working on a 2d physics engine right now that I plan to eventually expand to 3d. It should mesh well with Alwyn’s (excellent) X3 3d engine. Currently X3 doesn’t support collision detection but it really wouldn’t be hard to implement if all you are looking for is basic cube collision detection.

Collision detection is definitely on the “todo list”. There are however a few other milestones that first needs to be reached.

Currently we’re working on getting X3 FileAssist and the X3 Core rendering algorithm improved. Having an easy way to import 3D assets is a high priority at this point, since without 3D models you cannot really produce decent 3D applications.

Once the import/export feature of X3 FileAssist is at a decent level, my next goal will be to implement an X3Scene class together with an X3Camera class. These two classes will make it easy for you to create 3D scenes in your games, simulation programs, or any other application where you need to combine multiple 3D models into a single scene. The camera will help you to easily navigate through your scene, and render views from different angles.

Once the above is implemented, it would probably be a good time to start work on a basic physics library for the X3 engine, starting with collision detection.