Forum Coordinators: RedPhantom
Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 18 10:25 pm)
There's two ways I can think of right now:
Both methods have their problems. Let's start with the eye. Usually an eye has a cornea, which protrudes a little from the spherical surface of the eyeball itself. The bounding box method would give you a center that lies slightly in front of the actual center of the eyeball - it'll be off by 1/2 the protruding distance of the cornea.
The "average vertex" method: there probably will be more vertices at the iris, pupil and cornea of the eye, so that the calculated center (center of gravity in this case, assuming all vertices have equal "weight") will be shifted towards the iris/pupil/cornea.
In general, the bounding box method will do the job fairly well, but vertices of the body part that "stick out" have a great influence on the calculated center.
The "average vertex" method or "center of gravity" method is less susceptible to the position of vertices on the outer limits of the body part, but clusters of vertices close to each other (in the case of a collar including the breast, the nipple area would be such a cluster) tend to have a strong influence.
In short, Python can help. But it will not provide a "one size fits all" answer.
For perfectly symmetrical objects, such as wheels, the Python method will give you the "perfect" answer. The center of gravity method will have a higher precision than the bounding box method.
The scripts are quite simple. Give me a couple of minutes, and I'll have them for you.
The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter
While you guys were typing I wrote it. If you would like to email me I'll attach it by reply.
Used the center of bounding box method.
We should really get out more :)
Phil, you just beat me to it. I just finished the bounding box script...
CenterVertBB.zip
The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter
Just installed some updates to my server, it'll be unavailable for the next 10 minutes
The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter
Server is up again.
And here is the center of gravity script: CenterVertGravity.zip
The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter
Just ran a few tests on a zero pose Victoria 3 figure.
Left eye: center according to Joint Editor - (0.012, 0.677 , 0.025)
Center according to CenterVertBB: (0.01233 , 0.67723 , 0.0271) - you see the effect of the Z shift due to the cornea
Center according to CenterVertGravity: (0.01233 , 0.67723 , 0.02921) - you see the effect of the higher vertex density at the pupil, iris and cornea.
Right eye: center according to Joint Editor: (-0.012 , 0.677 , 0.025)
Center according to CenterVertBB: ( -0.0123304047156 , 0.677230507135 , 0.0271565997973 )
Center according to CenterVertGravity: ( -0.0123304255137 , 0.677230347301 , 0.0292094542762 )
Looks fine to me. The deviations from the Joint Editor values were expected.
Could it be that the left eye group contains some stray vertices that throw the center off? Such things have happened to me when I was rigging a figure, and sometimes hunting down the stray vertex is quite difficult.
The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter
I usually just pull the values straight out of my modelling app (C4D) and scale them accordingly (move the decimal over a few places, since I scale by 1000).
Cinema4D Plugins (Home of Riptide, Riptide Pro, Undertow, Morph Mill, KyamaSlide and I/Ogre plugins) Poser products Freelance Modelling, Poser Rigging, UV-mapping work for hire.
So you don't have a modelling app that can load .obj files? If you do, it may have better tools to allow you to determine the center of meshes.
Cinema4D Plugins (Home of Riptide, Riptide Pro, Undertow, Morph Mill, KyamaSlide and I/Ogre plugins) Poser products Freelance Modelling, Poser Rigging, UV-mapping work for hire.
...since I scale .obj files up by 1000 when I import them, I simply move the decimal over 3 places to the left. So, for example, 27.127 becomes 0.027127 or just 0.027 when rounded to 3 places.
Cinema4D Plugins (Home of Riptide, Riptide Pro, Undertow, Morph Mill, KyamaSlide and I/Ogre plugins) Poser products Freelance Modelling, Poser Rigging, UV-mapping work for hire.
...if you want to do this inside Poser, and you have polygon edges at the center to go by, then you can also hide all other bodyparts, then use the orthographic camera views (top, front, left, right, bottom, rear), enable one of the wireframe preview modes and adjust it pretty close that way (using the polygon edges as a guide).
Cinema4D Plugins (Home of Riptide, Riptide Pro, Undertow, Morph Mill, KyamaSlide and I/Ogre plugins) Poser products Freelance Modelling, Poser Rigging, UV-mapping work for hire.
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.
Is there any way, using python, that you can find the centre of a figure part like the chest or collar or an eye and print it up on the screen?
With rigging figures it can be very difficult to centre a bone on a part of the figure properly and things like eyes and wheels don`t work properly without being centred.