Its my long-standing dream: vector textures for blender, and a vector-based procedural texturing engine. Please read all of this before any replies.
Lets get straight to business. This project starts now. Feel free to join this project / thread any time if you have something to contribute.
How would you design the programmatic flow of an vector based procedural texturing engine? Main problem, IMHO, is related to chaining the different modifiers. Not knowing what the final UI is like, I use simple letter abbreviations to describe different textures. Sketches, code and words welcome.
Basically there would be two distinct parts to the generation sequence: atom generation and texture rendering using guides and atoms.
The following functions and modifiers would be required.
#t = function target
#s = function source
#v = vert generator (guide genny)
#g = graphic object (atoms)
#M = modulation
#O = offset
#Math functions (~filters)
#f = function generator SIN/COS, SQR, TRI, SAW, NOISE
#+ = add constant
#- = substract constant
#* = multiply by constant
#Geometric properties - every object has these (atoms, guides, verts)
#T = Translation XY(Z)
#R = Rotation Z (XY)
#S = Scale XY
and here is the
- SVG texture import (convert into bitmap or whatever?)
- Implement repeat XY, Clipping minXY/maxXY, Clip/Repeat/Checker, simple texture features
Minimal Vector Texture Engine
— Guide - infinite line going through the centerpoint of texture plane
------ properties: rotation
------ Multiple guides possible!
- Minimal Vector Texture Engine
— Atoms - user defined SVG graphic
------ properties:XYZ offset, XYZ rotation, XYZ scaling
------ Also preset SVG primitives (line/circle/square/triangle/suzanne)
— Duplication of Atoms along the Guide
----- Main function!
----- Distributed by Atom width or by Guide resolution
— UI - nice easy to use texture node ui with sliders and numbers + preview
— Blender add-on or a plugin
Vector Texture Engine
— Property-modulator: modulate Atoms properties
— Modulator functions for XYZ trans/rot/scaling:
------ static value (+/-)
------ linear modulation (multiplier)
------ cyclic modulation (sin/sqr/tri/saw/random modulation)
------ easing modulation (exponential/quadratic/circular easing)
------ Values can be rounded to integer (ie. sine wave becomes square wave with values -1, 0, +1)
- Vector Texture Engine
— Native blender texture type
Advanced Vector Texture Engine features
— Modulator stack where different modulators can be chained (many modulators can be combined)
— Modulator input and output offset/min/max/multipliers
— UI - modulator stack, add modulator curve preview (2d/3d)
- Advanced Vector Texture Engine features
This texture generator will duplicate SVG graphic object-atoms along a infinite vector guide going through the centerpoint of the texture plane (canvas).
To create an interesting an interesting texture, user can rotate the guide, and translate, rotate and scale each of the atoms, either by static value, or linearly or cyclically against time or xy coords.
User can then duplicate guides and apply trans/rot/scale to each of these duplicates.
Each of the properties mentioned before could be also attached to a ‘modulator’ that could modulate the properties along time or xy-coords. For example, sine wave function multiplier could be applied to the y-trans of each atom, translating the rows or atoms to reseble ripple-profile.
For example, make a floor tile texture by duplicating a square tile graphic along a guide running along the y axis, and then duplicating the guides along the x-axis.[end]