The quotes received were higher than expected so i’ll wait until the college technicians are back as they provide a cheaper service. in the meantime i’m trying to work out how to simplify the process – which essentially means simplifying the meshes coming out of Poser.
My trial license with Magics has come to a close so i don’t have an effective BooleanUnion tool at the moment – again the solution is to make the models simpler. This doesn’t mean sacrificing detail , just getting rid of all the hidden inner meshes which contribute nothing to the sculpture and positively hinder the union.
I posted to Content Paradise the official forum for Poser about how to remove unwanted body parts and a user suggested that i look into rigging and bones for a solution. To understand this you need a basic understanding of Poser figures.
A Poser figure consists of a series of 3d meshes (which are connected sets of polygons). A mesh might be a foot, or a forearm, or a chest, or an eyeball, or as small as an eyelash. The meshes fit together to make the figure – there shouldn’t be any gaps but there probably are. If the figure is clothed then the clothes replace the body mesh below, so james casual has no feet just a shoe mesh. Clothes tend to leave bigger gaps. Remember gaps aren’t important if you are rendering a 2d image which is what the majority of Poser users are doing. But if you want to create a watertight STL file then gaps are fatal. Each mesh can be displayed in any color or a texture map can be wrapped around it. There is a second part to any figure and this is the Bone Structure, these are invisible in terms of rendering but are what allows the Poser figure to move around.
each body part involved in movement has an associated Bone. Moving the bone moves the body part. The bones are connected to each other too. So every individual finger joint (30 of them) has an associated bone. Poser stores its action sequences, like walking, running, jumping, fighting etc… as bone movement sequences – which can be applied to any figure that has the appropriate bone structure. My project’s idea is to apply an action sequence and then export all the individual frames as 3d models and then BooleanUnion these to make a model to be rapid prototyped – sounds straightforward, but i am just getting to the point of establishing a fool-proof pipeline after 6 months which shows how infuriating it can be.
I put a request for help in simplifying the meshes (removing the crap i don’t need) on the Poser forum and received this reply from one of the resident Poser experts (thanks juanmanuel):
The suggested method was
1. export a figure as an OBJ file
2. in a 3d modelling program (Rhino) tidy up the figure – remove crap
3. import the tidy model – imported objects become props in Poser (that is boneless)
4. add back in the bones from the original figure
5. now the simplified figure is ready for movement and exporting
Sounds reasonable but in practise it was a bit of a nightmare (as much is in Poser). The main problem is in getting the bones into exactly the same places as before. This problem in turn is dependent on Poser’s scaling issues. briefly (and I don’t understand this in depth) Poser has its own unit conventions which are different from everyone elses – amazingly when you export a figure out of Poser and then import it back in without even changing it – it is a different size, and also in the wrong place.
This looks easy enough to put back (using scaling & transition functions) but when you go into the Bone Setup room and add in the original bones they don’t fit whatsoever – again Poser has some nasty interfaces which make your job harder and I couldn’t find a way to align the figure exactly with where it was before. This image shows a combination of the original and ‘cleaned’ figure (one red one cream). They should overlap completely but don’t – this error is down to something like the 7th decimal place and as the accuracy of the vertex positions is something like this (x y z coordinates)
-0.0729698 0.416975 -0.00470674
Even if you are only a few decimal places off the bone offset means that when you try to move the figure cracks begin to appear, which is what i’m trying to eradicate in the first place.
I’ll have another look at doing the bones by hand but this looks a messy method and if one bone of about 80 is off a little you get some strange figure mutations. So in desperation I started to look for other ways to simplify the process.
Poser can import and export figures as OBJ files which is a text formatted file (which is good because it can be edited by hand). An OBJ file at its simplest is a list of vertices (x,y,z coordinates) and then a list of polygon faces which use typically 4 of the vertice faces. Each body section is split from the others with a command like usemtl Fingernail, which tells the program which texture map to use for each body part. Crucially it allows you to cut out large sections of vertices which you don’t want. So this offered part of a solution.
So for example below is an image of the Right Toe (which is the front end of the shoe for clothed figures) and the code which draws it. There is an internal surface (in green) which i want to remove (because it messes up BooleanUnions later in the pipeline), so you can hunt down the associated polygon faces in the OBJ file and comment them out (by putting a # in front of them as shown).
So the Right toe can be simplified.
Here is a list of all the usemtl parts for a single Poser figure (James Casual from Poser 6) – i’ve added the line numbers at which the line appears out of a 130,000 line OBJ file.
The good news is many of the parts i wanted to remove are quite clearly seperated out, including tongues, teeth, eyelashes, fingernails, eye parts. The bad news for James Casual is the shoes which look to have been designed by a different (and messier) 3d modeller , making it very fiddly (like a days work) to seperate what you don’t want like shoelaces & inner soles. On the plus side you only have to do this once as every Poser pose of James Casual will always export the polygons in exactly the same order.
So now i have a program written in Java which takes an OBJ file and tidies it up. Unfortunately even when this is imported into Rhino (and then Joined, FillMeshHoles, UnifyMeshNormals to create a mesh with no naked edges), when you try and BooleanUnion this with another tidied figure Rhino can’t handle this. There may be ways around this – the problem stems from the FillMeshHole instruction filling holes which don’t exist (like across the midriff) in terms of the overall figure – but Rhino isn’t to know this and looks to fill across any mesh edges even those already Joined. One idea i’m looking at is to export all the Legs individually and fill these. Then union the legs, then do the same for the other body sections- eg chest,head,feet, arms and then reunite the parts later. But this seems like a lot of unnecessary unioning. Secondly there are a bunch of export variables from Poser which may help like Welding joins etc.
As i hope to BooleanUnion something like 200 figures (for a man walking across a room) i’ll need a safer process – when i get back to college and can use Magics STL again i think it will be able to handle these BooleanUnions, as i did with the Golem figure, but that’s why that software costs £4000 and Rhino costs £100. I’m looking to try and get an extended trial with the Materialise people (the sellers of Magics who work with artists including Peter Jansen) or other software solutions – i must have tried at least 15 different 3d modelling packages by now. I note that Peter is currently only making figures with about 30 unions so perhaps even magics would be stretched by more. So out of continuing frustration, and after seeing that i can get my hands on the actual 3d data, i decided to test out a radically different approach which may solve the Union problem and also differentiate my work from Peter’s.