SCRIPT: "Auto-Baker" (automated RTT)
The short version:
Basically what I need is script which groups lowpoly parts with their corresponding highpoly
parts and scatters all groups in the viewport for easy texture baking of normal and AO maps.
See the attachment, it is a gif animation illustrating what I'm talking about.
The long version:
Method1: Explode baker:
Step a) Link LPs to their corresponding HPs:
- must provide flexible options such as smart sorting of names
(even if some of the names are miswritten the script tries to find
their best match).
- linking by relative distance and positions.Even if there is no naming
conventions and organization in the scene, the scripts pairs objects together
by their relative pivot position( I saw smth like this here, called
"DistanceLinker" or smth similar.) It's not a perfect solution, can produce mistakes.
- or the two methods could be combined together. First the script tries to
group objects using naming convention and if miswritten object is present in
the scene , groups it to the nearest object if there is any.
- also option to link object by other criteries , like material IDs or
smth is a plus.
Step b) A projection modifier is applied to all LPs(with predefined settings),
or it would be better if it preserves the settings avaible prior the linkage.
Notice that a link hierarchy can't be created when a projection modifier is
applied to some of the objects, so the modifier should be removed prior the
linkage and applied back after.
Step c) Exploded all linked groups using a unique vector so there are no
overlapping groups of objects and there is enough space between them.
Step d) Render all required maps on one pass using RTT.
Step e) Revert the original position of the linked groups. That can be done by
simple animation.At frame 0 all pieces are together, at frame 1 they are exploded.
Guys, first of all sorry for my English, I hope you've understand the idea.I just want to accelerate the process , especially for models containing a lot of small parts, write now my workflow is the same illustrated in the gif animation, with the difference that I separate the objects by hand(I move all groups, lowpolys + highpolys by hand).I know it's a strange way to do things, but that's how I work and I find this way giving the best possible quality, especially when dealing with very complex characters, containing lots of sub-objects.
I'll be highly appreciative if someone finds this request interesting and wish to help.