Thu, Nov 28, 4:39 AM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 27 5:12 pm)



Subject: Poser 7 Shader Question...


Chaosophia ( ) posted Wed, 14 March 2012 at 11:50 PM · edited Thu, 28 November 2024 at 4:38 AM

Ok this might be a stupid question, but say I use a shader on V4, and I wish to overlay another shader ontop of that one, is this possible? Or would the second shader just nullify the first loaded one, and would there be any steps i could take to get two shaders loaded onto 1 figure? The shaders I am using is the Skinvue Wet and wounded, I wish to have the dirty along with the scarred on v4...

Also I have noticed I can't add these shaders to some clothing any way around using the shaders to get the effect on clothing?

Sorry if this is a dumb question, or the answer is right in front of me, but figured I would ask as I am looking for the answer. Thanks in advance for any help.

 


RobynsVeil ( ) posted Thu, 15 March 2012 at 12:04 AM

If you load an mt5 file (shader) over an existing shader, it will over-write what's there.

HowEVER!

There is a way you can do this. It requires a bit of grey-matter exercise. And you will determine whether it's even a good idea to blend two shaders.

Interested?

Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2

Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand] 

Metaphor of Chooks


Chaosophia ( ) posted Thu, 15 March 2012 at 12:08 AM

Ok I'm down, interested i am.


RobynsVeil ( ) posted Thu, 15 March 2012 at 1:15 AM · edited Thu, 15 March 2012 at 1:16 AM

Great.

Here are the steps:
-- Download matmatic. Download the version that corresponds to your version of Poser (P7).
-- Have a read of the matmatic manual provided with matmatic.
-- Study the shader you want to over-write. It's not that difficult, in most non-matmatic-generated shaders.
-- Create this shader in Python code
-- Study the shader you wish to combine with the shader already on the material zone.
-- Create this shader in code.

Study both of these, then decide whether there is functional duplication or conflicting material setups. Resolve, compile and load.

Now, how easy was that? All you have to do is learn a new skill - Python - which is really not that hard to do. And it will stand you to good stead! 😄

Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2

Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand] 

Metaphor of Chooks


Chaosophia ( ) posted Thu, 15 March 2012 at 1:29 AM

Ohhh wow, Thanks for the info on this, I did glance at the pdf offered up in sharecg I got curious as to know what a few programs were ya had listed in the signiture of your post, and did search the mathmatik in google. as well as the cloud host site. Appreciate it, and will go grab it now and try this out. Again thanks for this, just hope I grasp it.


RobynsVeil ( ) posted Thu, 15 March 2012 at 1:31 AM

If you run into a snag... let me know. I have a few tutorials out that sort-of take the angst out of it.

Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2

Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand] 

Metaphor of Chooks


Chaosophia ( ) posted Thu, 15 March 2012 at 1:54 AM

Kewl Kewl, will do, and thank you so much for this I can see if I can get the hang of this, it will be a very valuable essence within the crazy stuff i render, ok off to figure this out, again thanks.

 


Chaosophia ( ) posted Thu, 15 March 2012 at 11:17 AM

Ok slight snag I think, or maybe am just doing something wrong. But I found your tutorials on Poserplace and am following the coding parts but using a figure I have instead of the idler pumps, to be precise with the figure 3d ages' day dress.

Ok so I have sucessfully ran a compile on a cylendar obj from the poser primitives, and got the data, however, I ran a compile on the dress and it only Vebrose 1 then done message, no data. Is this going to conflict any in writing the coding in notepad+ at all, or is this something I should just totally avoid?

Ok to give an idea of what I did in Poser i loaded the dress first obj form import obj, then gave it a set of shaders from the pd dark mat shader set ran compile vebrose1 and end, figured it might have been cause I imported instead of loaded, so loaded it via the figures and changed the textures to shader mats for each material zone, compiled and same, vebrose 1 end.

Extra note: I did open up the python shader (Skin Vue Wet And Wounded) and had a look at it, to see the scripting and to get a handle on the way it should look since this is the script I am guessing I would need to alter for my image I am trying to create.

