Welcome to the Poser Forum

Forum Moderators:  Boni, Kendra    Forum Coordinators:  darknewt, Jules53757, gmm2

Poser F.A.Q (Updated: 2018 Dec 12 9:55 am)


 Subject: Interesting observation about Poser6,Firefly, and obj Materials in re: Renderin

byAnton opened this issue on Apr 24, 2005 · 181 posts

Top of Forum Print

  byAnton    ( ) ( posted at 2:38PM Sun, 24 April 2005 · edited on 10:04AM Sun, 05 March 2006

I know the number of people who might care about this are few but.. When Firefly renders you get a "adding objects" status bar. I was curious why some figures render faster than others regardless of their polygon count. Well I took the slowest ones and reduced their obj to one material and they rendered super quick. So "adding objects" is a material zone calculation. But the question still existed as to why some rendered slower. Then I opened the obj file and found the difference. Some obj files have hundreds of fragmented g/usemtl strewn throught the obj file instead of groupped neatly together. g lHand usemtl SkinHands f 17250/35129 20780/18660 32811/35130 32810/35131 g lForeArm usemtl SkinBody f 32811/35130 32812/35132 32654/25808 32650/25807 g lHand usemtl SkinHands f 20780/18660 17249/35133 32812/35132 32811/35130 g lForeArm usemtl SkinBody f 32812/35132 32813/35134 32655/25805 32654/25808 g lHand usemtl SkinHands f 17249/35133 20777/18658 32813/35134 32812/35132 g lForeArm usemtl SkinBody f 32813/35134 32814/35135 32656/18657 32655/25805 g lHand usemtl SkinHands f 20777/18658 17248/25803 32814/35135 32813/35134 ----------------------------------------------------------- It should more simply say: g lHand usemtl SkinHands f 17250/35129 20780/18660 32811/35130 32810/35131 f 20780/18660 17249/35133 32812/35132 32811/35130 f 17249/35133 20777/18658 32813/35134 32812/35132 f 20777/18658 17248/25803 32814/35135 32813/35134 g lForeArm usemtl SkinBody f 32811/35130 32812/35132 32654/25808 32650/25807 f 32812/35132 32813/35134 32655/25805 32654/25808 f 32813/35134 32814/35135 32656/18657 32655/25805 This can be easily caused my remapping/regrouping, etc etc. A python utility or something for this would be awesome.

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


Over 100,000 Downloads....

  kuroyume0161    ( ) ( posted at 3:03PM Sun, 24 April 2005  · @2228937

Something like this should be 1) standard procedure and 2) simple to fix. Unlike vertices/uvs/normals, the order of polygons is inconsequential - as long as they are grouped properly and follow their 'usemtl' material assignments shouldn't matter how you jumble them. I'll have to check, but maybe UVMapper fixes this automatically. That would be slow for all geometries, but at least an immediate solution if it does.

C makes it easy to shoot yourself in the foot. C++ makes it harder, but when you do, you blow your whole leg off.

 -- Bjarne Stroustrup

Contact Me | Kuroyume's DevelopmentZone

  Kalypso    ( ) ( posted at 3:06PM Sun, 24 April 2005  · @2228943

I think the number of people who should care about this should be more :) Anything to speed up render times! Thanks Anton!


  Tashar59    ( ) ( posted at 3:13PM Sun, 24 April 2005  · @2228958

A utility to do this would be great. By hand would take forever. I wonder how many figures are like that in my runtime. LOL.


  byAnton    ( ) ( posted at 3:14PM Sun, 24 April 2005  · @2228960

I actually think UV mapper is one of the programs that throws references all around by the nature of selection and assignment.

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


Over 100,000 Downloads....

  byAnton    ( ) ( posted at 3:18PM Sun, 24 April 2005  · @2228963

PS: Anyone know how a .obZ is created. I don't beleive you can just click compression. I wanted to see if that cleanups up the obj.

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


Over 100,000 Downloads....

  kuroyume0161    ( ) ( posted at 3:25PM Sun, 24 April 2005  · @2228965

Well, correct Anton, UVMapper doesn't fix this. Deep Exploration does, but in the process it reorders the vertices. It puts each related vertex set together with its facets under the group, but this is no good. The process would be simple enough: Collect all unique groups (g blah) and then move duplicate groups under the first, minding material assignments (usemtl) - which can extend beyond groups. Then do the same for material assignments for each group.

C makes it easy to shoot yourself in the foot. C++ makes it harder, but when you do, you blow your whole leg off.

 -- Bjarne Stroustrup

Contact Me | Kuroyume's DevelopmentZone

  byAnton    ( ) ( posted at 3:30PM Sun, 24 April 2005 · edited on 3:36PM Sun, 24 April 2005 · @2228972

Right. It would have to first move everything reducing redundant goup tags and then, within each group, consolidate the mataerials.

Message edited on: 04/24/2005 15:36

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


Over 100,000 Downloads....

  maclean    ( ) ( posted at 3:36PM Sun, 24 April 2005  · @2228983

Good sleuthing, anton! Yes, you're right. UV Mapper doesn't fix this. I've noticed this a lot because when I have a figure with more than say, 10 or 15 materials, I prefer to have them in a set order, so the user can access them more easily in Surface Materials. (I do this by adding a blank body part which contains the materials in the order I want them). Anyway, as I said, I've noticed this when I'm rooting around in obj files and it annoys me, but I don't know the solution. If someone could write an app to correct this, I'd use it a lot. mac PS I'll drop a mention of this at steve cox's forum. He's stil upgrading UVM Pro, and this might be something he could include. mac


  Spanki    ( ) ( posted at 3:37PM Sun, 24 April 2005  · @2228986

Attached Link: "STOMP"" target="_blank">"STOMP"

If you're on a PC, try this utility I wrote. Just load the .obj file, then save it back out (might want to use a new filename). Check the export/save option dialog for facet sorting orders. Cheers.

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.

  Spanki    ( ) ( posted at 3:39PM Sun, 24 April 2005  · @2228994

btw, S.T.O.M.P stands for "Spanki's Three-d .Obj Manipulation Program" (or something like that.. I just liked the name ;).

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.

  Spanki    ( ) ( posted at 3:41PM Sun, 24 April 2005  · @2228998

Also. I wrote this before I wrote my "Riptide" C4D import/export plugin (wich has the same export features)... the plugin is a bit more robust than STOMP, if you have C4D (7.3 or later) you can also do this conversion using my plugin.

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.

  maclean    ( ) ( posted at 3:43PM Sun, 24 April 2005  · @2229010

I posted this a feature request to steve cox, but of course, that would only be good for content creators with a later version of UVM Pro. If someone wrote an app, it could be used by anyone. mac


  Eternl_Knight    ( ) ( posted at 3:43PM Sun, 24 April 2005  · @2229009

Good work, Anton! Will start working on a Python utility for this now. After all, in essence all that is needed is some string manipulation - so it shouldn't be too hard! EK


  Spanki    ( ) ( posted at 3:47PM Sun, 24 April 2005  · @2229020


Here's the export dialog.. make sure the option circled in red is selected.

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.

  Spanki    ( ) ( posted at 3:52PM Sun, 24 April 2005  · @2229028

Oh, one more thing... I usually sort 'By Group' and that will clean things up even more (if I recall correctly, I save out the facets by group, but by material within the groups). It might leave a few extra #usemtl lines than doing it by material, but it's a trade-off of more #g lines or more #usemtl lines. Using 'By Group' puts all the group polygons (that belong to the chest, neck, head, etc groups) in the same chunk in the file.

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.

  byAnton    ( ) ( posted at 3:54PM Sun, 24 April 2005  · @2229034

Spanki what program is that for?

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


Over 100,000 Downloads....

  byAnton    ( ) ( posted at 3:55PM Sun, 24 April 2005  · @2229036

So save out by Material first, then reload and save by group?

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


Over 100,000 Downloads....

  maclean    ( ) ( posted at 3:58PM Sun, 24 April 2005  · @2229041

Thanks for that, spanki! I just d/ld it and tried it out. It works fine, although I'm wondering if anything else in the obj is changed. I'm sure you'll understand what I mean. I have a horror of putting an obj through all sorts of different apps just to correct minor details. Is there anything I should be worried about? (Off to scour the readme now). mac


  byAnton    ( ) ( posted at 4:06PM Sun, 24 April 2005  · @2229046

Is that the latest UV mapper?

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


Over 100,000 Downloads....

  Spanki    ( ) ( posted at 4:09PM Sun, 24 April 2005  · @2229051

Anton, Try it both ways (by group and by material) - see which works best. Mac, I initially wrote the program to generate 'smoothed' normals between disconnected body parts (to keep seams from showing up in other apps). That function is still there, but the features expanded to allow me to fix other problems with .obj files produced by other apps ;). The only caveat is... I wrote this thing back in 2002 and I hadn't looked much at the code since then, so it may be slow in some areas, or may just crash on some files (?). There is a spec for the .obj file format available, but it is apparently open to a lot of interpretation (based on some of the .obj file output I've seen), so my program may choke on some files, from some programs. My Riptide plugin for C4D re-uses a lot of that code, but I did clean it up and bullet-proof it more - which is why I mentioned that it was more robust. As far as whether anything else gets changed... no, nothing of concequence (the comments change, uv-mapper regions are lost (but retained in the plugin version) but the vertex orders are not changed or anything like that). You CAN change some other things using the program, like consolodating UV vertices, flipping (mirroring) the model, etc.

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.

  Spanki    ( ) ( posted at 4:11PM Sun, 24 April 2005  · @2229052

Anton, sorry, I missed your other question... it's a stand-alone PC program I wrote about 3 years ago (see post and link at message #10, above).

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.

  byAnton    ( ) ( posted at 4:14PM Sun, 24 April 2005  · @2229054

Thanks. I missed that myself.

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


Over 100,000 Downloads....

  Deecey    ( ) ( posted at 4:21PM Sun, 24 April 2005  · @2229057

Very cool utility Spanki! Thanks much!



  byAnton    ( ) ( posted at 4:24PM Sun, 24 April 2005  · @2229061

Who's that Man!. Spanki's the Man! That's who the man! It fixed the problem. The test fragmented Obj's Render supper fast now. Previous test render time:1 Minute New test Render Time: 5 Seconds Ah such a good day. I love it when the community works together. Sending thread link to CL.

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


Over 100,000 Downloads....

  Spanki    ( ) ( posted at 4:26PM Sun, 24 April 2005  · @2229064

Woot! Cool beans. I'll have to crunch some of those files myself.

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.

  Deecey    ( ) ( posted at 4:27PM Sun, 24 April 2005  · @2229066

Previous test render time:1 Minute New test Render Time: 5 Seconds Out of curiosity, what was the size of the OBJ file?



  maclean    ( ) ( posted at 4:28PM Sun, 24 April 2005  · @2229069

'uv-mapper regions are lost' Ah, that's a pity. I tend to leave regions in for those few people who like to mess with mapping. On the other hand, there are far more people who'd prefer faster renders, so I may just forget the minority on this one. LOL. Thanks again, spanki. mac


  maclean    ( ) ( posted at 4:34PM Sun, 24 April 2005  · @2229083

Could this be one reason P6 is reputedly slower than P5 to render? They both add objects, but maybe there's a difference in how an obj file is read by them. mac


  Spanki    ( ) ( posted at 4:37PM Sun, 24 April 2005  · @2229084


Mac, I wrote the Cinema 4D plugin becuase C4D's .obj loading leaves a lot to be desired... I was in the process of modelling a humanoid with all the material zones and grouping you find in something like V3. C4D's loader (and/or exporter) botched everything up and I was losing all my material zones, etc. Anyway, while I was at it, I added the code to retain UV-Mapper regions, so I could re-import after doing some mapping and still have the regions around for more mapping etc. later. The above image is the export dialog for the C4D plugin.

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.

  byAnton    ( ) ( posted at 4:38PM Sun, 24 April 2005  · @2229086

Not everyone encounters this problem. But if I did, someone else might too. I tested several obj's. File size didn't matter. The one I tested that I mentioned was 4.5 megs. Render was without textured and unshadowed. Point being, see how long the hang up was?

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


Over 100,000 Downloads....

 To create a post you must first sign in or register an account.

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.