Comment on this post (1 comment now) ➤
As a great Blender fan, I was unhappy that since Blender 2.8 release we lost some integration features between Blender and Castle Game Engine. So I decided to fix the situation, and upgrade the support to a new level 🙂
It’s not all finished yet, one more big feature will come (spoiler: skinning in glTF)! But I can already announce various improvements to what you can do. The documentation about exporting to Blender also contains an always-up-to-date instructions.
Our castle-anim-frames exporter is fixed now, to work with Blender 2.8.
castle-anim-frames can also now use the glTF format internally (instead of X3D) to export each frame.
Unfortunately the effect of castle-anim-frames+glTF is not perfect, because the generated frames are not “structurally equal”, so you will typically want to set “Frame Skip” to “zero”, otherwise animation isn’t smooth. But in effect the files will be huge…
A solution to the above will be support of skinning in glTF. Working on it!
I submitted Blender patches to fix X3D export with modifiers and fix X3D export of “backface culling”. They are in review now.
I created some Blender demos (to test exporting to glTF and castle-anim-frames), see https://github.com/castle-engine/demo-models/tree/master/blender . They nicely show that glTF exporter is really good (so we want to use it, and advise it as the best exporter) and already exports various things (like PBR, unlit, normalmaps) correctly to CGE.
We now support glTF unlit materials in Castle Game Engine and view3dscene (using glTF extension KHR_materials_unlit, used by Blender -> glTF exporter).
I submitted pull request to the Blender glTF exporter to fix exporting without “Skinning” (used by our castle-anim-frames exporter internally).
Finally, you can load animation from a set of static files using URL like
[email protected](3).obj to load
xxx003.obj etc. Blender exporter to Wavefront OBJ allows to export such animations.
Comment on this post ➤
During the last few months, I was working with the Web3D Consortium to bring many material and lighting upgrades to the next version of X3D and of course to our Castle Game Engine.
I’m proud to officially announce the first results of this work, including implementation of many new rendering features in Castle Game Engine!
The initial documentation is summarized on this page – “X3D version 4: New features of materials, lights and textures”. With time, more documentation will appear in CGE, and of course X3D v4 specification will also eventually be available as a definite reference of this. The examples are in my x3d-tests repository, in pbr/ subdirectory.
Physically-based rendering (PBR) using the new
Ability to render glTF models with physical materials. Test it by opening any glTF 2.0 sample model with any engine tool. You can e.g. try view3dscene from snapshots.
Much enhanced classic (Phong) lighting model thanks to the enhanced
Material node with lots of new fields for textures (
More natural “unlit” rendering using the new
UnlitMaterial node (very useful for 2D games, and better than previous approach of “Material with only emissiveColor non-zero”, see Why is UnlitMaterial useful for the detailed reasoning),
Image-based lighting using
EnvironmentLight node. This is in-progress now (not yet working).
All of this is implemented in CGE. We get latest X3D features in this area, while also becoming a reference implementation of these X3D concepts.
This change also pushed many fixes to the existing lighting shaders, to be pretty and 100% correct (in regards to both X3D 3 and X3D 4). This means:
SeparateDiffuseTexture is now always “on”. This means that X3D
Appearance.texture multiplies only diffuse factor (in Phong shading). So the
specularColor are not affected by the
This was always (in all X3D versions, past and future) required.
Note that Gouraud shading continues to work as before, because in Gouraud shading there’s technically no other choice:
Appearance.texture must multiply everything (the whole result of lighting calculation).
Using Material with only emissiveColor non-zero behaves now 100% correctly, following X3D equations.
Previous it was not only an “optimized case of Material”, it also changed the behavior:
Appearance.texture was multiplied with
emissiveColor (as opposed to multiplying it by diffuseColor). Even when SeparateDiffuseTexture was true, even when Phong shading was used.
It’s no longer the case.
Appearance.texture now always multiplies diffuse factor of the Material, if possible (IOW in Phong shading). Only in Gouraud shading it behaves differently (as then it has to multiply everything).
UnlitMaterial instead of
Material to have unlit shapes. In case of
Appearance.texture always multiplies the emissiveColor. Other things (Color nodes) also behave more naturally for unlit case.
So it’s simple now:
- When using
Material (Phong lighting model) ->
- When using
- When using
ColorRGBA nodes are also correct now. They replace the
diffuseColor in case of
Material — always. Previously, in case of only emissiveColor non-zero they were multiplied and by emissive factor, which was contradicting 2 points of spec. Now they replace the diffuse factor, always (whether “only emissiveColor is non-zero” or not).
Comment on this post ➤
Thanks to Eugene Loza work on the Steam release of “The Unholy Society”, you can now detect when joystick is being connected or disconnected.
Simply assign your own event to Joysticks.OnConnect and OnDisconnect.
By default nothing is done. But you can call e.g. Joysticks.Initialize to reinitialize joysticks, thus automatically accounting for the newly connected or disconnected joysticks. A demo of it is inside our examples/joystick/ application.
In games where joystick support is essential, or in “multi-player games on a single device” (many people playing on a single computer with multiple joysticks connected) you can use these events to automatically pause the game, display the player configuration screen etc.
This allows to meet Steam recommendations on joystick behavior.
Comment on this post ➤
iOS is the platform used by Apple iPhone and iPad devices. We’ve made a number of improvements to it, caused by upcoming The Unholy Society for mobile:
New build tool options to build and deploy (“archive” in Xcode terms) iOS application from the command-line (in batch mode). For example, use
castle-engine package --target=ios --package-format=ios-archive-ad-hoc to get an IPA file of your application, which can be uploaded to your devices or TestFairy. It is documented in the Castle Game Engine for iOS page.
Suport for square compressed textures on iOS.
castle_engine_auto_generated.xml was renamed to
CastleAutoGenerated.xml, following our conventions for other CGE-special files.
FreeType support on iOS. This means you can freely load font files (TTF, OTF) at runtime on iOS. You don’t need to do anything special to activate it, just load font files as decribed in our manual and it will work on iOS.