Ok sorry if this is all over the place, but am trying to get it. Thanks again for the help.

 


RobynsVeil ( ) posted Thu, 15 March 2012 at 2:47 PM

Are you working in matmatic? If so, which version?

Did you have a read on how Python code written in a pure text editor is compiled into mt5s?

Which material zones have been defined on your obj?

What is the "pd dark mat shader set"?

Would you be willing to share your code?

Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2

Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand] 

Metaphor of Chooks


Chaosophia ( ) posted Thu, 15 March 2012 at 4:34 PM

I was able to get the data from the cylendar primitive from Poser7 after I ran the matmatica compiler. But for anything else I got vebrose 1 then end, on other models, including v4, and the day Dress by 3dage, I then went into notepad ++ opened the skinvue python script and had a look over of it, I even went as far as trying to change some of the values in coding to resemble the material zones in the object, but ran into a bunch of syntax errors, corrected what I did until I started getting cross from being in the editor for a long stretch of time, back and forth.

To answer your questions...

1.) I did try to utilize the python, but only got it to only read a poser primitive. the version I dled was 1.3.0, the one which will work for Poser 7.

2.) I went through the Poser Place tutorial PDF you posted and tried to reassemble the same style of python script, based upon daytime dress as you made replacing idlers pumps.

3.) The mat zones are: "DressFront","DressBack","SkirtEdge","NeckEdge",DressSleeveR","SleeveEdgeR",DressEdgeL",SleeveEdgeL":

4.) Dark Materials found here: http://www.renderosity.com/mod/bcs/pd-dark-poser-materials/90958

5.) As for sharing the code, I scratched the first one and will go back and redo it after rereading the tutorial you did. That I will post for you on here when I redo it. As for the other code I worked on was a dirivative of skin vues script and can't be shared, but I think I might have goofed that one up as well, with the syntax errors, but yeah am up for sharing the code that I do from the tutorial you posted, no problem.

Not really good at coding about as much experiance was butchering Hello World, and a little SL codes, but other than that still very new to it. But up to learn it though.


RobynsVeil ( ) posted Fri, 16 March 2012 at 12:51 AM · edited Fri, 16 March 2012 at 12:52 AM

Quote - I was able to get the data from the cylinder primitive from Poser7 after I ran the matmatic compiler.

I'll have to admit defeat: your statement has me completely baffled.

Matmatic is a Python script which compiles Python code in small pure-text scripts with an .mm1 extension into Poser materials or shaders. The script contains specifically designed objects and methods for matmatic.

For example, consider this example from the pdf:

def makeSurface():
  surf = Surface(IColor(255,0,0), .8, 0, 0)
  return surf

makeSurface()

"Surface()" is a method designed by matmatic's developer to reference that big node that you see in all surface shaders in Poser. This code creates a red-coloured (diffuse) surface material. No obj is looked at ... this is about materials, not objects.

The generated mt5s can be applied to material zones just like any material file in your material library. Matmatic has nothing to do with objects at all. And your skinVue code sounds like Python not related to matmatic.

Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2

Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand] 

Metaphor of Chooks


Chaosophia ( ) posted Sat, 17 March 2012 at 8:02 AM

Hmmmm interesting, I didn't get any of that on any of the models I loaded except the Poser primitive first gave me a compiled list. As for other objs it didnt even give anything other than vebrose 1 then ended. I might have to reunzip it and replace the files and see if somehow it got messed up on my own goof, but I did as the unzipping stated and placed it in my poser install runtime.

Ok so i have a new arised quetion , If I use the python script to load the shader in poser, would matmatic read it as a texture from the load, or would it pass it up, cause it is a shader run off of python script. I would think that it wouldn't matter, but just want to check, I looked in the advanced tab in the mat room, to see the setup of the shaders and itdoes have a pretty complex node system of maths to get the shader result, but thought that matmatic would have read the nodes in place to get what it needed.

