Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
Theoretically doable. Actually built some code like that as part the Morph Mapper code to try and fix some pokethrough issues. I have since fixed most of the underlying problems and turned that code off. I refer to this method as "HAT" for "Height Above Terrain" which is a common problem I run into in my day job trying to keep airplanes ABOVE the terrain mesh and tanks ON the terrain. Two problems with HAT on the clothing: First problem is CPU time. I believe that I can make my algorithm much quicker but I haven't had time yet to really profile and optimize it as I am currently going from one production project to another. If I can't speed up the algorithm I might try making a python extension dll (imagine sound of me sticking my hand into a blender). That would be faster but until I get a Mac it would leave the non-PC users high and dry. Second Problem: Getting it to look good versus mathematically correct. It may be correct, ie hold clothing a certain distance away, but may not look right. Example: any dress or skirt. Gravity rears it's ugly head very quickly. There are solutions to this problem but they start getting into more intensive algorithms which run you back into problem 1 of CPU time. I have been looking at some more advanced clothing handling algorithms. I am looking for a good tradeoff point between better improved clothing and CPU-time. There has been a lot of research and progress in this field over the last couple of years. I guess a good question for users is how long are they willing to wait for their CPU to crank out really good clothing effects?
For me? Hours would be fine. I already sometimes render over the course of days for an animation and hours if I am ray-tracing a still... there is no reason why I wouldn'twait for this is it really worked. But I am thinking of something less dramatic. Just something to nudge out those faces of a clothing item that were having poke-through... not a generalized cloth draping tool... those are available for Max. So I think the quick/easy "poke stopper" would be worth about 20-30 minutes if needed ... I would simply pose the model and run it to fix the clothing.
While we are at it :) It should be possible for a python routing to use collision detection to fix elbow and knee creases as well... simply find the overlaps and collaps the polygons into incredibly small bundles to stop the overlap - not rewrite the geometry, just make it smaller (like a morph) to stop the ugly elbow/knee creases.
hmm..actually jbrugion has a good point about the difference between Mathmatically correct and Visually correct...I found out the hard way that what is usually mathematically correct (read: clothing maintains the BASIC contour it had in the original position) usually looks visually 'unnatural'... From what I've seen, and IDEAL solution would be to have a killer 'draping' algorithm if you will that would simulate the 'dropping' of the item over the body and modify the contour of the clothing accordingly, with an algorithm like this one could get the 'natural' differences of actually putting a larger sized shirt on a model (you would have to scale the shirt before an algorithm like this would effectively 'cover' the model or it would look like your model had a shirt on that was too short, but this actually happens in nature no?)... I've only seen one article on something like this (wish I knew where it was...it was months ago :), and the guy took something like half a day for each run and the number of control points were ENORMOUS...
Maybe a "simpler" script would be to attack the figure poking through the clothes problem... You know, these little patches of skin poking through the clothe model... The problem is that Poser doesn't have the notion of layer (ie, body part is under clothes). If I remember correctly, you can do that in DirectX, by adding a delta to the z order (ie, skin is at X+0, clothe is at X+000.1). That would solve some of the problem we see with tight fitting clothes... We're not dealing with complex physic here, just the fact that on healthy human beings, clothes tend to stay above skin level ;-) I'm not familiar with PoserPython yet, so I don't know if there is a way for a script to hijack the z order calculation to do this though...
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
jbrujoin wrote what looks liek a brilliant script to handle mirroring morphs onto clothing - and I am wondering if a similare technique might not work for some clothing effects. I wonder, for example, if it wouldn't be possible to simply check the verticies of a figure and make sure they are always {units} away from another figure - suddenly clothing would always fit. I know, a LOT of processor time... but do-able?