Tue, Feb 4, 5:54 PM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2025 Feb 03 12:46 am)



Subject: deleting materials


pauldol ( ) posted Tue, 12 July 2011 at 10:50 AM · edited Mon, 03 February 2025 at 10:05 AM

Hi all,

I have an object (a hand from poser library) and I need to delete ALL materials (i.e. skin, nails, preview).

Then I need to apply a very simple material with some certain diffuse and ambient color.

 

How can I delete materials. Is this easy to do with python as well?

Thank you,

Paul


bagginsbill ( ) posted Tue, 12 July 2011 at 11:26 AM

You don't delete materials. You replace the contents but the zones will always be there. Do you mean to delete the contents  - the shaders nodes?

If you want to apply the same shader to all materials in a prop, then build or load the shader in one, then right-click and select all, then right-click and apply to all.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


lesbentley ( ) posted Tue, 12 July 2011 at 4:29 PM · edited Tue, 12 July 2011 at 4:43 PM

The 'material zones' are part of the geometry, and the geometry is usually stored in an obj file, thought it can also be stored in a 'library' file (eg cr2, pp2, hr2) as a 'geomCustom' section. The sections of the geometry that define a 'material zone' start with the word 'usemtl', and this is followed by the name of the material, next comes a line that names the 'group' (g) that the zone belongs to, and that is followed by a line or lines that defines which facets comprise the material zone.

The settings for a material (as opposed to the material zone) are stored in the 'library' file as 'material' sections. When you delete a 'material' section from a library file, if the 'usemtl' section still exists in the geometry, Poser will create a new 'material' section for that zone the next time the library file is loaded.

To delete a 'material zone' you need to delete the 'usemtl' section for that material from the geometry (obj, or geomCustom). You do that in a text editor or cr2 editor. For the sake of tidiness you should also delete the 'material' section from the library file.

The above is given as information for anyone who wants to delete a material. I am not suggesting that you should delete materials in you particular circumstance. Most of the time, the easiest way to achieve whatever aim you have in relation to materials, is change the material settings.

Poser will always load a material named 'Preview', even if no material zones are defined in the obj.


pauldol ( ) posted Thu, 14 July 2011 at 5:12 AM

Quote - The 'material zones' are part of the geometry, and the geometry is usually stored in an obj file, thought it can also be stored in a 'library' file (eg cr2, pp2, hr2) as a 'geomCustom' section. The sections of the geometry that define a 'material zone' start with the word 'usemtl', and this is followed by the name of the material, next comes a line that names the 'group' (g) that the zone belongs to, and that is followed by a line or lines that defines which facets comprise the material zone.

The settings for a material (as opposed to the material zone) are stored in the 'library' file as 'material' sections. When you delete a 'material' section from a library file, if the 'usemtl' section still exists in the geometry, Poser will create a new 'material' section for that zone the next time the library file is loaded.

To delete a 'material zone' you need to delete the 'usemtl' section for that material from the geometry (obj, or geomCustom). You do that in a text editor or cr2 editor. For the sake of tidiness you should also delete the 'material' section from the library file.

The above is given as information for anyone who wants to delete a material. I am not suggesting that you should delete materials in you particular circumstance. Most of the time, the easiest way to achieve whatever aim you have in relation to materials, is change the material settings.

Poser will always load a material named 'Preview', even if no material zones are defined in the obj.

 

 

great, thank you. I have created a new material and all I want is to render the scene based only on the new material. Is that possible without deleting the other materials?

I was also trying to locate the obj file or a library file. Do you know where are they located?

 

Thanks a lot!

 

Paul


pauldol ( ) posted Thu, 14 July 2011 at 6:18 AM

file_470853.jpg