Might be a goof of mine though, definately won't rule that out, but I will redo some things and see if I can at least get it to read more than just a poser primitive. Again thank you for your help, I appreciate it much.


bagginsbill ( ) posted Sat, 17 March 2012 at 8:14 AM · edited Sat, 17 March 2012 at 8:15 AM

I think you two need to start over. Mahakali, you are using words and phrases that imply you've got the completely wrong understanding of what matmatic does.

Clear your mind and read this:

Matmatic is a Python script. Its purpose is to facilitate (make easier) the creation of Poser materials using words and math instead of node diagrams and mouse. It is an authoring tool. It does not do anything you could not already do with Poser alone. It is just automating many tedious things. In other words, if you don't know how to do something in Poser, you won't know how to do it using matmatic either. It is not an enabler. It's just a different way of describing materials.

It does not read, examine, or otherwise pay attention to anything loaded into your Poser scene. It reads text files describing what you want made, and it makes the materials, storing the result into Poser material files or mat poses. It can create mt5 and mc6 files but it cannot read them. It cannot read what you have loaded into the material room.

Each time you run it, it examines your scripts in your file system. Any that appear to be newer than the last time you ran matmatic are processed. Any that have not changed are not processed. This is why you get different results when you run matmatic two times in a row. It has nothing to do with anything you may have loaded into the scene.

 


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)


Plutom ( ) posted Sat, 17 March 2012 at 8:34 AM

I've been closely reading your question:  Have you tried using the Blender node?

Attach one texture node to the Blender input one and another one to Blender input two then use the slider to blend the two?  Depending on your dial setting, you should see both textures...You can also change the color of each input for more effects.

Connect up the Blender node to the Poser Surface's Diffuse_Color channel, perhaps the bump channel too.  The Blender and texture nodes are some of the most powerful nodes in the mat room especially for beginners.  Jan


Chaosophia ( ) posted Thu, 22 March 2012 at 12:45 AM

@ Baggins, interesting program to say the least, just wish i could figure it out a bit better. I hear what you are saying, and yeah I did get quite confused on it I saw where the error was when I reinstalled it, and payed closer attention to the names in the file that were being read. I then opened up the python script to the shader I was trying to have matmatic read saved as a mm1 file, and received a bunch of syntax errors on that upon compiling in matmatic, guessing the encryptions on the texted played that part out and layed that idea to rest. I misunderstood and for that I apologuise to Robynsveil for the confusion in my translations. A question does arise and i do hope there is an answer for,  actually a couple of questions now since reading the post above.

Ok I have opened a few python scripts in notepad + and the coding is legiable so as to say not incrypted, I save as a .mm1 file and have matmatic compile it to alter the values around compaired to second mm1 from python shader, is this the correct working of Matmatic?

I have been getting syntax errors on python scripts that I have opened up and changed to the mm1 file type, non encrypted ones, I admit I am not an all seeing one in the world of python scripting, but I am curious to know why or how it is that the script works to load a texture from the menu in poser, and it has no syntax errors, but compiler picks them up? That really messed my head up when looking at it.

Forgive the ignorance in the matter, as well as the long absence between responces.

As for the blending options, I have only begun to dabble in that art form. I have gone through and looked at some of the setups some of the shaders have put forth in that area as to get a better sense of how it works and what does what in the regards of tweaking the settings. Something I will further have to dissect and play with.

The goal I am trying to acheive is to mix two pre exsisting shaders to create one, now as for the blending question that I now have, is can I load a shader disconnect it from the side tab in advance mat tab, load the second shader and place a blender node to the first shader and will that work to get the possible effect I want?

Again I thank each of you for your responce and time involved for answering this.


Plutom ( ) posted Thu, 22 March 2012 at 10:17 AM

file_479757.jpg

Mahakali, this is what I am thinking of:


hborre ( ) posted Thu, 22 March 2012 at 10:21 AM

