Forum Coordinators: RedPhantom
Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 21 6:06 am)
Change the UVmap of the model. Alternatively there may be some setting for the shader to change the orientation of the grain, and you could do with just a material selection for the legs. Shader looks pretty good, but too perfect, needs some very subtle bump map type effect.
Which script are you using?
Is it a wood function, or just a bunch of statements?
In many cases, I wrote a function, and called it with x = U and y = V (or I let those be the defaults). If that's what you have, just call it with x = V and y = U.
If the script you're using is not a function call, but rather just a bunch of inline scripts, then make a copy of it. In this second copy, at the top, put
U, V = V, U
That will swap the meaning of U and V for the rest of the script.
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)
If the polygons of the model of the table are grouped into a single material zone, I think this will be what you'll see. If you have a separate material zone for the legs, and another zone for the table surface, then what Bagginsbill is telling you ought to work - change the U and V values only on the legs, and leave the tabletop alone. Does the table have multiple material zones, or just one?
at this moment only one zone but i intend to make the legs and the front and back struts a different zone soon as i get this flipping worked out
i'm checking with the new advice. lol that sounds crazy simple.
i did work on the x = u and y = v but then the wood boundries went crazy (actually remained original so not looking right) so i tried changing a lot of the variables one for another. i got it looking better but the sizes of the planks were still off. so i'm gonna try the inline idea .
thanks for all the help guys i'll get back on the success or failure of it
go that way really fast.
if something gets in your way
turn
nope that don't work either. (i'm using the p6 version)
i put it before s=, after it, in () and without them, i put it at the top of the function before x=3, y = 20, at places here or there in the function, and placed it in the boards = ( )
i can post the code i'm working in if it's okay with you baggins (i know better than to post someone elses code without permission)
thanks
go that way really fast.
if something gets in your way
turn
post it - I don't know what script you're working on
You're free to repost anything I post in a forum, unless it says otherwise inside (rare).
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)
def Boards(
nx = 3, # number of boards in the X direction
ny = 20, # number of boards in the Y direction
rings = 40, # number of rings per board
c1 = IColor(197, 136, 45), # wood color 1
c2 = IColor(230, 174, 94), # wood color 2
stainClr = Color(.8, .4, .2), # stain color
strength = .5, # stain strength
opacity = 0, # stain opacity
x = U, # x coordinate
y = V, # y coordinate
darken = 0, # amount to randomly darken boards
bevel = 0, # amount of bevel displacement
gap = 0, # gap between boards
reflect = .1, # amount of reflection
varx = 0 # variation in board layout (0 to 1)
):
Z = Add(0)
NV = ny * y
FNV = Floor(NV)
FNU = Floor(3 * U)
RNV = NV % 1
NU = nx * U
FNU = Floor(NU)
def RY(z):
return Noise(FNV, Add(0), Add(z))
ry1 = RY(.1)
rx = varx * ry1
RNU = (NU + FNV * 2 / nx + rx) % 1
FNUV = Floor(NU + FNV * 2 / nx % 1 + rx)
def RXY(z):
return RY(FNUV + z)
def R(z): return RXY(z)
clr = Wood2(rings, c1, c2, x = .5 * R(.3) * U, y = ny * y % 1, cx = R(.2), cy = Floor(V * ny + R(.1)) / ny)
if darken:
clr = clr * ((1 - darken) + darken * R(.5))
if strength:
clr = Stain(clr, stainClr, strength, opacity)
s = Surface(clr, 1, WHITE, 1, .01)
if bevel:
d = Clamp(30*Min(RNV, 1-RNV))
d = Min(d, Clamp(200 * Min(RNU, 1-RNU)))
d = bevel * (d - 1)
if gap:
gap = gap/2.0
ge = Min(RNV, inv(RNV))
d = d - (ge <= gap)
s.Displacement = d
if reflect:
s.Reflection_Color = Reflect(Clouds())
s.Reflection_Value = reflect
return s
s = Boards(1, 8, darken = 0, stainClr = Color(.8, .9, .9), strength=1, opacity = .15)
outputs += [ 'ButcherBlock', s ]
s = Boards(2, 20, varx = 0, darken = 0, bevel = 0, gap=0, stainClr = Color(.6, .8, .7), strength=.5, opacity = .15)
outputs += [ 'PressureTreatedDeck', s ]
s = Boards(2, 20, varx = 0, darken = 0, bevel = 0, gap=0, stainClr = Color(.6, .3, .1), strength=.8, opacity = .15)
outputs += [ 'RedwoodDeck', s ]
s = Boards(5, 44, bevel = 0, stainClr = Color(.5, .3, .1), strength = .5, reflect = .1)
outputs += [ 'Floor1', s ]
s = Boards(5, 44, bevel = 0, stainClr = Color(.8, .9, .9), strength = .5, opacity = .3, reflect = .1)
outputs += [ 'Floor2', s ]
s = Boards(5, 44, bevel = 0, stainClr = Color(.4, .2, .22), strength = .8, opacity = .1, reflect = .1)
outputs += [ 'Floor3', s ]
s = Boards(1, 8, stainClr = Color(.4, .2, .22), strength = .4, reflect = .2)
outputs += [ 'Table', s ]
go that way really fast.
if something gets in your way
turn
Hi dork,
Ah, so you're using the Wood script that comes with MatmaticDemos. That's all you had to tell me. Anyways...
No, I did not design the shader by hand first. That is the whole point of matmatic. Interactively designing a shader is an awesome feature of Poser, but after about 20 nodes it starts to get difficult. Trying to keep track of 50 nodes is near impossible. One, you forget each node's job unless you use a plugin to rename them, which is tedious. Two, when you're doing something that is pure math, it doesn't help to "see" the previews anymore and it's hard to hold the concept of what you're trying to say when you're having to do so much mouse clicking. Third, the material room doesn't let you create pre-defined recipes and reuse them. Imagine you're trying to cook a complicated meal, but you're not allowed to start with pre-made sauces or salad dressings, and before you can put a roast in the oven, you have to kill and butcher a cow. That's what making big materials is like - you can't build on previously finished componentry. Your'e always starting with the basic node library.
Take a look at the Boards function here. It doesn't have all the steps in it. It calls other previously defined combinations of nodes, namely "Stain" and "Wood2". There is no "Stain" or "Wood2" node in Poser. I would like there to be such nodes, so I can forget about those details, but there's no direct way to make such user-defined composite objects in Poser. With matmatic, we make functions that do those pre-made "sauces" and just "pour".
Anyway, I was going to tell you that this script was designed to allow you to change the axes, just as I said earlier. You just need to call the Boards function with x = V and y = U.
For example, suppose we're using the 'Table' shader, but we want a flipped version. So we copy and paste the last two lines and change them like this:
s = Boards(1, 8, stainClr = Color(.4, .2, .22), strength = .4, reflect = .2**, x = V, y = U**)
outputs += ['TableVU', s]
I added the instructions to override what to use for x and y in the call to Boards. Then I chose a new name for this shader, TableVU. The VU is arbitrary - it is just to remind you that this is the version where the grain goes in the other direction.
However, I tested it myself and there is a bug! In the script, I didn't fully utilize x and y. In a couple cases I used U and V directly, which is a mistake. Thus it did not fully swap the axes.
I'll fix that and upload a corrected script for you.
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)
Oops!
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)
Attached Link: http://sites.google.com/site/bagginsbill/free-stuff/matmatic/scripts
Okeedokee. I've uploaded a new and improved Wood script. It's at the new matmatic scripts page on my website. It's called Wood2.mm1.txt.It corrects the UV bugs when choosing to make the wood grain go in a different direction. To demo this, there is a second "Table" material, called "TableVU". It has vertical grain and boards. I got rid of the "reflection" parameter, and invented a new one - "shine". The shine parameter goes from 0 to 1. It defines how shiny you want the wood to look. At a setting of shine = 1.0, you get super gloss, like lacquer. The reflection amount is now controlled properly by a true Fresnel equation, mediated by shine. And, this shader is now gamma-correcting.
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)
super awesome man.
i see you had to write the script to make the shader instead of the other way around...but a total mystery to me how you knew what the nodes would do in combination. you must've know you can get a certain results from certain sets of nodes. ? and then line em up?
anyway you must be killer at chess.
really thanks for all the time you put into helping me.
go that way really fast.
if something gets in your way
turn
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.
go that way really fast.
if something gets in your way
turn