Skip to content
Forum Archive

Mirror Tileing

12 posts

PJ-Avser#

Mirror Tileing

I'm sure someone would have asked this, but i seached the forums, and it couldn't find any matches.
What is the syntax for mirror tiling?
I hope you can help
Warrior of the Light#
for movement you mean?

x=abs(x) for right to left
x=-abs(x) for left to right
y=abs(y) for bottom to top
y=-abs(y) for top to bottom
PJ-Avser#
Sorry WOTH. I should have explained better. what I want is for x to go like this
-1 -0.5 0 0.5 1 -0.5 0 0.5 1 normal x
-1 -0.5 0 0.5 1 0.5 0 -0.5 -1 after mirror tile

I've seen It done before, In 3d maze 3 and I could not understand most of it's code properly. it's possible.
Warrior of the Light#
still not sure... you mean like this?

if not could you please explain as specific as possible what you want to do with it?
^..^#
do you perhaps mean something like this left-right problem?
^..^#
sorry, pak that's wrong. This is JEOPARDY here. You have to ask a question that would fit to PJ's problem.

o.k let's carry on with this: i'll choose "Mysterious Requests 400"
jheriko#
bleh

I think he means tiling a texture on a dm. usually you generate texture coordinates from the raytrace solution (usually something like (x1*k+ox,y1*k+oy,z1*k+oz), to texture a plane with constant z (z=1 for instance) you woult use:

x=x1*k+ox;
y=y1*k+ox;

Hopefully that is familiar. To 'mirror tile' it what is normally done is to use:

x=asin(sin(x1*k+ox));
y=asin(sin(y1*k+ox);

If you want to be perfect then use x=asin(sin((.5*$PI*(x1*k+ox))))*2/$PI; etc... this way you are preserving the whole texture but still mirroring it. Take a look at the example preset attached. The only benefit of using this though is that you can get rid of big ugly edges, in cylinders and other curved 3D DMs, in exchange for much smaller ones and a mirrored texture.
^..^#
don't worry about that. it always happens now and then, that someone (including me) asks something, that others don't understand at first.
PJ-Avser#
Now that that preset's done...
Is then a way to do it in 21D?

Edit: I mean 2D, sorry for scaring you there /Edit😳