|
![](/i/fill.gif) |
Imho there is a need for new pigment pattern.
The problem: I have an object close to cube (but this is not exacly a typial
box but some shape).
I want to texture it as it would be a box, applying different texture to
each of 6 direction/faces (if a face is not exacly a face of a box, then
choose the closest of 6 possible textures/directions)
This trivial task turns out very hard, one have to create 3 or 6 shapes each
with different texture and try to combine them. It not always work, and it
is an ugly hack imho.
The slope y texture_map solves the problem if we need just 2 directions,
like a texture for "up" and "down".
Imho the solution would be a pattern returning one of 6 values (so like 0,
1/6, 2/6 etc) basing on the direction.
If (x>y) && (x>z) then the main direction is +x
If (x<y) && (x<z) then the main direction is -x
end so on.
then just use a texture_map with 6 entries on that function, and you got a
nice texturing for faces of box-like objects.
What do you think?
How to implement that exacly?
Post a reply to this message
|
![](/i/fill.gif) |