Support for the STL format for 3D models (commonly used for 3D printing)

Posted on

Knocker in STL format, by Shira, www.thingiverse.com/thing:1458545
Robot woman in the STL format, by Shira, see http://www.thingiverse.com/thing:614366
Moonkin Bust in the STL format, by bardiir, see http://www.thingiverse.com/thing:2211053

Castle Game Engine and view3dscene support now the STL format for 3D models, commonly used for 3D printing. This means that you can open these models using view3dscene, or the engine API (TCastleScene.Load), and you can convert STL files to X3D.

It’s a really simple 3D format (just vertexes with normals), and I think that the current loader (in file x3dloadinternalstl.pas) nicely serves as an example 3D file loader in our engine. It shows how to read binary and text files from a TStream instance using some helpers in our engine.

More information about the STL format is available in Wikipedia. We support both the text (ASCII) and binary formats.

Blender includes an exporter to this format.

Many sample models in the STL format, ready for 3D printing, can be downloaded e.g. from Thingiverse.

If you’d like to try it NOW in Castle Game Engine, you can download the view3dscene from snapshots. Or you can grab the source code of the engine and view3dscene from GitHub: https://github.com/castle-engine/castle-engine/ , https://github.com/castle-engine/view3dscene/.

Comment on this post ➤

Castle Game Engine 6.0.2 release!

Posted on

Test local (international) characters

We’re happy to announce Castle Game Engine 6.0.2 release!

Download it from our webpage.

This is a small, mostly-bugfix release. So we only have 6 new features:)

New features:

  1. sprite-sheet-to-x3d tool: The animations duration is now calculated looking at the number of animation frames and the FramesPerSecond value. FramesPerSecond is by default 4, but it can be changed by the –fps= command-line option.
  2. New test_local_characters testcase (inside examples/fonts/test_local_characters/), testing reading and rendering of international characters (Chinese, Russian, Greek…).
  3. LoadAnimatedGifs, see an example GIF player🙂 It requires having ffmpeg installed, though, for now.
  4. Better API around TextureProperties X3D node.
  5. Automatic gzip extension recognition for URLReadXML / URLWriteXML (by Eugene Loza, thanks!).
  6. Unix manpages for utilities can be generated (see doc/man/man1/ in sources). All utilities support now –help and –version options.

Bugfixes:

  1. OpenGLES (mobile) fixes for Color and ColorRGBA nodes handling.
  2. Removed the proprietary Chartboost and Heyzap jar files from the distribution. They were packaged by accident in our zip and tar.gz archives. Users should download them on their own, following links from Android components page.
  3. Fix reading X3D files with IMPORT.
  4. Fix UI in examples/fonts/html_text.lpr.
  5. Various fixes for switching font at runtime. The test_local_characters demo shows that now everything works.
  6. Remove the warnings from FPC 3.x around WideString convertions when dealing with XML units (by Eugene Loza).

Please check the downloaded file correctness!

Downloading the files from SourceForge may be unreliable now, in my tests. After downloading, please double-check the correctness of the downloaded castle_game_engine-6.0.2-src.zip file:

  • the size should be precisely 126164527 ,
  • the md5sum should be 7f6ccd3f4d6a2547299ea4dc9ef0ad15 .

I’m talking with SourceForge to have it fixed. Eventually, we may move our downloads to another server.

Comment on this post ➤

view3dscene 3.16.1 release

Posted on

View3dscene

We have just released view3dscene 3.16.1. This is a bugfix release for an important bug that slipped in view3dscene 3.16.0 (most files using the IMPORT keyword failed to load with “Invalid type cast” message).

view3dscene is our open-source cross-platform X3D and VRML browser (and a viewer for other 3D formats). It is quite powerful tool on it’s own, to inspect 3D models in various formats — it can play animations, you can work in 3D worlds with collisions and gravity, it can play X3D scripts and more:)

All the comments are welcome, as always!

Comment on this post (2 comments now) ➤

API Reference improvements

Posted on

API Reference search

I improved our API reference. It now has a search box, and a navigation toolbar, making it look more like a normal part of the Castle Game Engine website.

Hint: I’m the maintainer of both Castle Game Engine, and PasDoc — an open-source documentation tool for Pascal 🙂 I actually enhanced PasDoc to make it possible. PasDoc has now three new command-line options and produces nice HTML5 output. If you use PasDoc in your own projects, you benefit too — you can now style the PasDoc output to fit your webpage! If you’d like to try PasDoc, go to https://github.com/pasdoc/pasdoc/wiki .

Comment on this post ➤