pyrender
pyrender copied to clipboard
How to define a glass/gold/metal Texture?
Hi, I was wandering how to define such texture in pyrender,
In hunterloftis/pbr, use such code to define:
func Glass(roughness float64) *Uniform {
return &Uniform{
Color: rgb.Energy{1, 1, 1},
Roughness: roughness,
Specularity: 0.042,
Transmission: 0.91339,
}
}
func ColoredGlass(r, g, b, roughness float64) *Uniform {
return &Uniform{
Color: rgb.Energy{r, g, b},
Roughness: roughness,
Specularity: 0.042,
Transmission: 0.91339, // https://www.shimadzu.com/an/industry/electronicselectronic/chem0501005.htm
}
}
func Gold(roughness, metalness float64) *Uniform {
return &Uniform{
Color: rgb.Energy{1, 0.86, 0.57},
Metalness: metalness,
Roughness: roughness,
}
}
func Mirror(roughness float64) *Uniform {
return &Uniform{
Color: rgb.Energy{0.8, 0.8, 0.8},
Metalness: 1,
Roughness: roughness,
}
}
func Copper(roughness, metalness float64) *Uniform {
return &Uniform{
Color: rgb.Energy{0.98, 0.82, 0.76},
Metalness: metalness,
Roughness: roughness,
}
}
In pyrender, I am confused about the param I should pass, can anyone give me a hint about that? Thanks