Mon, Oct 7, 9:24 AM CDT

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Oct 06 11:30 am)



Subject: Matmatic 1.1 coming soon - any more enhancement requests?


bagginsbill ( ) posted Thu, 29 April 2010 at 3:56 PM · edited Mon, 07 October 2024 at 9:22 AM

Here is the list of changes since the original.


Matmatic 1.1.0

Added a Version attribute to the matmatic module. It is a string. The current release matmatic.Version = "1.1.0".

Fixed a bug on Mac where the scan paths beginning with Runtime: or :Runtime: didn't work. Absolute paths should no longer be required.

Matmatic now supports multiple runtimes, without having to specify full paths. (P7+ and PPro+, not P6. P6 doesn't have support for matmatic to ask where your registered runtimes are.)

Matmatic can be installed anywhere on your hard drive. Previously it had to be in your main runtime. The script does not even have to be in a runtime at all. However, to make life easier, your matmatic material scripts should be in some runtime.

Matmatic can now keep going compiling all your scripts, even if one has an error. There is a config option to control this. The new default behavior is to keep going.

Matmatic scripts can now assume that "import poser" has already been performed.

Fixed a bug where detection of a script being in a pose folder (and therefore should make a MAT pose file) was case sensitive. You can now spell it Pose, pose, POSE, whatever.

Fixed a bug where Matmatic used to complain if userconfig.txt was missing. It only does this in verbose=2 now, as documented.

Fixed bug with EmptySurface.

Added ListLookup method to generate an efficient sequence of nodes that looks up a value in a list of values.

Changed default value in V3Collection for FacialHair. Was transparent, now is None.

Optimized the Mix method to drop some multiplies that weren't absolutely necessary.

Added readScript method to root nodes so that generated files can read other Poser files when loaded.

Changed default label on PoserSurface root node from MatmaticSurface to PoserSurface.

In Material Collections, changed the way material names are looked up. (For V4 mostly) Any leading digits and underscores on the material name are ignored.

Fixed a bug where EdgeBlend nodes were always considered to be a color. If only shades of gray are used, will be treated as a number.

Fixed a bug in ImageMap - default values of U_Offset and V_Offset were 1 - should be 0.

Added Filtering attribute to ImageMap.

Added new root node types: Light, Atmosphere, and Background. Previously only Surface existed.

Added Loom to package.

Changed the processScript method so 3rd party software can easily invoke matmatic on a script file. Example:

import matmatic.compiler
matmatic.compiler.processScript(r'c:foobartest.mm1.txt')

This will include a check to see if it is up to date already and skip it if so. To force processing even if it is up to date, pass an additional argument that is not false.

Like this: matmatic.compiler.processScript(r'c:foobartest.mm1.txt', 1)

Added methods (PM, PMC, PM2, etc.) to create Parmatic-style parameter nodes. These are inserted in columns before the Poser Surface node.

Added TrueFresnel function to calculate Fresnel reflectance for any IOR, including IOR below 1. Total internal reflection (TIR) is implemented.

Added View function to make it easy to just view the output of a node as the whole material.

Added built-in GC and anti-GC functions for doing gamma corrected materials. A function SetGCMode allows defining different GC strategies; PMAuto, Auto, PM, Fixed, and None. In either Auto mode, shader GC is automatically disabled if the material is running in Poser Pro with render GC enabled.
 


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)


hborre ( ) posted Thu, 29 April 2010 at 4:06 PM
Online Now!

Thanks, BB.  Will definitely look into this.


Gareee ( ) posted Thu, 29 April 2010 at 4:17 PM

Can I get a brain upgrade to 1.1, so I can understand it more? ;)

Good work! ;)

Way too many people take way too many things way too seriously.


RobynsVeil ( ) posted Thu, 29 April 2010 at 4:20 PM · edited Thu, 29 April 2010 at 4:29 PM

Wow. You fixed the only thing I really needed fixing: the ImageMap Filtering Attribute... and what a lot of goodies you've added! How exciting is this! Very, very much looking forward to this release, BB. Will there be some enhancement to manage node arrangement for nodes other than those with Parmatic prefixes  (something like your hackPos script) to go with the PM1, PM2 naming thingie?

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


