Arrange materials in Poser 9?

3WC3WC Posts: 1,105
edited December 1969 in Poser Discussion

I'm creating a prop with many materials. In my modeling program, I had the option to display them alphabetically. When importing the obj file to DAZ Studio, the materials show up alphabetized in the surfaces tab. In Poser 9, not so much. They seem to be random, I'm thinking maybe they are displayed according to the order I created them on the model.

Is there an easy way to rearrange them to display alphabetically in Poser 9. Or an easy way to edit the cr2 manually so the materials are alphabetical there?

Comments

  • macleanmaclean Posts: 2,438
    edited December 1969

    Poser has never displayed material names alphabetically, and yes, it's really annoying. What it does is take the names in the order they're listed in the .obj file. If you check the .obj in Notepad, you'll see the order is identical.

    mac

  • 3WC3WC Posts: 1,105
    edited December 1969

    So basically the only solution would be to text hack the obj file, which may be hazardous. :)

  • macleanmaclean Posts: 2,438
    edited May 2014

    There's trick you can use, and I haven't done it for years, so my memory may be faulty, but I'll try to outline the steps.

    Make a plane and divide it up. Say you have 11 materials - divide it into 12 and delete 1 polygon. Then assign a material to each polygon (corresponding to your own material names, naturally). Then save it (I use the name 'blank.obj'), and add it to the figure obj by saving them together.

    Now edit the .obj file in notepad. First, find your polygon group (look for 'g blank' no quotes)- it should be just a few lines with all the material names listed. Cu/paste the whole group so it's at the top, above the other groups, then if necessary, re-arrange the lines to get the materials in the order you want them, then resave the file.

    You'll have to make a new 'blank' body part for it in the .cr2 or Poser won't see it. Set it to invisible and locked so the user won't see it or move it around. The figure should now load in Poser with the materials in the order you want them.

    It sounds a bit of a hassle, but it's actually not that difficult to do. It doesn't add much to the fig (X number of polys), and it guarantees correct material order. Also, once you done it, you can use it for any new figures.

    mac

    Post edited by maclean on
  • macleanmaclean Posts: 2,438
    edited December 1969

    Ha! I had a sudden thought. I'd been looking for the old 'blank.obj' I kept to use, but couldn't find it. I must have dumped it years ago. However, I found an old .obj file I'd used it in. So here's what mine looked like.

    g blank
    usemtl back_wall
    f 27/1 28/2 35/3 36/4
    usemtl left_wall
    f 28/2 30/19 38/5 35/3
    usemtl right_wall
    f 30/19 31/18 37/8 38/5
    usemtl front_wall
    f 31/18 40/6 39/7 37/8
    usemtl corner_wall
    f 40/6 41/9 42/11 39/7
    usemtl corner_outer
    f 41/9 43/22 45/10 42/11
    usemtl outer_wall
    f 10/39 9/12 32/41 23/40
    usemtl tile1
    f 43/13 46/14 44/15 45/16
    usemtl tile2
    f 20/36 19/35 28/2 27/1
    usemtl floor
    f 19/35 21/17 30/19 28/2
    usemtl skirting
    f 21/17 29/20 31/18 30/19
    usemtl ceiling
    f 29/20 23/40 40/6 31/18
    usemtl door_frame
    f 23/40 32/41 41/9 40/6
    usemtl door
    f 32/41 24/21 43/22 41/9
    usemtl door_handle
    f 24/21 26/48 46/23 43/22
    usemtl plate
    f 1/24 2/25 18/26 3/27
    usemtl switch
    f 2/25 5/28 4/37 18/26
    usemtl socket
    f 5/28 6/29 22/38 4/37

    As you can see, it's one poly for each material, and hardly adds any size to a file at all.

    mac

  • macleanmaclean Posts: 2,438
    edited May 2014

    And here's the blank body part. It doesn't need any channels since no one's going to move or rotate it, and they only add useless size to the .cr2. Just the basic code to let Poser know it's there. It's already hidden and locked.

    You could actually copy/paste this code into a .cr2. The 1st part goes in the geometry block, and the 2nd part in the main block. (Put them in as the first geometry/body part in each section, after BODY and the CenterOfMass stuff).

    
     actor blank:1
     {
      storageOffset 0 0 0
      geomHandlerGeom 13 blank
     }
    
    
     actor blank:1
     {
      name blank
      off
      bend 0
      dynamicsLock 1
      hidden 1
      addToMenu 0
      castsShadow 0
      includeInDepthCue 1
      useZBuffer 1
      parent BODY:1
      creaseAngle 80
      channels
      {
      }
      endPoint 0 0 0
      origin 0 0 0
      orientation 0 0 0
      displayOrigin 0
      displayMode USEPARENT
      customMaterial 0
      locked 1
      backfaceCull 0
      visibleInReflections 1
      visibleInRender 1
      displacementBounds 0
      shadingRate 0.2
      smoothPolys 1
     }
    Post edited by maclean on
  • macleanmaclean Posts: 2,438
    edited December 1969

    Out of curosity, I checked that figure in Poser and DS. The blank body part doesn't show in the scene pane in DS as a body part. It doesn't show in the body parts list in Poser either, but it is in the Hierarchy pane for some reason. Not that it matters, since nothing can done with it.

    mac

  • 3WC3WC Posts: 1,105
    edited December 1969

    You just blew my mind. I might have to try this out, see if I can wrap my brain around it. Thanks.

Sign In or Register to comment.