Sat, Nov 23, 12:58 AM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 21 6:06 am)



Subject: Python (or other) script request.


AntoniaTiger ( ) posted Tue, 12 April 2005 at 8:46 AM · edited Wed, 20 November 2024 at 1:07 AM

The way Poser works, the Deltas for a morph take up a lot of space in the .CR2, and I often see them with 7 or 8 decimal places. That works out as tiny fractions of a millimetre, and seems excessive. It's often much more precision that the .obj file stores. Is there a Python script (or Perl or Awk or similar, but Poser has Python included) which can truncate this data? When a Parameter velue of 1.0 shifts a vertex by the Delta value, can anyone see the effect of that 7th decimal place? And sometimes you get a burst of scientific notation; 7 or 8 significant digits with an exponent. 1 part in 10E12?


ockham ( ) posted Tue, 12 April 2005 at 9:11 AM

file_219394.jpg

Here's a quickie that cuts precision to 4 places. Saves the result as *.CR2.XXX to make it obvious in directory; I didn't want to make it something like *Mod.CR2, because that could be a real file.

My python page
My ShareCG freebies


ockham ( ) posted Tue, 12 April 2005 at 9:12 AM

Forgot to say: this mods the 'v' lines as well as the 'd' lines. Most CR2s don't have 'v' lines, but a lot of mine have internal geometries....

My python page
My ShareCG freebies


AntoniaTiger ( ) posted Tue, 12 April 2005 at 10:28 AM

Thanks. I did a little test with the other problem I see. Some values are of the form: 1.2345e-005 Poser 5, at least, has no problem with the form: 1.2345e-5 Only 2 bytes per value, but it was over a megabyte from the CR2 I tried it on.


AntoniaTiger ( ) posted Tue, 12 April 2005 at 11:05 AM

Now tested... Set to the default, it trimmed 7MB off a 31MB .cr2 That may be excessive. Some of the morphs did seem to lose a little definition. One or two, such as NavelGone, do need more precision. Nevertheless, it pretty well works as advertised. Thanks again.


ockham ( ) posted Tue, 12 April 2005 at 11:08 AM

If that's too much, try changing the 4 to 5 as mentioned in the comments at top....

My python page
My ShareCG freebies


EnglishBob ( ) posted Tue, 12 April 2005 at 11:32 AM

file_219396.jpg

25 minutes from request to fulfilment - that's impressive... Thanks Ockham, I've been looking for something like this. I think Dodger had a Perl script once that did the same thing, but I could never be bothered to install Perl just for that.


ockham ( ) posted Tue, 12 April 2005 at 12:01 PM

That's the advantage of experience.... having lots of templates floating around, which can be quickly modified to serve a new purpose. The disadvantage of experience is the tendency to say "Oh, I know that won't work." A beginner starts with the assumption that everything is possible, so goes ahead and tries it.

My python page
My ShareCG freebies


AntoniaTiger ( ) posted Tue, 12 April 2005 at 12:38 PM

Yes, 5 decimal places seems to work. Possibly not so good for close-ups, but since Aiko and Hiro (the recent/new DAZ anime figures) don't use morph INJ/REM methods, saving over 10% on each figure is a useful improvement.


face_off ( ) posted Tue, 12 April 2005 at 4:16 PM · edited Tue, 12 April 2005 at 4:17 PM

Wow - this is fantastic! Thanks ockham. I assume it's valid to do this for pz2 and pz3 files too?

Message edited on: 04/12/2005 16:17

Creator of PoserPhysics
Creator of OctaneRender for Poser
Blog
Facebook


ockham ( ) posted Tue, 12 April 2005 at 4:44 PM

Hmm... Yes, I guess you could. The 'v' and 'd' lines are the same. The file-open dialog looks for CR2, but you could either change that or just type in a different name. Nothing after the file-open is CR2-specific.

My python page
My ShareCG freebies


AntoniaTiger ( ) posted Tue, 12 April 2005 at 5:13 PM

I just flicked through a .obj file, and it looks as though it would work on that too. The same "v " lines. You could probably cut back a "vt " line too -- is that the UVmap data? -- but it only has two values.


byAnton ( ) posted Wed, 13 April 2005 at 2:09 AM

Cool stuff. I love threads like this. Kudos to Antonia and ockham. Anton Kisiel

-Anton, creator of Apollo Maximus
"Conviction without truth is denial; Denial in the face of truth is concealment."


Over 100,000 Downloads....


ryverthorn ( ) posted Fri, 15 April 2005 at 11:37 PM

this is great! it's just what I needed! I was able to get a 6.3 mb file down to a 4.7 mb file with no morph quality loss... I am one happy camper here! thank you very much! :-)


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.