Our model is trained to work with simple prompts, without needing to do advanced prompt engeering or other special tricks to get what you want. The most important things to consider:
The model works better with material keywords
You can combine odd concepts to get cool results, such as “metal slime” or “glass rocks”.
Prompt for materials, not subjects
For example, if you ask for a lamp, you will get unexpected results as a lamp can contain many different materials. Instead, prompt for each material individually such as “white fabric”, “smooth mahogany”, “black plastic”, etc.
Use reference images or pattern control
With a reference image you can heavily influence the color and rough layout of the generated texture. A reference image can be as simple as a 1-2 color doodle created in MS Paint. If you need fine-grain control over the pattern (Shape option on the tool), you can use one of our provided patterns or create your own canny edge map (in-tool edge map creation coming soon).
Here are some example materials and their prompts, in order from left to right, top to bottom.
- heiroglyphs
- porus bone
- human skin
- brushed steel
- metal slime
- (Using pattern control) wicker basket weave
- mossy tree bark
- moss
- white marble, gold cracks
- raw beef
- cliff rocks
- (Using pattern control) glass subway tile
- (Using pattern control) purple fabric
- (Using pattern control) paving stones
- (Using pattern control) honeycomb
- (Using pattern control) red tile
- (Using pattern control) gray bricks
- (Using pattern control) gray bricks
For the time being, you can use this simple Python script (or an online tool) to create your own canny edge maps. The Python script uses tkinter to let you create the map using a GUI with simple sliders. We will have this functionality as a built-in on Muse Texture in the near future
import cv2
from tkinter import *
from PIL import Image, ImageTk
from tkinter import filedialog
import sys
class CannyEdgeGUI:
def __init__(self, img_path):
self.root = Tk()
self.root.title('Canny Edge Detection')
self.img_path = img_path
self.img = cv2.imread(self.img_path, cv2.IMREAD_GRAYSCALE)
self.img = cv2.resize(self.img, (512, 512))
self.c1 = Scale(self.root, from_=0, to=500, orient=HORIZONTAL, label='low_threshold', command=self.update_image)
self.c1.set(50)
self.c1.pack()
self.c2 = Scale(self.root, from_=0, to=1000, orient=HORIZONTAL, label='high_threshold', command=self.update_image)
self.c2.set(100)
self.c2.pack()
self.c3 = Scale(self.root, from_=1, to=20, orient=HORIZONTAL, label='blur', command=self.update_image)
self.c3.set(1)
self.c3.pack()
self.canvas = Canvas(self.root, width=512, height=512)
self.canvas.pack()
self.save_button = Button(self.root, text='Save Image', command=self.save_image)
self.save_button.pack()
self.update_image()
self.root.mainloop()
def update_image(self, _=None):
low = self.c1.get()
high = self.c2.get()
blur = self.c3.get()
blur = blur if blur % 2 == 1 else blur + 1
img = cv2.GaussianBlur(self.img, (blur, blur), 0)
edges = cv2.Canny(img, low, high)
self.edges = edges
img = cv2.cvtColor(edges, cv2.COLOR_GRAY2BGR)
img = Image.fromarray(img)
imgtk = ImageTk.PhotoImage(image=img)
self.canvas.create_image(0, 0, anchor=NW, image=imgtk)
self.canvas.image = imgtk
def save_image(self):
save_path = 'canny_' + self.img_path
cv2.imwrite(save_path, self.edges)
if __name__ == "__main__":
if len(sys.argv) != 2:
print(f"Usage: {sys.argv[0]} image_path")
exit(1)
CannyEdgeGUI(sys.argv[1])
If you have any questions or have difficulty achieving a specific texture, feel free to ask and we will be happy to give some suggestions for your specific case!