The blender approach is feasible if the node structure isn't too convoluted and complex.  The problem with combining the two separate shaders is one will displace the other.  A simple select all and cut on one shader set, load the other, then paste the original will work, but it will only appear for the material zone you are working with.  The only convenient way around this that I can think of is using BB's VSSProp.  It can distribute specific shader arrangements over select material zones with custom arrangements.


Chaosophia ( ) posted Fri, 23 March 2012 at 2:35 AM

Ok will try these and see if I get the results I want from it, Thank you all.


RobynsVeil ( ) posted Mon, 26 March 2012 at 12:27 PM · edited Mon, 26 March 2012 at 12:30 PM

Quote - ...I then opened up the python script to the shader I was trying to have matmatic read saved as a mm1 file, and received a bunch of syntax errors on that upon compiling in matmatic, guessing the encryptions on the texted played that part out and layed that idea to rest.

You don't open or insert or convert existing Python scripts (those with a .py extention) in matmatic, particularly if those scripts are not designed to generate materials. Generally, that won't work. You really need to study the documentation that comes with matmatic (any version). Matmatic scripts use the Python syntax, but the programme is designed to use the methods included in matmatic to make a node set mt5 or mc6, not to use Python scripts in general that are not designed to create materials.

The idea of matmatic is as Bagginsbill clearly defined: "Its purpose is to facilitate (make easier) the creation of Poser materials using words and math instead of node diagrams and mouse. It is an authoring tool." I.e., you write the code yourself using the methods provided in its included matmatic library, and matmatic will to make a material when you compile it.

Have a careful read of the documentation provided. No where does it state you can take existing Python scripts that are designed for other functions (even those for Poser) and by tacking on an mm1 extension generate a material.

Quote - Ok I have opened a few python scripts in notepad +

What was the intent of the original script (the one you took the code from)? Was it written - originally - to be compiled to be matmatic? If not, you are using code that isn't designed to be used in matmatic.

Quote - and the coding is legiable so as to say not incrypted, I save as a .mm1

Saving some random Python script with an .mm1 extension will not automagically make it a valid matmatic sc ript, any more than saving a .doc file with a .txt extention will make it a valid text file.

Quote - ...file and have matmatic compile it to alter the values around compaired to second mm1 from python shader, is this the correct working of Matmatic?

No, it isn't. You need to write your own scripts - after a careful study of the documentation - and compile them. I suggest starting with something simple and work your way up.

Quote - I have been getting syntax errors on python scripts that I have opened up and changed to the mm1 file type

...and you will. Those scripts are not designed to work as material-making scripts. You need to learn to write your own. It's not that hard - if I can do it, anyone can - but you will need to learn Python syntax and matmatic methods. There are no shortcuts, unfortunately. Using other peoples scripts that were made for other purposes won't work. Ever.

Quote - but I am curious to know why or how it is that the script works to load a texture from the menu in poser, and it has no syntax errors, but compiler picks them up? That really messed my head up when looking at it.

That is because you are using a script that was not designed to be compiled in matmatic into a material. You need to study the manual that came with matmatic and learn to write your own, specifically designed matmatic scripts.
Python is not Python is not Python. For instance, running a Blender Python script in Poser will more than likely generate errors. You need to understand the methods specific to the Python for the application you are trying to use it in to use the right methods for the desired results. So, taking a Poser Python script and trying to compile it in Matmatic is going to fail.

Learn to write from scratch. No shortcuts.

Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2

Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand] 

Metaphor of Chooks


bagginsbill ( ) posted Mon, 26 March 2012 at 2:46 PM

I am having a hard time making sense of what was said, but I got the impression that mahakali was trying to take Poser materials (mat-pose files or mt5 files) and rename them as mm1 and try to get matmatic to look at them. It can't do that.


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)


RobynsVeil ( ) posted Mon, 26 March 2012 at 7:00 PM

Quote - I am having a hard time making sense of what was said, but I got the impression that mahakali was trying to take Poser materials (mat-pose files or mt5 files) and rename them as mm1 and try to get matmatic to look at them. It can't do that.

Oh. Right-o. Yeah, that won't work either.

Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2

Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand] 

Metaphor of Chooks


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.