dphoadley ( ) posted Thu, 29 April 2010 at 4:24 PM

Yes, can you fix the wine shader so it's a bit less dry to the taste, and just when do you plan to install the 'Cold Beer Dispenser' in your Matmatic device?
dph

  STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS


dphoadley ( ) posted Thu, 29 April 2010 at 4:25 PM

Yes, can you fix the wine shader so it's a bit less dry to the taste, and just when do you plan to install the 'Cold Beer Dispenser' in your Matmatic device?
dph

  STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS


bagginsbill ( ) posted Thu, 29 April 2010 at 4:32 PM

Quote - Will there be some enhancement to manage node arrangement for nodes other than those with Parmatic prefixes  (something like your hackPos script) to go with the PM1, PM2 naming thingie?

 
The PM functions are the hackpos script, plus the label. But if you don't pass a label, it just arranges the node without changing its name.

For example, PM2(Blinn()) will simply place the Blinn node in column 2.


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)


bagginsbill ( ) posted Thu, 29 April 2010 at 4:37 PM

I'm going drinking now. Talk amongst yourselves. I'll be back later.


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 Thu, 29 April 2010 at 4:40 PM

Quote - The PM functions are the hackpos script, plus the label. But if you don't pass a label, it just arranges the node without changing its name.

For example, PM2(Blinn()) will simply place the Blinn node in column 2.

Thanks for that, BB... I really had to think really hard and that was about the only thing I could come up with. I'm fully aware (talking to KobaltKween) there there are heaps of aspects of the current version I haven't really used yet, and now all this!
Thank you ever so much for your generosity, BB... when Poser's open, so is NotePad++ and I'm compiling something. This has got to be the coolest tool ever to be developed for Poser. There is Still so much to learn...

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


infinity10 ( ) posted Fri, 30 April 2010 at 12:24 AM

 wow wow wow
cannot imagine any more to ask for

Eternal Hobbyist

 


kobaltkween ( ) posted Fri, 30 April 2010 at 5:50 AM

true Fresnel!  built in Loom!  woot!

wow. i really can't think of anything else i would like.  oh!  what RobynsVeil has been wanting: something to toggle creation of a condensed grid where all the nodes that aren't added to any of the parameter lists are collapsed.  



dphoadley ( ) posted Fri, 30 April 2010 at 6:07 AM

I still ask when is it going to dispense cold beer at night?  Oh, and if it could brew the coffee in the morning, that too would be nice!!! 
dph

  STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS


IsaoShi ( ) posted Fri, 30 April 2010 at 6:31 AM

So what can we possibly do for you, bb, in return for everything you do for us?
Documentation? User guides? Psalms?
Have a think....

"If I were a shadow, I know I wouldn't like to be half of what I should be."
Mr Otsuka, the old black tomcat in Kafka on the Shore (Haruki Murakami)


RobynsVeil ( ) posted Fri, 30 April 2010 at 7:28 AM · edited Fri, 30 April 2010 at 7:31 AM

How about.... script sharing? Let's see what we can all do with this nifty tool!

In another thread BB kind-of gave a primer on IDL and how to make the most of it, and people showed their appreciation by sharing renders.
So, yes... documentation... discussion on materials... perhaps having another good look at this fine document by KobaltKween and discussions ensuing from that.

As a for-instance: KobaltKween and BB both have a strong sense for OOP... I'm struggling mightily with it, but haven't been quite able to undo the procedural apron-strings. For those who want a sophisticated approach, I strongly suggest you have a good look at that tutorial. For those who want a primer, a simpler (procedural) approach might be easier to digest. I'm open to ideas on this... I'm not saying one is better or anything but that both approaches are valid.

ETA: Bill's got an excellent introduction to Matmatic in his fine manual... don't want to forget to mention that. That should actually have been at the top of suggestions.

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, 12 July 2010 at 5:01 PM

