mytexture = ImageMap("myCoolSkin.jpg")
mytexture = ImageMap(Image_Source = "myCoolSkin.jpg")
def makeSurface(bumps, red):
bumpySurface = ImageMap("blackTxSm.jpg") redColour = IColor(255, 0, 0)
"blackTxSm.jpg"
makeSurface(bumpySurface, redColour)
def makeSurface(bumps, red):
makeBump = .35 * bumps
makeBump = bumps
mixIt = Blender(red, bumps, .7)
mixIt = Blender(red, bumps, .7 * bumps)
surface = Surface(red * bumps, 0, 1, 1, Bump = makeBump, Alternate_Diffuse = shader)
Bump = makeBump Alternate_Diffuse = shader
Idler's Hi-Heel Pumps at Rendo
from matmatic.extras import Collection from matmatic.extras import Surface
class Hiheelpumps(Collection):
Hiheelpumps(Collection):
class Hiheelpumps(Collection): materials = [ "Heel_Tip", "Sole", "Insole", "Heel", "Leather", "Inner", "Outsole", "Preview", ]
leather = None sole = None inside = None Preview = None Heel_Tip = "sole" Sole = "sole" Insole = "inside" Heel = "leather" Leather = "leather" Inner = "inside" Outsole = "sole"
Heel_Tip = "sole"
#========================================================= # - - Shader for All Shoes - revised for PP2012/P9 # by Robynsveil # (c) Tightbytes 2011 #=========================================================
import poser from rvShoes import *
#========================================================= # Gamma correction #========================================================= gamma = PM(1, "Gamma") def aCor(item): return item ** gamma def Cor(item): return item ** (1 / gamma)
# Base Class: Simple class Simple(object): def __init__(self, colour, shine, bump, difClr = None, refl = None): self.colour = colour self.shine = shine self.bump = bump self.difClr = difClr self.refl = refl self.setDefaults()
self.colour = colour self.shine = shine self.bump = bump self.difClr = difClr self.refl = refl
self.setDefaults()
def setDefaults(self): self.shine = Blinn(WHITE, 0.04 ** self.shine, .2, .5 * Bias(self.shine, 0.25)) if self.refl: self.refl = SphereMap(IColor(84, 84, 84) * self.refl)
def makeSurface(self): if not self.difClr: self.difClr = 0 if not self.refl: self.refl = 0 bBum = .02 * self.bump gBum = .015 * self.bump self.colour = aCor(self.colour) diffuse = Diffuse(self.colour, .85 * (1 - self.shine)) shader = Cor(diffuse + self.shine) self.surface = Surface(self.difClr, 0, 0, 0, Reflection_Color = self.refl, Reflection_Value = .4, Bump = bBum, Gradient_Bump = gBum, Alternate_Diffuse = shader)
if not self.difClr: self.difClr = 0
#========================================================= # Base Class: Simple class Simple(object): def __init__(self, colour, shine, bump, difClr = None, refl = None): self.colour = colour self.shine = shine self.bump = bump self.difClr = difClr self.refl = refl self.setDefaults() def setDefaults(self): self.shine = Blinn(WHITE, 0.04 ** self.shine, .2, .5 * Bias(self.shine, 0.25)) if self.refl: self.refl = SphereMap(IColor(84, 84, 84) * self.refl) if not self.difClr: self.difClr = 0 if not self.refl: self.refl = 0
def makeSurface(self): bBum = .02 * self.bump gBum = .015 * self.bump self.colour = aCor(self.colour) diffuse = Diffuse(self.colour, .85 * (1 - self.shine)) shader = Cor(diffuse + self.shine) self.surface = Surface(self.difClr, 0, 0, 0, Reflection_Color = self.refl, Reflection_Value = .4, Bump = bBum, Gradient_Bump = gBum, Alternate_Diffuse = shader)
if not self.difClr: self.difClr = 0 if not self.refl: self.refl = 0
def makeLRPumps():
# # # # # # # #
"Heel_Tip", "Sole", "Insole", "Heel", "Leather", "Inner", "Outsole", "Preview",
olrPumps = Hiheelpumps()
tex_refl = "Textures\Idler168\Pump\Reflection.jpg" tex_bump = "Textures\Idler168\Pump\V4HighHeelPump.jpg" specMap = PMM(tex_refl, "Reflection Map") bumpMap = PMM(tex_bump, "Bump Map") innerClr = IColor(158, 138, 103) heel_Clr = IColor(13, 13, 13) # # # # # #
lethrClr = IColor(64, 64, 255) # LightBlue lethrClr = IColor(238, 130, 183) # Pink lethrClr = IColor(14, 13, 18) # Black lethrClr = IColor(24, 46, 60) # Dark Cyan lethrClr = IColor(254, 235, 248) # OffWhite lethrClr = IColor(250, 5, 8) # Red lethrClr = IColor(79, 79, 79) # Grey
# inside (Inner - Insole) node_Clr = PMC(innerClr, "Inner Colour") node_Clr.pos = 225, 200 bumpMap.pos = 225, 300 specMap.pos = 225, 525 oShoe = Simple(node_Clr, 1, bumpMap, innerClr, specMap) oShoe.makeSurface() olrPumps.inside = oShoe.surface
def makeLRPumps(): # "Heel_Tip", # "Sole", # "Insole", # "Heel", # "Leather", # "Inner", # "Outsole", # "Preview", olrPumps = Hiheelpumps() tex_refl = "Textures\Idler168\Pump\Reflection.jpg" tex_bump = "Textures\Idler168\Pump\V4HighHeelPump.jpg" specMap = PMM(tex_refl, "Reflection Map") bumpMap = PMM(tex_bump, "Bump Map") innerClr = IColor(158, 138, 103) heel_Clr = IColor(13, 13, 13) # # # # # #
lethrClr = IColor(64, 64, 255) # LightBlue lethrClr = IColor(238, 130, 183) # Pink lethrClr = IColor(14, 13, 18) # Black lethrClr = IColor(24, 46, 60) # Dark Cyan lethrClr = IColor(254, 235, 248) # OffWhite lethrClr = IColor(250, 5, 8) # Red lethrClr = IColor(79, 79, 79) # Grey # inside (Inner - Insole) node_Clr = PMC(innerClr, "Inner Colour") node_Clr.pos = 225, 200 bumpMap.pos = 225, 300 specMap.pos = 225, 525 oShoe = Simple(node_Clr, 1, bumpMap, innerClr, specMap) oShoe.makeSurface() olrPumps.inside = oShoe.surface # leather (Leather - Heel) node_Clr = PMC(lethrClr, "Leather") node_Clr.pos = 225, 200 bumpMap.pos = 225, 300 specMap.pos = 225, 525 oShoe = Simple(node_Clr, 1, bumpMap, lethrClr, specMap) oShoe.makeSurface() olrPumps.leather = oShoe.surface
# sole (Heel_tip) bumpMap = 0 node_Clr = PMC(heel_Clr, "Pump Colour") node_Clr.pos = 225, 200 specMap.pos = 225, 300 oShoe = Simple(node_Clr, 1, bumpMap, heel_Clr, specMap) oShoe.makeSurface() olrPumps.sole = oShoe.surface return olrPumps
oShoe = Simple(node_Clr, 1, bumpMap, innerClr, specMap)
oShoe.makeSurface()
leather = None sole = None inside = None Preview = None
def makeSurface(self): bBum = .02 * self.bump gBum = .015 * self.bump self.colour = aCor(self.colour) diffuse = Diffuse(self.colour, .85 * (1 - self.shine)) shader = Cor(diffuse + self.shine) self.surface = Surface(...)
olrPumps.sole = oShoe.surface
return olrPumps
outputs += [ "-MTPumps-Black", makeMTPumps(), "-IdPumps-Black", makeIdPumps(), "-dazPumps-Black", makePumps(), "-LRPumps-Grey", makeLRPumps(), "-CSSandals-Pink", makeCSSandals(), "-Peeptoes-Teal", makeoPeep(), # "-SlingBack-Black", makeoSling(), ]
"-LRPumps-Grey", makeLRPumps(),