Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)
I think I know what you're trying to do. It might be possible to do it, but it won't be simple.
You're thinking about fixing the vertex orders on importing a morph target .OBJ that has its vertex order messed up by the 3D application, right?
A workflow that MIGHT work - no guuarantees!
If you're lucky, the modeling app messes up the vertex order on both exports IN THE SAME WAY. If that's the case, you can import the "original" .OBJ (the first export), have Python find the matching vertices, and create a translation table. Then import the morphed .OBJ, and have Python use the translation table to figure out what vertex in the imported. OBJ matches what vertex in the Poser original mesh. Move the vertex in the Poser original mesh to the position of the matching vertex in the imported .OBJ. Repeat for all vertices, and spawn morph target.
Again, this MIGHT work. There may very well be no consistency in how the 3D application messes up vertex orders, so there's no guarantee whatsoever.
The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter
Poser Based Sky Dome - I would very much like to set up a Sky Dome thread/tutorial that would'nt need to import a good dome, and am trying to replace the Ball Hi-Res prop. I'm wondering if a new sphere could be formed, such that the UV Mapping would be correct?
To try and get rid of the Window(panes) artifact; in this scene, without an objects beside Ball Hi-Res props?
*"I'm wondering if a new sphere could be formed, such that the UV Mapping would be correct?"
*You can do this. I have some scripts from TDMT lying around which can export/import geometry data using Poser's internal methods, including the UVs. I never released it because I realized people could use the method to distribute geometry bootlegs via a .py/.pyc or mere text file. :-P
The easiest way to do this would be to create your .obj and map it, then simply convert it to Poser geometry format, to be read in using a Python script. The harder way would be to write something which would create a sphere, with UVs, algorithmically. I'll bet Phil or svdl could help with pointers for the latter approach. I assume that's what you really want...?
===========================sigline======================================================
Cage can be an opinionated jerk who posts without thinking. He apologizes for this. He's honestly not trying to be a turkeyhead.
Cage had some freebies, compatible with Poser 11 and below. His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.
*"TDMT, is that the Figure to Figue Morph Transfer scipt?
So, what part of Forming a Sphere would be a risk?"
*That Darn Morph Thing is the name Spanki and I decided on for the morph transfer script. There are some functions in the UV and Geom modules which might point toward how to implement the Poser internal geometry methods. I'll e-mail you the encodement script, if you want. Just don't pirate meshes with it. :-P
I'm not sure that any part would be a risk, unless you mean what I mentioned about distributing geometries. A .obj file could be written out as a series of Numeric arrays and distributed in a .pyc file, to be reconstructed using PoserPython, if that's what you mean by risk. If you're asking more about complications, for the algorithmic approach you'd have to write a function to create a sphere using Python (the easy part) and then also something to properly position the UV coordinates for the new geometry (I'm not sure how I would approach that). Otherwise, I would just imagine encoding a .obj file as arrays and using Python to create it, but that would be going about things the hard way, for most purposes I could imagine.
I'm not sure I've answered any of your questions, however....
===========================sigline======================================================
Cage can be an opinionated jerk who posts without thinking. He apologizes for this. He's honestly not trying to be a turkeyhead.
Cage had some freebies, compatible with Poser 11 and below. His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.
:mellow: Importion. I'd like to know this is something Poser can do out of the box. If the numbers add up, in Python, I'd get kind of a fancy kick out of it; but learning Python, for modeling, is'nt on the list of reasons to care too much. I'd just as soon go look for a especially proper import? :closedeyes:
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.
Can python load vertexs, with order?