Hi. I still have more things to do with matmatic but I what the heck. I uploaded it as is. I want to share scripts that use the new features, so I'm putting it out there.

It is not for Poser 6 or less - only Poser 7 and up.

New documentation is not yet available. As I get around to it, I'll put a notice here.

http://sites.google.com/site/bagginsbill/free-stuff/matmatic


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)


YngPhoenix ( ) posted Tue, 13 July 2010 at 1:41 AM

Quote - I'm going drinking now. Talk amongst yourselves. I'll be back later.

dphoadley, I believe it's called research.

Can't wait to try version 1.1.


Latexluv ( ) posted Tue, 13 July 2010 at 2:22 AM

Downloaded and installed into Poser 8. Thanks so much!

"A lonely climber walks a tightrope to where dreams are born and never die!" - Billy Thorpe, song: Edge of Madness, album: East of Eden's Gate

Weapons of choice:

Poser Pro 2012, SR2, Paintshop Pro 8

 

 


pjz99 ( ) posted Tue, 13 July 2010 at 3:30 AM

Hey congratulations, looks like some great features have been integrated.  I've meant to fool around with Matmatic for some time, probably just as well to learn this new version though with all the fixes and features you've added.  Very generous, thanks!

My Freebies


Sentinelle ( ) posted Tue, 13 July 2010 at 6:30 AM

Thanks so much  BB.  Will dowload and try it out this weekend.  What would we do without you?



RobynsVeil ( ) posted Tue, 13 July 2010 at 6:58 AM

Thanks ever so much, Bill... there isn't a Poser session when Matmatic doesn't play a key role. It fits perfectly into my tinkerer mindset/workflow. I've downloaded: having a look at the zip now. It looks like I just overwrite my current matmatic py and pyc files with this.

This is all very exciting!! Sort of like the day my new (to me) PS CS3 arrived, a few weeks ago... WOW! 😄

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


adroge ( ) posted Tue, 13 July 2010 at 1:38 PM

Thanks!


Michael314 ( ) posted Thu, 15 July 2010 at 3:21 PM

Hi,
thanks a lot! an initial test run worked fine right from the start!

Best regards,
    Michael
 


bagginsbill ( ) posted Thu, 15 July 2010 at 3:48 PM

Cool.

I still have more to add. I am hoping to support the Poser Pro Custom Gamma setting, and I need to add the new options for Gradient_Mode and the other new channels on the Root node introduced in P8 and Pro 2010. I also want to look into generating procedural normal maps. I have a planned use for this - need it to completely simulate suede.


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 Thu, 15 July 2010 at 5:12 PM

Works a treat for me too, BB... and the PM thing works well. How hard would it be to add a parameter to support inputsCollapsed or showPreview? I know you would have to do node-size maths based on that... if it's too much of a PITA, never mind.
So much to learn about this one, particularly how to invoke the new GC detecting node set.

...but no rush... I can wait for the documentation.

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 Thu, 15 July 2010 at 6:06 PM

The collapsed thing is pretty easy - you want everything that isn't the root node or a PM node to be collapsed, right? The spacing is already there. I just have to add a bulk-collapse option to do it on all the right nodes. That's pretty easy.

What sort of operation did you want on showPreview? Show them all?

The auto GC stuff is easy.

The default is that gamma is a parameter and it is auto disabling. I can't imagine any other value you'd want, other than no GC.

To disable shader GC, at the top of your script, use:

SetGCMode(None)

But like I said, I can't think of a reason not to publish shaders that work right for all versions of Poser, so say nothing about GCMode and leave it at the default. However, for testing, especially to see what you got for nodes, the GC stuff can make spaghetti out of something that is otherwise simple. So disabling it for that purpose is OK.

Now - you need to use the function AGC to do anti-gamma correction, i.e. to convert an sRGB color to a linear value.

Suppose you have a color or a node, x, and you want to linearize it. Use AGC(x). The AGC function does nothing if shader GC is disabled. In that case it will just return x. Otherwise it wraps whatever you passed in with the right nodes to do the job according to the GCMode.

Your final gamma correction is done with the GC function.

