Forum Coordinators: RedPhantom
Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 18 10:25 pm)
And this:
Matmatic poserHome = C:Program FilesSmith MicroPoser Pro
verbose 1
Warning: config scan dir not found: Runtime:Libraries:pose:MatmaticDemos
Warning: config scan dir not found: Runtime:Libraries:materials:MatmaticDemos
config file E:Poser StuffCurious LabsPoser 5RuntimePythonmatmaticuserconfig.txt not found - skipping
------ MATMATIC COMPILER DONE -----
All the Matmatic materials in the Materials Room are empty. Where can I find the loom Mats to apply to textures?
dph
STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS
Quote - What does this error message mean when I try to run Matmatic:
Traceback (most recent call last):
File "E:Poser StuffCurious LabsPoser 5RuntimePythonmatmaticcompile.py", line 1, in ?
import matmatic.compiler
ImportError: No module named matmatic.compiler
Some versions of Poser (particularly Mac versions) have a Python bug. I posted a workaround.
If you got matmatic from here: http://sites.google.com/site/bagginsbill/free-stuff/matmatic
It says right on the matmatic page:
ATTENTION MAC USERS:
If you are getting this message: ImportError: No module named matmatic.compiler
**I have attached below a new version of compile.py that should fix this problem. After you install matmatic, download the compile.py file below, and replace the one that was first installed with this one. The folder it belongs in is :Runtime:Python:matmatic. Make sure you see the original there - copying this file to some other place will do you no good.
**
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)
Quote - And this:
Matmatic poserHome = C:Program FilesSmith MicroPoser Pro
verbose 1
Warning: config scan dir not found: Runtime:Libraries:pose:MatmaticDemos
Warning: config scan dir not found: Runtime:Libraries:materials:MatmaticDemos
config file E:Poser StuffCurious LabsPoser 5RuntimePythonmatmaticuserconfig.txt not found - skipping
------ MATMATIC COMPILER DONE -----All the Matmatic materials in the Materials Room are empty. Where can I find the loom Mats to apply to textures?
dph
First thing to understand is that matmatic reads scripts from specified folders. I never released any demos in the Pose folder, so the fact it can't find any is not important. However, I did release demos in the materials folder, and matmatic is saying it can't find that folder.
Also, you're supposed to create a userconfig.txt file to tell matmatic where you keep additional matmatic scripts. You did not do that.
I have to ask - did you find the matmatic/docs folder and read what is inside? Installation and configuration is easy, unless you did not read the instructions - then it is impossible. grin
Second thing - matmatic beta does not have anything about the loom in it. You have to download the Loom and either write your own or download Loom scripts, install them, and tell matmatic where they are if you put them in a new place you haven't already told it about.
Third is when matmatic makes material files, you need to get poser to refresh its display of the folders in which they were created. If you have the library showing that folder, just flip away and back if using older than Poser 8. If using Poser 8, just click the refresh icon for the folder or one of its parent folders.
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)
I'm confused, what exactly do I need to do next? I already downloaded all those little thingies from the Weave and Tartan thread, including the messages.
dph
STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS
What do I need to do with this file to make it work:
verbose 1
scan Runtime:Libraries:pose:MatmaticDemos*
scan Runtime:Libraries:materials:MatmaticDemos*
include userconfig.txt
STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS
What do I need to do with this file to make it work:
verbose 1
scan Runtime:Libraries:pose:MatmaticDemos*
scan Runtime:Libraries:materials:MatmaticDemos*
include userconfig.txt
STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS
Well, earlier I saw that matmatic was unable to find MatmaticDemos.
So - are the MamaticDemos in your main runtime, or an external runtime? The comments in the config.txt file tell you that the "scan" commands indicate where to look for scripts, and the default ones only specify the default locations.
If your scripts are elsewhere, then you need to tell matmatic. First you should disable the two scan lines in config.txt by putting a # at the beginning of both.
Then create a new file in the same folder called userconfig.txt.
In that file, put the full path to places where you want matmatic to look for scripts.
Here is what is in mine:
scan C:Documents and SettingstczotterDesktopTed3dBagginsRuntimelibrariesMaterials*
scan C:Documents and SettingstczotterDesktopTedvssRuntimelibrariesMaterials*
scan C:Documents and SettingstczotterDesktopTed3dRuntimesAntoniaRuntimeLibrariesMaterials*
scan C:Documents and SettingstczotterDesktopTed3dRuntimesLatchwormRuntimeLibrariesMaterials*
scan C:Documents and SettingstczotterDesktopTed3dV4RuntimeLibrariesMaterials*
I'm using Windows-style paths because I'm on windows. Mac users should use Mac style paths, which I don't really know that well, but suspect you use colons or slashes.
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)
Please notice the comment near the end of config.txt:
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)
It appears you may not have seen the matmatic documentation.
It is in matmatic/docs.
Here is some of it:
**
Matmatic Installation**
If you are reading this, you must have already unzipped the Matmatic distribution file.
However, just to be sure, you must copy the contents of the zip file into your Poser Runtime folder. You should be able to find the following:
The Python files are all pre-compiled. I have not provided the source on purpose, in order to avoid problems and to help retain my intellectual property on how this is all done.
To run the Matmatic compiler, you'll want to add a button to your Python Scripts window. I suggest you permanently add a button to invoke Matmatic. However, if you like, you can temporarily add the button each time you start Poser.
To temporarily add it, bring up the Python Scripts window and click one of the unassigned buttons - these are labelled "..." indicating they are available for your use. A dialog pops up asking you to select a Python Script. Choose the file:
Poser XRuntimePythonmatmaticcompile.py
To permanently add it, open the following file in a text editor:
Poser XRuntimePythonposerScriptsmainButtons.py
Find an unused button - it will look something like this:
poser.DefineScriptButton(8, "", "...")
Change it to look like this:
poser.DefineScriptButton(8, ":Runtime:Python:matmatic:compile.py", "Matmatic!")
Save the file. Now every time you start Poser, your Matmatic button will be ready and waiting.
Matmatic ConfigurationIn the Matmatic Python folder is a configuration file: config.txt. The Matmatic compiler reads this file every time you run it. The file contains commands allowing you to configure the compiler.
You can change this file to alter the default behavior of Matmatic. However, be aware that if you reinstall Matmatic, it will overwrite the configuration file. So if you've changed it, back it up to a separate copy before you re-install Matmatic.
The default configuration file tries to include another file called userconfig.txt. This file does not come with Matmatic. It is intended that you place additional, personal, settings in that file. This way, a re-installation will not destroy your personal configuration settings.
In the configuration file, each command is on a line by itself.
Blank lines are ignored. Any line beginning with the character # is a comment and is also ignored.
The "verbose" command turns on logging of informational messages to let you know what's going on. If you don't want them, comment it out or say "verbose 0". To get lots of extra information use "verbose 2".
The scan command tells Matmatic where to look for Matmatic script files. Specify a folder name with the scan command. Matmatic will scan that folder for files it recognizes. The files it recognizes as Matmatic scripts end with either ".mm1" or ".mm1.txt". The contents of the script will determine what type of file is produced.
Matmatic supports surfaces, which define a single material, and collections, which define multiple materials for a figure. The default location for the resulting file is the same place as the script. The default file name will be formed by replacing the script suffix with the appropriate suffix for the type of file produced. For example, a surface will become a ".mt5" material file. A collection will become either a ".pz2" mat pose (for Poser 5 and 6) or a ".mc6" material collection file (Poser 6 only).
Matmatic chooses which file type to create based on the location of the script in your runtime folder. If the script is under the Pose folder, then it makes a mat pose file. Otherwise, it makes a material collection. Note: You do NOT have to have Poser 6 to make a .mc6 file. However, you won't be able to use the file unless you are using Poser 6 (or higher, I suppose).
When specifying these locations, you can use either Poser style (with colons) or the style supported by your operating system. Poser style paths can begin with "Runtime:" or ":Runtime:". Your default runtime directory will replace that part of the path name.
The scan command encompasses only the specified folder or that folder and all subfolders as well. To scan subfolders, put a * at the end of the folder name. If there is no * at the end of the name, then only that folder will be scanned.
The include command tells Matmatic to continue reading commands from the specified file. If the file is not found, it will be ignored. If verbose is at level 2, you'll get a warning. If the you use a relative path in the file name, or no path at all, the file is assumed to be in the Matmatic Python folder.
Running MatmaticIf you haven't already done so, follow the installation instructions on how to add a Matmatic button to Poser. Once you have your button, just push it.
You can also just manually run Matmatic from the Poser File menu. This is the script you need to run:
Poser XRuntimePythonmatmaticcompile.py
The default configuration file sets the compiler's verbosity level to 1. This will print minimal information about what's going on. Assuming you don't change it, the first time you run Matmatic, it will compile all the demo scripts that come with it. You'll see a bunch of messages like the following:
----- MATMATIC -----
verbose 1
Processing script C:Program FilesCurious LabsPoser 6RuntimeLibrariesmaterialsMatmaticDemoscolumn.mm1.txt -> material
-> node count 88
Processing script C:Program FilesCurious LabsPoser 6RuntimeLibrariesmaterialsMatmaticDemostest.mm1.txt -> material
-> node count 26
Processing script C:Program FilesCurious LabsPoser 6RuntimeLibrariesmaterialsMatmaticDemoswood.mm1.txt -> material
-> node count 104
-> node count 37
-> node count 10
config file C:Program FilesCurious LabsPoser 6RuntimePythonmatmaticuserconfig.txt not found - skipping
------ MATMATIC DONE -----
If you set verbose to 0, you'll get none of that. Only error messages will be printed. If there are no problems, Matmatic won't print anything. You'll just have to guess when it is finished. Unless closing the Python log window really annoys you, I suggest you not set verbose to 0.
If all goes well, all the scripts will have produced a bunch of Poser files. You can now navigate using the Poser Library window to get to these files and load them.
If you now run matmatic again, it won't say anything about the scripts, because they've already been compiled. For each script file, Matmatic produces another file in the same directory, adding the suffix ".timestamp" to the script file name. It does this after successfully compiling the script. When you run it again, it sees that the timestamp file is there. It then compares the modification date of the script to that of the corresponding timestamp file. If the script is newer, it compiles it again and updates the timestamp. If it's older, it is assumed to be up-to-date and Matmatic skips to the next one. To force re-compilation, either save the script file again, or delete the timestamp file.
When you look at these files in the Library window, they don't have preview icons, and you'll see the "shrugging guy" picture. Don't worry about that. Matmatic can't produce previews for you, but the files work anyway. If you want to go to the trouble, you can load a material into the material room and then save it back from inside Poser. By doing this, Poser will create a proper preview icon for the material.
Another option is to actually render something with the material, then save the render as a .PNG file, using the same folder and file name as the material. Standard icons seem to be 91 by 91 pixels. You can set up an iconic render using the Render/Render Dimensions menu item. Choose the Render to exact resolution option and put in a width and height of 91 pixels.
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)
I read it, but it's Chinese. I opened the config.txt in my Notepad, and copy pasted the following two file paths:
scan Runtime:libraries:Pose:MatmaticDemos*
scan Runtime:libraries:materials:MatmaticDemos*
So that they now comply with my runtime set up. As I previously didn't have a Matmatic Demos folder in my Pose library, I copy/pasted the one from my materials library so now I have two copies of the same folder in two different places.
I saved the cofig.txt as: userconfig.txt
Now when I press Matmatic on my Python pallet, I get this message:
----- MATMATIC COMPILER -----
Traceback (most recent call last):
File "E:Poser StuffCurious LabsPoser 5RuntimePythonmatmaticcompile.py", line 14, in ?
matmatic.compiler.main()
File "c:program filescurious labsposer 6runtimepythonmatmaticcompiler.py", line 109, in main
File "c:program filescurious labsposer 6runtimepythonmatmaticcompiler.py", line 125, in readConfig
IOError: [Errno 24] Too many open files: 'E:Poser StuffCurious LabsPoser 5RuntimePythonmatmaticconfig.txt'
What do I do now?
dph
STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS
You should not have copied config to userconfig. Since config includes userconfig, you have made userconfig include userconfig. Now it is infinitely recursing.
All you need to do is enter lines with the word "scan" and the folder to look in. That's all that should be in userconfig.txt.
You're making this way too complicated.
There's nothing to it. Just put
scan somefoldernamehere*
for one folder and see if that works.
The star at the end means look in there and all subfolders automatically, so you don't have to list each subfolder.
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)
There was no point in putting a copy of MatmaticDemos in your pose folder.
My point was that you could simply comment out the scan command for the pose folder and it won't look there.
At the time you posted above, matmatic wasn't able to find either folder. That's why I said to comment out both of them. But if you have MatmaticDemos somwhere, you should have a scan command for it, using the true path. You can only use the shorthand (partial path starting with Runtime) if the folder you're talking about is in your main runtime.
Any folders outside the main runtime must be fully spelled out.
The easiest thing to do is pick some place for all your scripts and put ONE scan command line in userconfig.txt with the name of that folder and an asterisk at the end.
From then on, create subfolders in that folder for whatever project you want, and they will all be found.
Matmatic makes material files when a folder is under materials. It makes mat-pose files when a folder is under Pose. But!! Individual materials don't work as mat-pose files. They are only for material collections. And as of Poser 6 and up, material collections are supported directly and mat-pose files are not needed.
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)
This is now my userconfig.txt:
verbose 1
scan Runtime:libraries:materials:MatmaticDemos*
This is the response that Matmatic gave me:
----- MATMATIC COMPILER -----
verbose 1
Warning: config scan dir not found: Runtime:libraries:Pose:MatmaticDemos
Warning: config scan dir not found: Runtime:libraries:materials:MatmaticDemos
verbose 1
Warning: config scan dir not found: Runtime:libraries:materials:MatmaticDemos
------ MATMATIC COMPILER DONE -----
I've deleted the second MatmaticDemos from my Pose Library. Again, what am I doing wrong?
dph
STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS
Tell me the full path to the folder that contains .mm1.txt files.
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)
The following files:
9470.mm1.txt
check1.mm1.txt
GlennPlaid.mm1.txt
plaid.mm1.txt
Are placed here:
E:Poser StuffCurious LabsPoser 5RuntimelibrariesmaterialsMatmaticDemosLoom
My Poser 5 Runtime is my MAIN runtime, even though I operate PoserPro.exe from here: C:Program FilesSmith MicroPoser Pro
Matmatic is located here: E:Poser StuffCurious LabsPoser 5RuntimePythonmatmatic
STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS
Then there are these others:
E:Poser StuffCurious LabsPoser 5RuntimelibrariesmaterialsMatmaticDemosColumnColumn.mm1.txt
E:Poser StuffCurious LabsPoser 5RuntimelibrariesmaterialsMatmaticDemosStonesAgate.mm1.txt
E:Poser StuffCurious LabsPoser 5RuntimelibrariesmaterialsMatmaticDemosStonesMarble.mm1.txt
E:Poser StuffCurious LabsPoser 5RuntimelibrariesmaterialsMatmaticDemosWindowblinds.mm1.txt
E:Poser StuffCurious LabsPoser 5RuntimelibrariesmaterialsMatmaticDemosWindowscreen.mm1.txt
E:Poser StuffCurious LabsPoser 5RuntimelibrariesmaterialsMatmaticDemosWoodWood.mm1.txt
None of these seem to register with Matmatic
dph
STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS
Hmm. You're saying that you are running matmatic from Poser Pro, but your main runtime is not in the application folder. That wasn't possible when matmatic was written, so it doesn't check for that case. It believes your main runtime is exactly where PoserPro is. So that's why you can't use the short versions of the paths.
So ... this is easy.
In config.txt, put a # in the beginning of the two scan commands, so they will be skipped.
#scan Runtime:Libraries:pose:MatmaticDemos*
#scan Runtime:Libraries:materials:MatmaticDemos*
We do this because there's no point in trying to use the short versions - matmatic will look in PoserPro folder, not the Poser 5 folder, so it will never work.
Now all your scripts are in subfolders of:
E:Poser StuffCurious LabsPoser 5RuntimelibrariesmaterialsMatmaticDemos
So all you need in userconfig.txt is:
scan E:Poser StuffCurious LabsPoser 5RuntimelibrariesmaterialsMatmaticDemos*
See what I mean? You have to use the full path. And the asterisk at the end will make it automatically look under that folder to find Stones, Window, Wood, Loom, etc. You don't need to list those separately since they will be automatically found inside MatmaticDemos.
In the future, as you create more matmatic projects, make new subfolders for them under MatmaticDemos and they will be found automatically.
I suggest that for your own versions, where you're possibly going to break things, you do not put them under MatmaticDemos. Keep those clean.
Make a new folder DPHMatmatic or something like that in any runtime you want, under materials, and add another scan command for the full path of whatever folder you make, plus the asterisk. Then you make subfolders under that as you like and will never have to configure matmatic again.
So, to summarize:
In config.txt, change the scan lines to:
#scan Runtime:Libraries:pose:MatmaticDemos*
#scan Runtime:Libraries:materials:MatmaticDemos*
In userconfig.txt, you need only one line:
scan E:Poser StuffCurious LabsPoser 5RuntimelibrariesmaterialsMatmaticDemos*
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)
You may notice that in my userconfig.txt, I don't bother with naming a particular folder. I have it set to scan all material folders in a bunch of runtimes.
scan C:Documents and SettingstczotterDesktopTed3dBagginsRuntimelibrariesMaterials*
scan C:Documents and SettingstczotterDesktopTedvssRuntimelibrariesMaterials*
scan C:Documents and SettingstczotterDesktopTed3dRuntimesAntoniaRuntimeLibrariesMaterials*
scan C:Documents and SettingstczotterDesktopTed3dRuntimesLatchwormRuntimeLibrariesMaterials*
scan C:Documents and SettingstczotterDesktopTed3dV4RuntimeLibrariesMaterials*
This is a little bit wasteful but my runtimes are not that big so I like the convenience of never having to configure matmatic. Any time I put a script anywhere in materials of my Baggins, vss, Antonia, Latchworm, or V4 runtimes, they are found automatically.
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)
STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS
Congratulations!!! I'm really pleased that you stuck with it.
I don't know what the script contains, but there's probably a line that says:
loom.Generate(200)
or something like that. The number is how many threads there are in the UV space. You want to increase that, run matmatic again to make a new version of the material, and then load it.
The correct value will depend on how the the item you intend to use it on is UV mapped. I hope that dress has two material zones because the scale on the skirt is twice that of the top.
So, for the top you probably want something like 2000. For the skirt, 4000 looks about right.
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)
from matmatic.extras import *
class Loom(object):
NumThreads = None
PatternFile = None
PatternThreads = None
PatternNx = None
PatternNy = None
WarpColor = None
WarpColorThreads = None
WeftColor = None
WeftColorThreads = None
Distortion = 1
DistortionFrequency = 1.0
Speckle = .4
FiberLayers = 3
FiberColor = WHITE
FiberColorBlend = .4
FiberBlend = .8
FiberSize = 1
Occlusion = .5
Specular_Value = .1
Highlight_Size = .7
BumpDepth = 0
DisplacementDepth = 0
def init(self, PatternFile=None, PatternThreads=None):
self.PatternFile = PatternFile
self.PatternThreads = PatternThreads
def Generate(self, n = None):
pN = self.PatternThreads
pNx = self.PatternNx
if not pNx:
pNx = pN
pNy = self.PatternNy
if not pNy:
pNy = pNx
if n is None:
n = self.NumThreads
if n is None:
n = pNx
if isinstance(n, int):
n = float(n)
self.n = n
nU = n * U
nV = n * V
if self.Distortion:
f = 10.0 / self.DistortionFrequency / n
i = self.Distortion
nU = (i * FractalSum(f * U, f * V, f * U, 2, 0, .5, .93) + (n - i * .5)) * U
nV = (i * FractalSum(f * U, f * V, f * V, 2, 0, .5, .93) + (n - i * .5)) * V
self.nU = nU
self.nV = nV
delta = .5
pf = self.PatternFile
weave = DecodeWeave(pf, nU, nV, pNx, pNy)
weaveL = DecodeWeave(pf, nU - delta, nV, pNx, pNy)
weaveR = DecodeWeave(pf, nU + delta, nV, pNx, pNy)
weaveU = DecodeWeave(pf, nU, nV + delta, pNx, pNy)
weaveD = DecodeWeave(pf, nU, nV - delta, pNx, pNy)
warpRound = Humps(nU)
weftRound = Humps(nV)
round = Blend(1-self.Occlusion, 1, IF(weave, weftRound, warpRound))
warpDive = IF((1-weave) * Max(weaveU, weaveD), weftRound, 1)
weftDive = IF(weave * (1 - Min(weaveR, weaveL)), warpRound, 1)
dive = Blend(1-self.Occlusion, 1, Bias(IF(weave, weftDive, warpDive), .1))
noiseSeed = .01Floor(IF(weave, nV, nU))
sn = 5
swsf = .4 / n
spiralNoise = 20.0 / sn * FractalSum(swsf * U, swsf * V, noiseSeed, 2, 0, .5, .93)
warpSpiral = Humps(sn * n * (U+.7V) + spiralNoise)
weftSpiral = Humps(sn * n * (1+U-.7*V) + spiralNoise)
spiral = Blend(1-self.Occlusion, 1, IF(weave, weftSpiral, warpSpiral))
bump = dive * round
self.Bump = bump
warpColor = self.WarpColor
warpct = self.WarpColorThreads
if isinstance(warpColor, str):
if warpct is None:
warpct = pNx
s = warpct / n
warpColor = ImageMap(warpColor, U_Scale = s, V_Scale = s)
elif isinstance(warpColor, list) and not isColor(warpColor):
warpColor = ExpandColorList(warpColor)
if warpct is None:
warpct = 1
nc = float(len(warpColor))
warpColor = Interpolate(1.0 / (nc-1) * Floor(1.0/warpct * nU % nc), warpColor)
elif warpColor is None:
warpColor = GRAY6
weftColor = self.WeftColor
weftct = self.WeftColorThreads
if weftColor is None:
weftColor = self.WarpColor
if isinstance(weftColor, str):
if weftct is None:
weftct = warpct
s = weftct / n
weftColor = ImageMap(weftColor, U_Scale = s, V_Scale = s, Texture_Coords = 2)
elif isinstance(weftColor, list) and not isColor(weftColor):
weftColor = ExpandColorList(weftColor)
if weftct is None:
weftct = 1
nc = float(len(weftColor))
weftColor = Interpolate(1.0 / (nc-1) * Floor(1.0/weftct * nV % nc), weftColor)
elif weftColor is None:
weftColor = WHITE
color = Blend(warpColor, weftColor, weave)
if self.Speckle:
f = .03/n
color = color * Blend(1.0-self.Speckle, 1, FractalSum(f * U, f * V, noiseSeed, 4, 0, .6, .93))
self.Color = color
diff = color * bump
if self.FiberLayers:
fibers = FiberLayers(n/self.FiberSize, self.FiberLayers)
diff = Blend(diff, Blend(self.FiberColor, diff, self.FiberColorBlend), self.FiberBlend * fibers)
self.Bump = Max(self.Bump, fibers)
diff = Blend(diff * spiral, diff, Bias(fibers, .2))
bump -= Blend(.2 * spiral, 0, Bias(fibers, .2))
else:
fibers = 0
diff = diff * spiral
bump -= .2 * spiral
self.Fibers = fibers
self.Diffuse_Color = diff
self.Surface = Surface(diff, 1, 1, self.Specular_Value, self.Highlight_Size)
if self.BumpDepth:
self.Surface.Bump = self.BumpDepth * bump
if self.DisplacementDepth:
self.Surface.Displacement = self.DisplacementDepth * bump
return self.Surface
def ExpandColorList(lst):
outlist = []
for x in lst:
if not isColor(x) and (isinstance(x, tuple) or isinstance(x, list)):
n, clr = x
outlist += n * [clr]
else:
outlist.append(x)
return outlist
def Fibers(n):
s = .2 / n
seed = Add(n % .01234 * 100000)
p = FractalSum(s * U, s * V, s * seed, 2, 0, .5, .93)
p = Gain(1 - 10 * Abs(p - .5), .8)
s = s * .8
mask = FractalSum(s * U, s * V, s * seed, 2, 0, .5, 1)
return p * mask
def FiberLayers(n, octaves=6, frequency_gap = .1, layerStrength = .98):
v = None
m = 1.0
for i in xrange(octaves):
nv = m * Bias(Fibers(n), .4)
if v is None:
v = nv
else:
v = Max(v, nv)
n *= (1 + frequency_gap)
m *= layerStrength
return v
def IF(test, a, b): return Blend(b, a, test)
def Humps(inp, offset = 0):
v = Sqrt(Abs(Sin(pi * (inp + offset))))
return v
def DecodeWeave(weavefile, x, y, pNx, pNy):
wou = U - 1.0 / pNx * (Floor(x) + .5)
wov = V - 1.0 / pNy * (Floor(y) + .5)
weave = .5 <= ImageMap(weavefile, 0, 1, 1, wou, wov).asNumber()
return weave
STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS
Why did you just publish a copy of the Loom script? It's not in the public domain, you know.
That's not the script I was telling you to edit. That is the implementation of the Loom, not your use of the loom.
There is a .mm1.txt script you're using to generate the material.
You're not giving me data so I can't tell you specifics.
Look in your MatmaticDemos folder. You downloaded some matmatic scripts and you ran them with matmatic. The Loom.py file you pasted is not a matmatic script - it is Python.
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)
"Why did you just publish a copy of the Loom script? It's not in the public domain, you know."
Sorry, and no, I didn't know!
dph
STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS
from matmatic.loom import Loom
loom = Loom(":Runtime:python:matmatic:weaves:check1.jpg", 4)
STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS
Where's the last line, the one that actually says loom.Generate with a number?
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)
How to use Matmatic:
It's super easy to use. Unforutnately I was over thinking stuff and had trouble, hehe
1. Unzip matmatic to your Poser runtime. Not to an external one, right into your Poser runtime. It's in proper runtime structure, so do not move any files around. The script sits directly in the "Python" folder and not in the "scripts" subfolder. Do not move it.
2. Matmatic comes with some scripts. There are others too. See the second page of the"Shaders & Nodes" thread for a list of relevant RDNA threads for more scripts.
After you have unzipped matmatic to your Poser runtime, open Poser.
File/Run Python Script
Browse to the Python/Matmatic folder and select the script.
Run it. That's all. You won't see anything visible except a message in the window saying something about compilation complete. That means that Matmatic read the scripts and generated material files that you access in the material room just like any other materials. It's not like Wardrobe Wizard where you have to run the script each time.
After you have run Matmatic and it has generated shaders based on the scripts it read, you can go to the material and use the shaders/materials just like you would any other material in your materials library.
If you want to add a button to your python scripts window in Poser, follow the instructions in this thread. Dimension3D explained to me how to add an extra button, and to even make a subscript button where you can have as many scripts in there as you want.
NOTE: Matmatic generates errors if you have your files are compressed. If you compress your files, uncompress them before you run Matmatic.
If you want to add more scripts, go to the links I posted in the shaders&Nodes thread, and locate the script attachments in the RDNA threads. Open the text file because you are going to save it.
Decide on a name IE: ReptileScales and browse to your Poser/Library/Materials/Matmatic Demo folder. Create a new folder in there called "ReptileScales" Then save the text file to that folder and call it "ReptileScales.mm1.txt"
**Each mm1.txt script file has to have it's own separate folder.
**Then go into Poser and run the Matmatic Python Script to generate the shaders/materials from that script you have just save.
That's all there is too it. Unfortunately matmatic is a script only, and doesn't generate .png files. So the materials are shown in the material room library as the shrugging man icon. If you want thumbnails, open a primative, apply the material and render a 91 x 91 thumbnail and save it as a .png file with the same name of the shrugging man icon you are replacing.
"It is good to see ourselves as
others see us. Try as we may, we are never
able to know ourselves fully as we
are, especially the evil side of us.
This we can do only if we are not
angry with our critics but will take in good
heart whatever they might have to
say." - Ghandi
One little correction ...
Each mm1.txt file does not have to have its own separate folder. I have folders with 20 scripts in them, each generating several materials. This is not a problem.
Be aware that the materials generated will always have the name of the script in them, and possibly a suffix, depending on what the script does. If you have a script that just generates one material and does not use the multiple-outputs feature of matmatic, then the resulting material will have the same name as the script. For example, foo.mm1.txt produces foo.mt5.
So if you have two scripts in the same folder, foo.mm1.txt and bar.mm1.txt, they will generate foo.mt5 and bar.mt5.
If a single matmatic script is written to generate multiple materials, each will have a name using the script name as a prefix. For example, if foo.mm1.txt has in it:
outputs += [ "Red", Surface(RED), "Blue", Surface(BLUE), "Clouds", Surface(Clouds()) ]
Then it will generate fooRed.mt5, fooBlue.mt5 and fooClouds.mt5.
So, the only trouble you could run into is if you also had a script called fooRed.mm1.txt and it generates one material. Then both foo.mm1.txt and fooRed.mm1.txt would be writing to the same file and cause problems. That's the only situation where you'd want to separate them in different folders. It is a pretty unusual case, though, and has never come up for anybody in the past.
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)
David, I sent you a site mail.
"It is good to see ourselves as
others see us. Try as we may, we are never
able to know ourselves fully as we
are, especially the evil side of us.
This we can do only if we are not
angry with our critics but will take in good
heart whatever they might have to
say." - Ghandi
Quote - Where's the last line, the one that actually says loom.Generate with a number
There is none as far as I can tell:
This is from: check1.mm1.txt
N = 64
ZN = 30
BigN = 128
from matmatic.loom import Loom
loom = Loom(":Runtime:python:matmatic:weaves:check1.jpg", 4)
outputs += ["Default", loom.Generate(N)]
loom.WarpColor = Color(.5, .2, .1)
loom.WeftColor = Color(.7, .5, .1)
outputs += ["RedOrange", loom.Generate(N)]
loom.FiberLayers = 10
outputs += ["FL10", loom.Generate(N)]
loom.FiberLayers = 4
loom.FiberSize = 2
outputs += ["FL4FS2", loom.Generate(N)]
loom.FiberColor = GREEN
outputs += ["FGREEN", loom.Generate(N)]
loom.FiberColorBlend = .6
outputs += ["FCB60", loom.Generate(N)]
loom.FiberColor = WHITE
loom.FiberBlend = .6
loom.FiberSize = 1
loom.FiberLayers = 6
outputs += ["FB60", loom.Generate(N)]
loom = Loom(":Runtime:python:matmatic:weaves:check1.jpg", 4)
loom.FiberLayers = 0
outputs += ["Zoom", loom.Generate(ZN)]
loom.Occlusion = .3
outputs += ["Occ3", loom.Generate(ZN)]
loom.Speckle = 0
outputs += ["SPECK0", loom.Generate(ZN)]
loom.Distortion = 5
outputs += ["D5", loom.Generate(BigN)]
loom.DistortionFrequency = 2
outputs += ["D5F2", loom.Generate(BigN)]
loom = Loom(":Runtime:python:matmatic:weaves:check1.jpg", 4)
loom.DisplacementDepth = .08
loom.WarpColor = Color(.2, .2, .5)
loom.WeftColor = GRAY8
outputs += ["Disp", loom.Generate(N)]
STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS
Oh, you're using the tutorial script.
I know you don't want to read anything, but this is from a tutorial, the point of which was to teach how to use this thing by have you read it. Every step was explained, and the script is heavily commented, reiterating what is going on. If you don't read the words, it's going to be useless. If you only read 3/4 of the words, it is useless.
This is not a script for generating a finished material you'd use in your renders. It is an exposition for learning how to use the parameters that the Loom offers. It generates a series of materials that demonstrate how the settings affect things. From this, you would learn how to assemble a script using the elements you want.
For example, this script says:
N = 64
That is where the number of threads was set in the script.
Then later, one of the materials created was done so by this line:
outputs += ["RedOrange", loom.Generate(N)]
That is the line where the loom generates a material, with N threads. So if you changed N=64 to N=1000, then all the materials made by this script that use Generate(N) would be using 1000 threads instead of 64 threads. There are two other thread counts in this script, ZN and BigN, that I used for individual demos in the tutorial where I wanted to zoom in or out.
None of which is important for USING the loom.
The point of matmatic is to be able to assemble simple statements to make very complex materials. It is not useful for you to just generate the materials I posted. In that case, I could just give you materials and we could skip the matmatic part.
Do you want a pale blue twill with 500 threads per unit? Or a dark red herringbone with 750 threads per unit? Or a Glenn Plaid of cream and gray with 775 threads per unit?
You can make any of those with just a few lines of script.
If reading and understanding and learning from the tutorials and examples isn't helpful, then how about you just describe the material you want and I or somebody else will give you a script to do that. Then you can work with something closer to what you intend.
What weave pattern? What colors? How much fuzz? How many threads?
Besides the basic weaves supplied in the tutorial thread, you can choose any pattern from here:
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)
Well, I installed Acadia's Matmatic into my Poser Pro Runtime, and deleted the Matmatic that I'd had in my Poser 5 runtime. Reinstalled your Compiler.pyc so as to work with my Poser Pro. and remaide my userconfig. tex:
verbose 1
scan Runtime:Libraries:materials:MatmaticDemos*
And now Matmatic is again giving me this messate:
----- MATMATIC COMPILER -----
verbose 1
Warning: config scan dir not found: Runtime:Libraries:pose:MatmaticDemos
verbose 1
------ MATMATIC COMPILER DONE -----
I'm going insane! Help, little green men from Mars are after me!
dph
STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS
David, you really need to read and remember things.
I already told you - there is no MatmaticDemos Pose folder. I had planned to make one, but I never did. Just comment out the scan command that is telling matmatic to look for that folder like you did earlier.
And since you moved back to the real main runtime, you no longer need to put that scan line in your userconfig, since it is already in the regular config.txt.
Putting it in twice will make matmatic spend twice as long looking at the same files twice.
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)
Quote - David, you really need to read and remember things.
I already told you - there is no MatmaticDemos Pose folder. I had planned to make one, but I never did. Just comment out the scan command that is telling matmatic to look for that folder like you did earlier.
I know that, and I commented that line out, but for some reason Matmatic is looking for it!
dph
STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS
You installed Acadia's files, which wrote over config.txt.
I had you change config.txt so it did nothing, and put the full path in userconfig.txt.
Now you have the original config.txt again, because you re-installed.
Which was the whole point of the userconfig.txt - because every time you install matmatic files, it will overwrite config.txt. If you intend to use a modified config.txt, you must protect it, or modify it again after every install.
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)
STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS
STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS
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)
Here is the script.
from matmatic.loom import Loom
loom = Loom(":Runtime:python:matmatic:weaves:check1.jpg", 4)
loom.WarpColor = IColor(250, 155, 100)
loom.FiberColor = WHITE
loom.FiberLayers = 1
loom.FiberBlend = .4
loom.Occlusion = .03
loom.Generate(1000)
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)
Wool - dark blue
from matmatic.loom import Loom
loom = Loom(":Runtime:python:matmatic:weaves:twill2.jpg", 4)
loom.WarpColor= IColor(30, 30, 40)
loom.FiberColor = GRAY5
loom.Generate(1000)
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)
Under what name should I save this script? And in which folder?
dph
STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS
from matmatic.loom import Loom
loom = Loom(":Runtime:python:matmatic:weaves:twill2.jpg", 4)
loom.WarpColor= IColor(30, 20, 10)
loom.FiberColor = GRAY4
loom.Generate(1000)
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)
Quote - Under what name should I save this script? And in which folder?
dph
Make any folder you want and choose any name you want.
For example:
MatmaticDemos DressCloth Orange.mm1.txt
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)
from matmatic.loom import Loom
loom = Loom(":Runtime:python:matmatic:weaves:twill2.jpg", 4)
loom.WarpColor= BLACK
loom.FiberColor = GRAY2
loom.Generate(1000)
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)
from matmatic.loom import Loom
loom = Loom(":Runtime:python:matmatic:weaves:twill2.jpg", 4)
loom.WarpColor= GRAY1
loom.FiberColor = GRAY4
loom.Generate(1000)
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)
Less Fuzzy, but not much. I'm trying out your scripts now. If you and Acadia would like one of my remaps, take your pick.
dph
STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS
from matmatic.loom import Loom
loom = Loom(":Runtime:python:matmatic:weaves:twill2.jpg", 4)
loom.WarpColor= Clouds(IColor(20, 20, 30), IColor(10, 10, 40), .1)
loom.WeftColor = Clouds(IColor(100, 100, 120), IColor(40, 40, 60), .2)
loom.FiberColor = GRAY5
loom.Generate(1000)
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)
from matmatic.loom import Loom
loom = Loom(":Runtime:python:matmatic:weaves:twill2.jpg", 4)
loom.WarpColor= Clouds(IColor(60, 60, 80), IColor(10, 10, 40), .1)
loom.WeftColor = Clouds(IColor(140, 140, 160), IColor(220, 220, 220), .2)
loom.FiberColor = GRAY9
loom.Generate(1000)
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)
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.
What does this error message mean when I try to run Matmatic:
Traceback (most recent call last):
File "E:Poser StuffCurious LabsPoser 5RuntimePythonmatmaticcompile.py", line 1, in ?
import matmatic.compiler
ImportError: No module named matmatic.compiler
STOP PALESTINIAN CHILD ABUSE!!!! ISLAMIC HATRED OF JEWS