Releases: stefanmuller/ldraw2houdini
Dragonfruit
Note: Please delete the bgeo folder in your ldraw library if you used the caching feature in a previous release ($LDRAW_LIB/bgeo)
This release changes the way parts with multiple materials are handled. The previous implementation was a bit hacky and while it worked with Karma, it might have been more difficult or impossible to use with other renderers. Now it's also more in line with how multicoloured parts are handled, so it should overall be more consistent. Long story short, this means the model files change, and you need to upgrade to the latest version of the karma material that comes with this release.
Changelog
- improved handling of multi material parts
- fixed broken reload button for LDraw Model HDA
- fixed bug that would load some parts twice in LDraw Model, which could result in odd gigantic green boxes
- improved attribute transfer after bevelling
- caching feature is enabled by default now in the ldraw2houdini.json file
Durian
Changelog
- Fixed bug that prevented the texture print handling option from working properly.
- Caution: You need to be in SOP context and viewport to trigger texture baking. Afterwards it can be rendered in Solaris/Karma
- Only Karma CPU supported, though!
- Added curvature vertex attribute if bevel and subd is enabled. This can be used for some advanced procedural shading, like edge wear
Pineapple
Implementing the new auto caching feature turned out to be much more complicated than I anticipated. I hope I ironed out all the little quirks and issues now and this dot release is truly functional and reliable. - famous last words.
NOTE: If you had a previous release installed and used the caching feature, please delete the bgeo folder in the ldraw library and upgrade to this release
Changelog
- fixed bug in recent separation handling changes that caused studs to disappear
- enabled material flag by default for brickini_karma_mat hda
- improved installation guide in readme further
Grapefruit Marmalade
Note: This release has a critical bug, please update to a newer version
Another release focusing on bug fixes, QoL and speed! A lot of improvements surrounding the print separation feature, so I felt confident enabling this option by default for the model importer. This allows all parts to be cached with the new auto caching workflow introduced with v2.3.
Also managed to further increase compatibility with the LDraw library, now rendering parts with multiple materials - windows for example correctly. This means iconic parts like 3081cc01 are finally supported.
Changelog
- fixed old bug with print separation that would double up studs
- fixed print separation for unofficial mpd parts
- increased default normal push for separated prints
- exposed push slider in ldraw_part
- enabling print separation for model importer
- added compatibility for multi materials
- improved printed part detection
- strip subpart name in dynamic model importer
- fixed cancel button behaviour in dynamic model importer
- improved path and name attributes for dynamic model importer
- factored out part properties so it works with new auto caching workflow
Kiwi
NOTE: Please update your ldraw2houdini.json with the one found in this release! - More info in the readme
This is mostly a bugfix release, but also managed to improve LDraw file spec compatibility which fixes normal issues if winding order changes mid file. Please see release notes for v2.3.0 for other changes.
Changelog:
- actually including definition for LDraw Model Dynamic shelf tool
- fixed local path for injection studs - new env var needed
- improved LDraw file compatibility - part 41854 works correctly now!
- improved/updated readme
Mangosteen
Soooo many changes and upgrades in this release :)
New LDraw Brickini Model HDA
Kai Stavginski contributed this amazing new HDA which lets you dynamically load LDraw files that contain entire sets/models (ldr, l3b & mpd). Not only is it much faster than the previous shelf script, but its dynamic nature allows easy reloading and much more seamless interoperability between your favorite LDraw CAD and Houdini.
Only downside for now, the resulting output is not quite as customizable as the previous shelf script as you don't have direct access to each part anymore. Therefore, I'm keeping both approaches around for the time being.
LDraw Model Dynamic Shelf Tool builds an auto mini network so you can easily explore this new HDA.
Overall Speed Improvements
I identified some performance inefficiencies around how studs were handled. This should massively speed up the old model importer. There is also a noticeable performance boost for individual parts that have a large number of studs like baseplates - especially if the logo option is disabled. (find stats below)
New Auto Caching Option
This is another idea from Kai that is surprisingly simple and ingenious at the same time. - I would have never come up with this. Whenever an LDraw Part is loaded in Houdini, LDraw2Houdini is now writing bgeo files into the LDraw library and continues loading them instead of reprocessing the original files.
This feature is still in a somewhat experimental mode, so it's disabled by default, but can be enabled with an environment variable. More details in the readme on how to activate it.
Injection Marks/Points support
Last but not least, I also managed to further increase realism for the LDraw Parts by adding procedurally generated injection marks/gate scars. There are two options: Either add the injection point on the studs or on the side walls as seen in bricks from the 70s and older.
After scanning tons of different real bricks, it seems the general rule is, that the injection point is usually in the center. For the classic 2x2 brick, I actually found 4 different variants - each stud could potentially be the injection point! So there is a seed parameter that not only changes the size/shape of the mark but also randomly chooses a possible stud.
For the wall option, the tool attempts to find the most logical wall procedurally, however, the axis and height can be manually specified in the part_properties.json for each part individually in case the procedural approach doesn't get it right by default.
Performance stats:
I used 10297 Lego Boutique Hotel from the LDraw OMR for this benchmark
Model Import Shelf script
1:03 min - v2.2 Orange Peel
41 seconds - v2.3 Mangosteen (this release)
22 seconds - v2.3 Mangosteen (this release) with caching enabled
New Dynamic LDraw Model HDA from Kai
13 seconds
5 seconds - with caching enabled
4 seconds - with caching and no logo on studs
Orange Peel
Refined Material Properties
Even though the vast majority of LEGO parts are made out of plastic, not all parts necessarily look the same. Some parts are more flexible and others are so different you can actually feel it! For example, the antenna 3957 feels much slicker and stickier than the oar/paddle 2542.
I parameterized these different qualities and every part can be described in a new config file called brick_properties.json. For starters, it only includes a handful of parts, but of course, this config can be tweaked and extended by anyone. And since we are open source, I would love to see some pull requests :)
There are 3 parameters:
- softness
- graininess
- roughness
Let's have a look in detail
Softness usually goes hand in hand with how flexible a part is and how easily light scatters inside the material. This results in a less harsh appearance, most noticeably, softer edges with ever so slight hue shifts. In more technical cg terms this means how pronounced the subsurface scattering is.
Graininess is a very common effect, easily visible on slopes. It's a high-frequency bumpy/uneven surface that breaks up reflecting light into a "grainy" looking pattern, hence the name. However, not just slopes feature these, but tons of other pieces as well like minifig accessories. The bow and the feather in the example scene (see readme image) are good examples of this.
Roughness describes how shiny (or rather unshiny if that is a word) a surface is. Classic new LEGO bricks act like a mirror at grazing angles however, there are other parts like the old palm leaves that reflect light much more broadly/unfocused. In reality, this can be seen as a very subtle extra high-frequency version of the graininess parameter above.
No in-depth CG knowledge is required to tune these parameters. The values should be in a 0-1 range and often need to be used in combination to capture the appearance of a given part. The updated MaterialX shading network takes care of translating these parameters from the config file behind the scenes.
There is a new Reload Brickini Nodes shelf tool to help tweak and iterate on these values quickly. You can start a render in Karma, add/modify the properties in the brick_properties.json, and then select the geo node(s) or LDraw Part node(s) directly and press the shelf tool to trigger a refresh.
Release notes in bullet points
- new brick properties config file (this includes the previous slopes.json)
- also supports partial graininess for individual faces (needed for parts like the chrome crown or the chest)
- updated Karma Material to support new material properties
- updated Brickini LDraw Part to read these new properties
- new still life soft & grainy scene to showcase the above upgrade
- updated still-life mixed
- new shelf tool to reload LDraw Part or Brickini Material nodes (Colors)
Avocado
I'm finally back with another release :)
Added Houdini 20 support. If you need to use an older version of Houdini, you can just rename python3.10libs to whatever your Python version is. The hdas will work fine, but the example scene might not be usable anymore.
Otherwise big changes on the color front. This is going to be an ongoing project as I'm exploring this space more, but for starters, I'm converting all LDraw colors to acescg now, which means you need to set up the ACES colorspace in Houdini to get proper colors. Furthermore, I created special overrides for transparent colors as the LDraw ones didn't work at all - they were way too dark. Now you should be able to render pretty images with transparent bricks out of the box.
To showcase this, I massively upgraded the example scene to feature more test scenes specifically to test colors and materials.
Full changelog:
- H20 support
- custom shapes and colors for hdas because it's fun
- new karma brickini material hda so it can easily be added to any Houdini scene.
- all new example scene
- 4 ldr test scenes:
- 2x2 bricks solid colors
- 2x2 bricks transparent colors
- still-life mixed bricks
- still-life transparent bricks
- better node names for brickini material nodes (name includes color when LDraw model is imported)
- better error handling if color is not found - fallback to solid black
- LDraw colors to acescg transformation
- new brickini_colors.json with custom color overrides - only transparent colors for now, might extend in the future
Watermelon
Decided to make this release a full new version (v2) as it fundamentally breaks existing scenes. Everything got scaled down by a factor of 10! Previously everything was 100 times larger than the real world because I didn't want to deal with tiny tiny floating point values. For example, the default bevel width used to be 0.01, but now it's 0.001.
However, being only 10 times larger than the real world hopefully is a better compromise for those who want to do simulations, and at the same time it doesn't entirely ruin the experience when one has to deal with these tiny values.
This also means the release names won't be berries anymore, but other random fruits instead.
Full changelog:
- Scaled everything down by 10 (LDraw2Houdini operates now 10 times larger than the real world)
- Separate toggle for subdivision
- Improved cache toggle (with this activated, big scene should load in roughly half the time)
- Renamed "part" attribute to "name" so it shows up in Solaris as well
- Major upgrade to edge transfer making bevels much smarter
- Improved normals
- Further refined yellowing per brick color
- Added "random_number" attribute to allow for shading variation
- Added support for parts using direct colors i.e. 0x2008000
Cranberry
Spent a good amount of time improving file compatibility. Looks like there is a whole bunch of weird stuff out there and file format restrictions seem to be fairly loose. Hopefully the vast majority of files should work fine now!
Some details:
- if no "main model" present in mpd file, we assume the first entry is the main model
- improved upper/lower case mismatch handling
- taking scale values in consideration now, which fixed weird orientation issues, where parts weren't just rotated, but scaled for orientation purposes
- if part doesn't exist we display a box instead of throwing an error
- added part attribute to navigate easier in model sops
- searching s/ hierarchy even if missing from file reference
- further refined packing system
- refined yellowing, almost none for black, and more for white
- improved brickini_mat for better looking transparent bricks
- increased default trace depth in example scene so transparent bricks don't turn too dark