Weapon Generator - Model by Drawing!
Hi!?
My very first article, so please bear with me!
Introducing the Weapon Generator!
It's a Houdini tool you can use to generate weapon base meshes just by drawing in photoshop ( and naming the layers nicely )
You can check out some slides that explain this tool in detail over here!
And please check out the tool and the source here!
Big thanks to SideFX Labs for their TracePSD node without which this would be entirely impossible to do!
Development Journey + Post-Mortem
Here's a development journey + post-mortem on this little tool! (It will be very long, and ramble-y)
About 8 months ago, the WPN-Generator was born!
But it was quite an inflexible tool, and had 3 distinct issues!
Problem No.1: Super-specific-layer-names-problem
Even though it could model for you, you had to use very specific layer names with very specific suffixes for the tool to know what it should do with each layer!
They had abbreviated names and suffixes that needed to be used with a specific naming convention!
Such as RCVR ( for Receivers), STCK (for Stock), CHMBR (for Chamber), and characteristic suffixes like "F" for flat, "C" for cylindrical, and so on!
The naming convention also had to be:
[Abbrieviated Gun Part Name]#_[Characteristic]
so if you wanted to create a Flat Receiver, you would need to name it "RCVR1_F"...
This made iterating on the PSD super difficult because it's hard to know what "BRRL23_C" means! :(
Solution?
Somewhat-specific-but-still-generic-enough
This needed to be addressed, so in this version, you can name the part however you want in the group name!
Just that you need to specify the keywords for each layer within the group, but this time; much more generic!
Instead of each layer being a specific gun part with their characteristics in their name, now the gun part is the group, and the layers beneath them are their characteristics.
This gives us much more choices as shown below! (Even defining top and front profiles! Similar to how it works in Zbrush Shadowbox!)
An added bonus is that you can parent gun parts under other gun parts, and use that relationship!
Such as parenting Trigger under TriggerGuard, under LowerReceiver; allowing us to procedurally scale any children or grandchildren of LowerReceiver to be thinner! (In this case, the parameter is "zThickness Factor")
领英推荐
This brings us to the next point!
Problem No.2: Really overwhelming interface!
In the last version of the Weapon Generator, every single gun part had its own set of parameters, embedded into the main interface!
Which made the tool super overwhelming!
So many controls everywhere!
And you couldn't tell what GRIP2 or BRRL1 refers to!
Solution?
FEWER CONTROLS! BUT PROCEDURAL!
Pretty much!
With the new parent-child layer setup, we can add procedural rules to take away the majority of the work!
Now we just need to care about the thickness of the parent gun parts, and the factor of how much thinner their descendants will be!
The advanced controls will still be available for specific slider-fiddling if needed!
Problem No.3: Hard to extend or make this into anything else!
The tool was working fine, but it was an absolute chore to maintain.
This means that to extend this tool, a bunch of manual work would need to be done to the pipe, and any form of updates to any of the HDAs will require a re-generation of the parameter template.
Solution?
Redesign the tool and decouple as many aspects of this tool from each other.
Fundamentally the tool was flawed, and it needed some specific requirements for the redesign:
The tool was then reworked with a lot of old code becoming obsolete and then split into 3 distinct parts!
With the redesign, the generator can be extended/modified into other kinds of generators (as long as drawing in PSD layers is the way to create geometry profiles)
Eg. Character Generator, Vehicle Generator, Spaceship Generators
Learning Points:
What's next:
Thanks for getting this far!
I hope that my development journey/post-mortem has been enlightening!
Do let me know what you think of the tool and don't hesitate to contribute to it! :)
Thank you!
Hmmm...looks strangely familiar. ??
Associate Software Developer at NetVirta, Inc.
2 年Mate, that's amazing! Congrats! I'm gonna take a guess that this technically works with any drawing tools that can spit out a .psd?