Now, what should be wrapped in AGC? Anything that is incoming material to the shader. That includes:

  • Color parameters that you make with PMC nodes
  • Colors that you use explicitly in some expression.
  • Color image maps that you know are not HDR.
  • Reflect and Refract nodes.

Reflect and Refract nodes may seem surprising. But think about the whole system. Suppose every shader in the system is a GC shader. Then when you call Reflect, you're really asking a shader somewhere else in the scene to tell you its color. But that shader doesn't know it is being called for a reflection. All it knows is to produce a gamma-corrected color to put in the render. Well, you need to anti-gamma correct that before you use it.

So here's an example for a nice glassy material.

First set up all the parameters

Initial value of the color

clr = IColor(180, 150, 120)

In column 1, make a linear color parameter for tint

clrTint = AGC(PMC(clr, "Color Tint"))

In column 1, make a parameter for diffuse value

dv = PM(.8, "Diffuse Value")

In column 2, make an image for a color map

clrMap = PM2(ImageMap().labelled("Color Map"))

In column 1, make a parameter for the index of refraction

ior = PM(1.4, "IOR")

In column 1, make a parameter to control the strength of reflections

rv = PM(1, "Reflection Value")

In column 2, add a parameter to control the bump strength

bumpValue = PM2(.02, "Bump Value")

In column 2, add a bump map

bumpMap = PM2(ImageMap().labelled("Bump Map"))

Now build the shader

Calculate the reflectivity of the surface - a bunch of nodes get built here

fresnel = rv * TrueFresnel(ior)

Grab the reflection

refl = fresnel * AGC(Reflect())

Set up the diffuse node, with CoE

diff = Diffuse(clrMap * clrTint, dv * (1 - fresnel))

Put the two effects together

output = diff + refl

Build the surface with gamma correction

s = View(GC(output))

Add the bump map here

s.Bump = bumpValue * bumpMap

 


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)


bagginsbill ( ) posted Thu, 15 July 2010 at 6:09 PM

Note that the View function is trivial - it's just handy.

All it does is this:

def View(x): return EmptySurface(Alternate_Diffuse = x)


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 Thu, 29 July 2010 at 6:48 AM

Finally got a chance to give Matmatic 1.1 a decent workout... well, my version of a decent workout. I loved Matmatic before, I adore it now. Seriously, this is a most worthy app, Bill, and I haven't even scratched the surface of what it's capable of. I feel a bit like those PC neophytes at work who use Excel to generate prose documents: I'm converting my scripts to MM 1.1 but they are still quite pedestrian, really. And probably using things not-quite-rightly... I do love how it makes my shoddy shaders look ever so spiffy, though.

I vote this to be the Poser Tool Extraordinaire of the Year.

Quote - "What sort of operation did you want on showPreview? Show them all?"

When you say: "show them all" do you mean for all nodes or for all texture_map nodes? When I test/play/muck-around-and-generally-get-more-confused with nodes, I do use the showPreview window... but I generally collapse all except those nodes that I want the users to mess with. So, it would be just for those nodes... mind you, I'm wondering how hard it would be to add a third parameter to indicate how I want the node to appear:
x = PM(Add(1), "Adds 1", 0) # All collapsed
x = PM(Add(1), "Adds 1", 1) # Inputs showing, showPreview collapsed
x = PM(Add(1), "Adds 1", 2) # ShowPreview showing, Inputs collapsed
x = PM(Add(1), "Adds 1", 3) # All showing

Here I go telling you how to design your stuff... WRONG. I'll let you decide if you want to give users that sort of control and how it would make more sense to be implemented: my software solution imagination is fairly infantile based on my somewhat (read: extremely)  limited development experience.

And of course, my gratitude for your generosity remains limitless and fervent.

I just said "see-y'uz- later" to my workmates in recovery this arvie: we're going on holidays to the States to see my folks, but I'll be bringing my netbook and having a bit more of a play in Matmatic on it when my mum drives me batty... she and I generally reach critical mass after about 6.475 hours together... roughly. :biggrin:

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.