Forum: Poser Technical


Subject: Better documentation on the Math_Functions node?

odf opened this issue on Oct 19, 2024 ยท 14 posts


odf posted Tue, 22 October 2024 at 8:44 PM

Probably not worth a separate post, but I got my little tool working. This Python code:

from pydeltamesh.makeTexture import *

u = Input(U(), "u")
v = Input(V(), "v")
mask = ((u - 0.5)**2 + (v - 0.5)**2).sqrt() < 0.5

mask.name = "mask"

with open("dot_mktx.mt5", "w") as fp:
    write_poser_file(fp, "dot", [mask])


produces this compound node (after loading from file):

which can be used like this (for example):


If I add this to the Python script:

from PIL import Image
Image.fromarray(mask.data * 256).show()

I get shown a preview image. This is implemented very hackily at the moment, but easy to fix.

-- I'm not mad at you, just Westphalian.