Beta branch update: Tons of art pipeline enhancements
I'm happy to say I nailed the design of the Leadwerks 3 workflow overall, but there are a couple of places where there's still some friction. Because the community is going to soon be moving a lot of content into the Steam Workshop, now is a good time to take a look at those issues. It's also smart to address them before the Blender exporter is written.
A new update has been pushed out to the beta branch on Steam that contains a lot of improvements in this area. However, both the map and model file format version have been incremented to support new features. That means your work saved in the beta build can only be opened by the newer builds, until a full update goes out.
FBX Material Generation
When FBX files are imported, their material files will now be automatically generated, if they aren't already present. A shader will be chosen based on what textures are present in the file, and it will even detect animated models and assign an animation shader when appropriate. This makes it dead simple to get models into Leadwerks.
Collision Shapes in Models
This came up because I found that 95% of the models I import are just static props that need a simple compound collision shape. First I tried using a convex decomposition algorithm in HACD, the same library Bullet Physics uses. This is a pretty impressive bit of code that takes a polygonal mesh and turns it into an approximate series of convex pieces:
However, trying to generate low-poly physics geometry from a visual mesh had unpredictable results. Trying to generate a convex decomposition from a concave hand-modeled mesh was even worse; you had the tedium of hand-modeling the physics shape, combined with the unpredictability of an automated algorithm.
So I abandoned that approach and decided to make something as simple as possible, that would handle most of the cases the average user encounters. You can now add solid convex pieces in your models, and as long as the name of the limb is "collision" it will get loaded as part of a default physics shape. The existing system of physics shapes remains unchanged, and all your existing objects will still work just as before.
Multi-Animation FBX Files
Leadwerks will now load multiple animations from FBX files, and will use the name of the animation sequence found in the files. Oh, by the way we now support...
Named Animations
Animations can now have a name assigned to them, and the animation commands now include an overload to specify a sequence name like "Run", "Walk", "Idle", etc. This makes it easy to mix and match character models because you don't have to worry about which animation index you want to use.
This video shows how these great new features work:
But wait, there's more!
Script-based Post Effects
We've also got script-based post effects in the editor! This allows a wider range of effects than pure shader effects did. You can modify the script in real-time and see the results immediately, although it is possible to crash the editor if you aren't careful:
A samples bloom script effect is included that is a combination of mine and Shadmar's code. It is interesting that the real-time shader visualization of Leadwerks 3 has allowed us to create a much higher-quality bloom effect than what Leadwerks 2 could do. This is because I could quickly modify code, press F5, and see the results right away instead of having to restart the editor just to change a shader.
Workshop files can now be selected in the file open dialog, so I expect to see lots of great new effects come from the community soon, especially from Shadmar and Klepto2.
Batch Material Generation
You just imported a folder full of textures and you don't want to create materials one-by-one. What do you do? The new Tools > Batch Generate Materials menu is the right solution for you! This feature will auto-generate materials for the entire current directory shown in the asset browser. And if you want some quick normal maps, just select the Tools > Batch Generate Normal Maps menu item. This will allow you to quickly import tons of textures and publish them to the Leadwerks Workshop in no time at all.
- 16
10 Comments
Recommended Comments