Thu, Dec 26, 3:50 PM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Dec 26 9:02 am)



Subject: Mirroring an object: a scripting problem.


AntoniaTiger ( ) posted Sun, 24 April 2005 at 2:37 PM · edited Fri, 01 November 2024 at 2:28 PM

Many props can be fairly easily mirrored on an axis to make an opposite-handed staircase. I did this around a year ago with a stairs prop. The original, looking from the foot of the stair, had the banister on the left and the wall on the right. For the scene I was working on, putting the banister on the right made the background look better.

In this case it was a fairly simple change of sign on the x-coordinates in the .obj file of the prop.

Since the x-coordinate is the first, the change could be done in a text editor using the "v " at the start of the line as a key.

You'd have to do the same to morph deltas. Not too difficult on a prop.

After seeing some asymmetric clothing items, I wondered if comething similar could be done for figures. PhilC's Classical Wrap is an example.

There are a couple of extra complications.

1: You're going to have to change group names. lshldr for rhldr and so on. So what works for clothes designed for one figure might not work for clothes used with another figure. The group names seem similar for all figures, but I expect there are exceptions.

2: UVmapping. Well, unless there's text or the like visible, I'm not sure that it's worth bothering with changing it.

3: Non-centred items. If the boning is adjusted to compensate for an off-centre mesh, things are going to go badly wrong.

So, does anyone have any thoughts? Would you find a use for a utility which did a left/right swap?

Message edited on: 04/24/2005 14:43


SamTherapy ( ) posted Sun, 24 April 2005 at 2:56 PM

I think it would be very useful for making UK cars from US/European style models. There aren't too many right hand drive cars out there in Poserland.

Coppula eam se non posit acceptera jocularum.

My Store

My Gallery


PhilC ( ) posted Sun, 24 April 2005 at 3:05 PM

file_226392.jpg

I've produced a script that goes some way to do this. It will mirror a prop but the normals are inside out. If someone would like to play around with it, help yourselves. There are some redundant lines in it e.g Tkinter is not required. It was a WIP, my notes are still in the file.

philc_agatha_white_on_black.jpg


AntoniaTiger ( ) posted Sun, 24 April 2005 at 4:28 PM

I hadn't thought of the normals. With Poser defining them by the order of the points which define the polygon (I do have that right?), things could get tricky. But the grouping tool would fix that, as it does for the trick using a morph within Poser.


Spanki ( ) posted Sun, 24 April 2005 at 5:57 PM · edited Sun, 24 April 2005 at 6:05 PM

Yep, you need to reverse the winding order of the polygons as well to fix the normals. So a facet record...

f 1 2 3 4

...becomes...

f 4 3 2 1

...in .obj file format (note that the above is a simple, 4-sided polygon, "no textures, no normals" example of a facet record - below is a list of the various formats (where 'v' is a vertex index value, 't' is a texture index value and 'n' is a normal index value): f v v v <-- vertices only f v/t v/t v/t <-- vertices + textures f v//n v//n v//n <-- vertices + normals f v/t/n v/t/n v/t/n <-- vertices + textures + normals ...and some programs will also write out... f v/t/ v/t/ v/t/ <-- vertices + textures ...the above are triangles, 4 or more sided polygons would have additional values for each vertex.

Message edited on: 04/24/2005 18:05

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.


geoff1 ( ) posted Mon, 25 April 2005 at 4:41 AM

Just a thought. You could probably achieve this using Excell. Loading the .obj file as a text file and parsing on the spaces. A simple formula should swap the winding order and mirror the object on whichever axis is required. You would still need to maually change the left and right part names by hand. The symetry commands should take care of swapping over the joint parameters if the joints are a problem.


Privacy Notice

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.