Hi, guys , here is a more detailed algorithm :
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 at scriptspot.com, 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.
This way it will even cut down the render time of each map , because the groups(LPs + HPs) will be considered in the baking process one at a time, instead of loading all objects at once(like the case of the “explode” algorithm).
- 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.
I have to mention that I have no MaxScript experience, and I was hoping someone in this community to give me a hand, everything from ideas to simple source code I could use for reference will be highly appreciated.