You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
texture(...) and color(...) are considered to be shortcuts for a more general material(...). Example usage of material(...):
# Use Blender material with the name "MyMaterial" for the current shapematerial("MyMaterial")
# Create a material with the given parameters and apply it to the current shapematerial(diffuseColor=..., otherParamer=..., oneMoreParameter=..., )
# Use Blender material with the name "MyMaterial" for the current shape if the material already exists,# otherwise create a material with the given parameters and apply it to the current shapematerial("MyMaterial", diffuseColor=..., otherParamer=..., oneMoreParameter=..., )
The text was updated successfully, but these errors were encountered:
A more consistent solution to define materials and textures in Prokitektura.
A material composed of a number of textures can be specified by the material(...) operator:
material(
# texture for diffuse colortexture("image_file_name", width_in_world_units, height_in_world_units),
# one more texture for diffuse color, e.g. a dirt maptexture("image_file_name2", width_in_world_units2, height_in_world_units2),
# texture for normal map, note the special word "normal" as the last attributetexture("image_file_name3", width_in_world_units, height_in_world_units, normal),
# optional, a base diffuse colordiffuse="#00ff00",
# optional, the name of a custom Blender material to be used instead of that materialname="custom_name"
)
material(...) can contain any number of texture definitions texture(...)
Each subsequent call of material(...) on the same shape replaces the previous material.
If only one texture is needed, a shortcut version can be used. Just call texture() without wrapping it into material(...)
Open issues:
How to call a Blender material defined by material(...) if name=... isn't provided? A lot of Blender material can be generated if there is a need to have some randomness in textures for windows.
texture(...) and color(...) are considered to be shortcuts for a more general material(...). Example usage of material(...):
The text was updated successfully, but these errors were encountered: