Fri, Jan 3, 7:17 AM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2025 Jan 03 7:06 am)



Subject: Rename material zone?


cspear ( ) posted Tue, 01 August 2006 at 11:32 AM · edited Tue, 31 December 2024 at 11:53 AM

May be a stupid question, but I can't figure it out:

How do I rename a material zone? Specifically, SkinTorso on M3 Genitals to something else.

Thanks for any help.


Windows 10 x64 Pro - Intel Xeon E5450 @ 3.00GHz (x2)

PoserPro 11 - Units: Metres

Adobe CC 2017


dbowers22 ( ) posted Tue, 01 August 2006 at 12:11 PM · edited Tue, 01 August 2006 at 12:11 PM

The only way I know of is to edit the cr2 file in a text editor.

Another quesiton for everybody.  Is there a way of getting rid of a material zone in Poser
instead of having to edit the cr2 file in a text editor?
The grouping tool lets you create a new material zone but I haven't figured out
any way within Poser to delete that material zone if you made a mistake.
Once it is created it seems to be there forever.



AntoniaTiger ( ) posted Tue, 01 August 2006 at 2:48 PM

Wrong file. The critical data is in the .obj file, usually found in a subfolder under Geometries, but at least you don't need to mess around with a text editor, though you can do it that way. I have done. I used to post to the Fidonet DOS batch file echo. Take it as read that I'm weird. You can do it in Poser or in UVmapper, and you'll end up with a fresh version of the .obj file, and you'll have to edit the .cr2 to point it at the correct file. Poser first: Import the .obj file and open the grouping tool. You have to create a new group, but this is only temporary. You'll see two buttons: "Add Material" adds a material to the group. "Assign Material" makes the group a part of that material. Before you exit the grouping tool, delete your temporary group. You then export the mesh under a new filename. You should only have the "include existing groups" box ticked. UVmapper is similar. Load the model. You don't need to do anything with a dummmy group, just Select, By Material, and then Assign, To Material. Save the model when finished. It's possible that a .cr2 will do something clever, geometry switching and such, but there are usually just two lines which point at the geometry. When I've done this sort of thing, I've just added something to the filename, so that "foobar.obj" becomes "foobaru2.obj", which is easy to edit. Don't forget to save the .cr2 under a new name. If you're just changing a material name, rather than combining materials, you can do that as well, it's tidier. You'll then see the shrugging man symbol for the new version. You can have a Material in the .cr2, and it will appear in the Materials Room, but if there isn't a Material in the .obj file it won't do anything.


kuroyume0161 ( ) posted Tue, 01 August 2006 at 3:33 PM

The bodypart names at the top of the CR2 (the declaratory section) are instances of the groups (g) in the .obj file, i.e.:

OBJ:
g hip
f ...

CR2:
actor hip:1
    {
    storageOffset 0 0 0
    geomHandlerGeom 13 hip 
    }

It doesn't matter if the g name is compound, say, 'g figure1 body hip' as long as all of the facets belonging to 'hip' are in this same group that contains this name as one of the list.  Same for materials.

The Material names in the actor/prop or figure sections of the CR2 (the definitive section) are instances of the materials (usemtl) in the .obj file, i.e.:

OBJ:
usemtl EyeBall
f ...

CR2:
    material EyeBall
        {
        KdColor 1 1 1 1
        KaColor 0 0 0 1
        KsColor 1 1 1 1
        TextureColor 1 1 1 1
        NsExponent 30
        tMin 1
        tMax 1
        tExpo 0.6
        bumpStrength 0.700794
        ksIgnoreTexture 0
        reflectThruLights 1
        reflectThruKd 0
        textureMap NO_MAP
        bumpMap NO_MAP
        reflectionMap NO_MAP
        transparencyMap NO_MAP
        ReflectionColor 1 1 1 1
        reflectionStrength 1
        }

If you change the name of any bodypart group (actor) or material zone (Material) in the CR2, this will need to be reflected in the .obj file - as AntoniaTiger states.  They are inexorably linked.  Be aware of this so that you are not only modifying the CR2, but also the OBJ file.

Robert

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


diolma ( ) posted Tue, 01 August 2006 at 3:40 PM · edited Tue, 01 August 2006 at 3:45 PM

AntoniaTiger and kuroyume0161 are perfectly correct regarding the materials grouping for the original .obj file.
(BTW, AnthonyAppleyard has a utility "MakeObj" that can rename materials in .obj files Search in freestuff, or contact Anthony..)

However, when you create new groups in Poser using the grouping tool and save as a CR2, that does not affect the original .obj file. So all the additional info is then in the .cr2 file. And AFAIK, there's no way to rename/delete them in Poser, so a text editor is your only option...

I think.. (maybe there's a python script out there?)

Cheers,
Diolma



AntoniaTiger ( ) posted Tue, 01 August 2006 at 4:24 PM

Quote - It doesn't matter if the g name is compound, say, 'g figure1 body hip' as long as all of the facets belonging to 'hip' are in this same group that contains this name as one of the list.  Same for materials

Compound group names will mess up Wardrobe Wizard. and maybe other Poser Python uttilities. I've seen it with some Japanese-made clothing items: I suppose the strange extra names are some representation of Japanses text.


kuroyume0161 ( ) posted Tue, 01 August 2006 at 5:50 PM

Oh, I've seen quite a few compound group names in Poser content - and even had the misfortune of encountering compound usemtl names in rare instances as well (which required a change to my plugin code currently being beta tested).  Not always figures, mind you, or figures that would have 'clothes' and thus need WW support (thankfully!).

Robert

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


Fazzel ( ) posted Wed, 02 August 2006 at 12:09 AM

Quote - Wrong file. The critical data is in the .obj file, usually found in a subfolder under Geometries, but at least you don't need to mess around with a text editor, though you can do it that way. I have done. I used to post to the Fidonet DOS batch file echo. Take it as read that I'm weird. You can do it in Poser or in UVmapper, and you'll end up with a fresh version of the .obj file, and you'll have to edit the .cr2 to point it at the correct file. Poser first: Import the .obj file and open the grouping tool. You have to create a new group, but this is only temporary. You'll see two buttons: "Add Material" adds a material to the group. "Assign Material" makes the group a part of that material. Before you exit the grouping tool, delete your temporary group. You then export the mesh under a new filename. You should only have the "include existing groups" box ticked. UVmapper is similar. Load the model. You don't need to do anything with a dummmy group, just Select, By Material, and then Assign, To Material. Save the model when finished. It's possible that a .cr2 will do something clever, geometry switching and such, but there are usually just two lines which point at the geometry. When I've done this sort of thing, I've just added something to the filename, so that "foobar.obj" becomes "foobaru2.obj", which is easy to edit. Don't forget to save the .cr2 under a new name. If you're just changing a material name, rather than combining materials, you can do that as well, it's tidier. You'll then see the shrugging man symbol for the new version. You can have a Material in the .cr2, and it will appear in the Materials Room, but if there isn't a Material in the .obj file it won't do anything.

Editing the object file isn't going to help. Poser doesn't alter the original object file when
a new material zone is created with the grouping tool.  The only thing that gets
altered is the character or the prop within Poser. 
Okay, lets use this as example.  Load a box in from the props libaray.  Select the
front of the box with the grouping tool.  Press Assign Materials in the grouping
tool dialogue box and where it says name, call that Front.  Now poser hasn't
altered the original object file.  I could load in another box and the new box
wouldn't have a material zone called Front on it, only the first box.
So now I have only two options I know of if I want to get rid of a material zone called Front
that I myself created with the grouping tool.  I can delete the first box and start over.  Or I can
save the box as a pp2 file and use an editor to go in and delete the material zone I created.
Now this is relatively simple for just a box with one material zone, but it is a royal mess
for a character with multiple other zones that I have to wade through to get to the
material zone I want to delete.
What I want to know is if there is a third option.
I want  a simple way to delete a material zone that I created with the grouping tool while
I am still in Poser.  Poser lets me create material zones, why isn't there an option or a
way to rename or delete material zones from within Poser.



cspear ( ) posted Wed, 02 August 2006 at 4:26 AM

OK folks, thanks for all these suggestions.

There's a lot of information here, some of it conflicting, so I think I need to spend some quality time with a text editor, Poser and UV Mapper and work through the options. I'll post my findings once I have any.

I can't help feeling that if I had any clue about Python I could probably accomplish this with a simple script, but I guess I'd need to understand the nuts-and-bolts of the process first.


Windows 10 x64 Pro - Intel Xeon E5450 @ 3.00GHz (x2)

PoserPro 11 - Units: Metres

Adobe CC 2017


kuroyume0161 ( ) posted Wed, 02 August 2006 at 11:42 AM

While I sort of agree Fazzel  - it is totally possible to make the modification within Poser and leave it there - it is only a temporary change.  The prop or figure will be saved with the new/changed material zone and the geometry in memory will reflects the change while Poser is running.  One must wonder if you save a figure to the library with altered material zones, how does Poser restore these on next use?  Does it, horridly and probably, store the entire Figure geometry in the CR2?  There is no other way to make the change permanent without change to the geometry definition (period - end of argument).  It may not be the original geometry definition (the original .obj file referenced) - but there must be a new one somewhere to relay the change in name or configuration.  Of this, I am well experienced and confident. :)

