Wed, Sep 18, 11:08 AM CDT

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Sep 18 7:39 am)



Subject: Building VSS rules in Matmatic?


FyreSpiryt ( ) posted Mon, 02 August 2010 at 9:06 PM · edited Thu, 18 July 2024 at 1:08 PM

Is it possible to build the VSS "shader rules" and "apply rules" psuedo-materials in Matmatic?  If so, how would one go about it?  I'm working with a very old model that has about 70 shockingly unique material names, and gosh it'd be easier if I could code those instead than build them by hand.


bagginsbill ( ) posted Mon, 02 August 2010 at 9:52 PM

It would be possible, but tedious. Much better is to use VSS!

Look in the vss folder. There is a script called "vssGenericFigureShaderRules.py". Make a copy of that.

Then edit it to create the rules you want.

The rules are in the "setup" list, which is a list of lists of lists.

But it's really simple.

Let's take one of the items apart:

[t+'Cornea', ['cornea', 'eyetrans', 'eyesurface', 'tear']],

t is already set to "Template " above, so that means we're defining which materials get Template Cornea.

Then the innermost list defines the rules to match for that template. In this case, there will be

Rule cornea
Rule eyetrans
Rule eyesurface
Rule tear

All of which will be connected to Copy Template Cornea.

Once you have the script as you like it, go into the material room, pick a prop to use as a control prop, and run the script. The Shader Rules material will be created if it doesn't exist, and then the rules will be set up.

I don't have one for the Apply Rules, but if you're handy with Python, you should be able to make a similar one. Instead of ShaderRulesName, you use ApplyRulesName.

And instead of a double loop, you just need a single loop over the rules. A simple list of rule strings will suffice.


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)


FyreSpiryt ( ) posted Tue, 03 August 2010 at 6:18 AM

Great!  As you no doubt guessed,  I didn't realize that was in there.  That'll work spiffy.  I'll see what I can set up for the Apply Rules, but even if I can't get it, that's not nearly as many as the shader rules.

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.