Forum: Poser 11 / Poser Pro 11 OFFICIAL Technical


Subject: Phantom material zone.

IMP3D opened this issue on Aug 01, 2020 ยท 11 posts


IMP3D posted Sat, 01 August 2020 at 3:44 AM

Okay, this is driving me mad.

I've created a conforming figure. When I imported the obj originally for grouping in Poser and rigging in the Fitting Room, it had one material, Shirt, over all. I used the grouping tool to assign new material zones, including Shirt for only parts of the figure. I then rigged the figure in the Fitting Room, and saved it, creating the cr2 and new obj.

When I load the figure into a new scene, everything's as I'd expect. When I save the scene, close Poser, and re-open the scene, the whole figure has been assigned to Shirt. The other materials still appear in the drop-down, but Shirt overrides them all.

I've tried using UVMapper and editing the cr2 to assign the correct Shirt parts to a new material, Tunic, removing all references to Shirt from the cr2, loading all of this into a new pz3 (after closing Poser in between), saving and closing the pz3, opening it again - and Shirt has returned, overriding the other zones again. I've opened the pz3 in a text editor, and there's no Shirt in it - until I open it again. There are no groups in the figure other than the body parts.

The obj has no Shirt. The cr2 has no Shirt. The pz3 has no Shirt. And yet, there is Shirt.

WTH?


adp001 posted Sat, 01 August 2020 at 4:47 AM

The obj has no Shirt. The cr2 has no Shirt. The pz3 has no Shirt. And yet, there is Shirt.

That seems to be the problem.

What is in the obj defines which polygon has which material. In CR2 it only says THAT there are materials, a material name and what the material looks like. Where exactly it belongs to, that's what is written in the OBJ file (assignment to polygons).




IMP3D posted Sat, 01 August 2020 at 5:02 AM

adp001 posted at 5:00AM Sat, 01 August 2020 - #4395662

The obj has no Shirt. The cr2 has no Shirt. The pz3 has no Shirt. And yet, there is Shirt.

That seems to be the problem.

What is in the obj defines which polygon has which material. In CR2 it only says THAT there are materials, a material name and what the material looks like. Where exactly it belongs to, that's what is written in the OBJ file (assignment to polygons).

That's not the problem. The polys previously assigned to Shirt have been reassigned. There is no reference to Shirt in obj, cr2, or pz3 - and yet, it reappears. I don't see from where.


adp001 posted Sat, 01 August 2020 at 6:50 AM

Maybe you like to try this:

    searched_matname = "Shirt"
    geom = poser.Scene().CurrentActor().Geometry()
    for idx, poly in enumerate(geom.Polygons()):  # type: poser.PolygonType
        if poly.MaterialName() == searched_matname:
            print idx

Should print polygon index if polygon has specified material name.




EldritchCellar posted Sat, 01 August 2020 at 12:28 PM

adp001's python should locate it but I'm just curious...

Have you opened the obj in a text editor and searched usemtl Shirt? You said that there are no references but not how you determined there are no references.

Likewise with the cr2.



W10 Pro, HP Envy X360 Laptop, Intel Core i7-10510U, NVIDIA GeForce MX250, Intel UHD, 16 GB DDR4-2400 SDRAM, 1 TB PCIe NVMe M.2 SSD

Mudbox 2022, Adobe PS CC, Poser Pro 11.3, Blender 2.9, Wings3D 2.2.5


My Freestuff and Gallery at ShareCG




EldritchCellar posted Sat, 01 August 2020 at 12:45 PM

Also...

20200801_134337.jpg



W10 Pro, HP Envy X360 Laptop, Intel Core i7-10510U, NVIDIA GeForce MX250, Intel UHD, 16 GB DDR4-2400 SDRAM, 1 TB PCIe NVMe M.2 SSD

Mudbox 2022, Adobe PS CC, Poser Pro 11.3, Blender 2.9, Wings3D 2.2.5


My Freestuff and Gallery at ShareCG




nerd posted Sat, 01 August 2020 at 5:36 PM Forum Moderator

It's a good practice to keep backups when working on stuff, but don't reuse file names. If the original OBJ and the correctly grouped one are anywhere in the runtime path and have the same name Poser may find the wrong one and use it.

When I make changes to the geometry I always add a number to the geometry's file name. That way Poser can't pick up the wrong one.


IMP3D posted Sun, 02 August 2020 at 3:23 AM

EldritchCellar posted at 3:22AM Sun, 02 August 2020 - #4395710

adp001's python should locate it but I'm just curious...

Have you opened the obj in a text editor and searched usemtl Shirt? You said that there are no references but not how you determined there are no references.

Likewise with the cr2.

Yes, I did.


IMP3D posted Sun, 02 August 2020 at 3:30 AM

I've worked out what was happening, but I don't know how it was happening.

I'd created the figure previously allowing the Fitting Room to group the obj. The results were unsatisfactory, so I used the Grouping tool to determine groups. The unsatisfactory obj I exported to my project folder, outside Poser.

I noticed this morning that the problem figure, seen when I re-opened the pz3, had the wrong grouping - the original, Fitting-Room-generated grouping. The obj references in the cr2 were and are to the correct, later obj. I went to the project folder, deleted the offending obj, re-opened the pz3 - and all was fixed.

Somehow, although the cr2 paths were correct and the figure loaded correctly from the Library, once the pz3 was saved and then re-opened, it was calling in the other obj, from outside Poser.

Very strange, it seems to me.


IMP3D posted Sun, 02 August 2020 at 3:32 AM

nerd posted at 3:30AM Sun, 02 August 2020 - #4395735

It's a good practice to keep backups when working on stuff, but don't reuse file names. If the original OBJ and the correctly grouped one are anywhere in the runtime path and have the same name Poser may find the wrong one and use it.

When I make changes to the geometry I always add a number to the geometry's file name. That way Poser can't pick up the wrong one.

This is, I think, exactly what happened, except that the unwanted obj was outside any Runtime. I didn't think Poser would look that far afield.


IMP3D posted Sun, 02 August 2020 at 3:35 AM

EldritchCellar posted at 3:33AM Sun, 02 August 2020 - #4395714

Also...

20200801_134337.jpg

Yes, I'd already taken to deleting these from the cr2 as a matter of course.

I use material zones in the modeller now to aid grouping in Poser. This leaves material names for all body parts, which I then remove. I didn't do it that way with this model, though, because it started with a clothing base set up before I thought of doing it this way.