Robert

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


nomuse ( ) posted Thu, 03 August 2006 at 3:43 PM

Echoing Kuroyume. Materials names in the cr2 are the names of the usemtl groups in the obj file referenced by that cr2. There is no "user name" function as there is with body parts. Thus, the simplest way to change the name of a material group is to edit the obj file and the cr2. And since this is a simple find-and-replace, a text editor doesn't have to frighten anyone. Just search for all instances of the one name and replace with the other. I do wonder why it bothers you, though. This seems a lot of work for a material name you will encounter only rarely. Not only that, whatever you do will be peculiar to your own Runtime; you will not be able to legally share it without a fair bit of running around with objecation mover or the like.


diolma ( ) posted Thu, 03 August 2006 at 4:57 PM

"While I sort of agree Fazzel  - it is totally possible to make the modification within Poser and leave it there - it is only a temporary change.  The prop or figure will be saved with the new/changed material zone and the geometry in memory will reflects the change while Poser is running.  One must wonder if you save a figure to the library with altered material zones, how does Poser restore these on next use?  Does it, horridly and probably, store the entire Figure geometry in the CR2?  There is no other way to make the change permanent without change to the geometry definition (period - end of argument).  It may not be the original geometry definition (the original .obj file referenced) - but there must be a new one somewhere to relay the change in name or configuration.  Of this, I am well experienced and confident. :)"

Almost but not quite...:-))

If you save a character to the library, then if (and only if) the changes would affect the original .obj, then Poser creates a new .obj in the same library. The corresponding .cr2 file points to the new .obj....

At least, that's what I assume, due to the fact that my Character library has a few .obj files in it (that I didn't put there), where I'd changed something that would have affected the original .obj. and then saved the figure back into the library.

I've just tried a quickie experiment. I loaded Posette, used the grouping tool to create a (random) material zone, then saved the CR2 back into the same figures library (under a new name, of course).
Sure enough, when I looked using Explorer, there were 3 new files: the .cr2, the .png and a .obj.
All in the character folder/directory.

So that would seem to explain how Poser does it.

However, none of this gets to the gist of the problem - how to remove and/or rename material gruops within Poser.
Personally, I don't think it can be done. I'd love to be proved wrong..:-))

Cheers,
Diolma



sixus1 ( ) posted Fri, 04 August 2006 at 12:02 AM

I always use the find and replace method with a text editor in the OBJ and the Cr2.

Save backups before you begin.  :)

--Rebekah--


cspear ( ) posted Mon, 07 August 2006 at 12:23 PM

Yup, getting into the.obj and .cr2 files with a text editor and doing find and replace did the trick.

I wanted to do this to avoid problems with SkinVue 2 - and it worked!

Incidentally, it's quite easy to then apply the new material to M3's genitals: copy the material for the torso and paste it  onto the genital texture. Then change the relevant bitmap in the function editor. A bit of a hassle, but I'm happy: I don't do enough full-frontal male nudes for it to be a pain.

I wonder if Vue 6's heralded ability to use Poser 6 shaders will make SkinVue redundant?


Windows 10 x64 Pro - Intel Xeon E5450 @ 3.00GHz (x2)

PoserPro 11 - Units: Metres

Adobe CC 2017


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.