> Quote - The '**material zones**' are part of the geometry, and the geometry is usually stored in an **obj** file, thought it can also be stored in a 'library' file (eg cr2, pp2, hr2) as a '**geomCustom**' section. The sections of the geometry that define a '**material zone**' start with the word '**usemtl**', and this is followed by the name of the material, next comes a line that names the 'group' (**g**) that the zone belongs to, and that is followed by a line or lines that defines which facets comprise the material zone. > > The *settings* for a material (as opposed to the material zone) are stored in the 'library' file as '**material**' sections. When you delete a '**material**' section from a library file, if the '**usemtl**' section still exists in the geometry, Poser will create a new '**material**' section for that zone the next time the library file is loaded. > > To delete a '**material zone**' you need to delete the '**usemtl**' section for that material from the geometry (obj, or geomCustom). You do that in a text editor or cr2 editor. For the sake of tidiness you should also delete the '**material**' section from the library file. > > The above is given as information for anyone who wants to delete a material. **I am *not* suggesting that you should delete materials in you particular circumstance**. Most of the time, the easiest way to achieve whatever aim you have in relation to materials, is change the material settings. > > Poser will always load a material named 'Preview', even if no material zones are defined in the obj.

 

actually,

I attach some images to see what kind of material I need.


hborre ( ) posted Thu, 14 July 2011 at 7:52 AM
Online Now!

OBJ files generally reside in the Geometries folder within the same Runtime as your cr2 or pp2.  And yes, you can render, or test render, your scene with the new material without having to modify any others.


bagginsbill ( ) posted Thu, 14 July 2011 at 9:34 AM

Again answering your latest question:

Quote - You don't delete materials. You replace the contents but the zones will always be there. Do you mean to delete the contents  - the shaders nodes?

If you want to apply the same shader to all materials in a prop, then build or load the shader in one, then right-click and select all, then right-click and apply to all.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


lesbentley ( ) posted Thu, 14 July 2011 at 11:07 AM

file_470860.jpg

(click image for larger view)

Quote - great, thank you. I have created a new material and all I want is to render the scene based only on the new material. Is that possible without deleting the other materials?

Each material zone can only support one material, though that one material may consits of many elements. So yes, you don't need to delete any materials. If you want the same material settings ("Shader") applied to all the materials in the figure, do as bagginsbill said. Set up one material the way you want it, then do 'Select All' > 'Apply to all' (see graphic above).


markschum ( ) posted Thu, 14 July 2011 at 11:45 AM

You may find that if you are trying to simulate a marble statue that keeping the seperate material zones will make it difficult.  The solution there is to actually remove the materials from the obj by changing the usemtl lines .


lesbentley ( ) posted Thu, 14 July 2011 at 11:59 AM · edited Thu, 14 July 2011 at 12:06 PM

If you wanted all parts of the hand to use the same 'material zone', you would need to edit the geometry. If your figure (or prop) uses an obj file for the geometry, then the easiest way would probably be to use the free utility "UV Mapper" to assign the same material (zone) to all groups in the hand. From the UV Mapper Edit menu use 'Select by Group' then 'Assign to Material'.

Another way to do it is through Posers Grouping Tool. The Grouping Tool will work even if the figure (or prop) uses geomCustom (internal geometry).

 

[edit]
P.S. I wrote the above before I saw markschum's post. Whilst I have never tried that method, I guess it is a equally valid way to go.


pauldol ( ) posted Fri, 15 July 2011 at 8:23 AM

Thank you all.
I am almost done with what I need to do.

I attach an image of what I've done so far.
my only question is this one:
You can notice that the thumb has three tones of red.

The most "redish" part has RGB value (165,0,0)
However the material I assign to it has diffuse and ambient color (255,0,0)

How can I render it and keep the (255,0,0) value?

Thank you in advance,

Paul 


pauldol ( ) posted Fri, 15 July 2011 at 8:25 AM

file_470896.jpg

here is the image


hborre ( ) posted Fri, 15 July 2011 at 9:42 AM
Online Now!

Have you tried just rendering with ambient channel active?  Or set diffuse_color to white and render.


pauldol ( ) posted Fri, 15 July 2011 at 10:38 AM

Quote - Have you tried just rendering with ambient channel active?  Or set diffuse_color to white and render.[/quote if diffuse color is white then the rendered colour will appear as white.

how do I render with ambient channel active?

thanks.


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.