since this is around my problem area, i hope someone can help me out:
i was fiddling with the megabuff again and i made something really cool. however, there are some ugly lines that connect the squares together. i don't have enough color manipulation skills to cull off these lines so if some math genius figured it out for me, that'd be great.
preset is here:
http://www.deviantart.com/deviation/14291423/
thanks
3d colors
36 posts
I took a brief look at it ampy but I think you need to re-code the structure a little bit. You would be better defining a square, then repeating that square with whatever offsets you want....
point=if(equal(point,4),0,point+1);
x1=<define square>+megabuf(index)
y1=<define square>+megabuf(index+1);
z1=<define square>+megabuf(index+2);
index=index+bnot(point);
skip=bnot(point);
define a square using equal(point,0)*bleh+equal(point,1)*blehbler etc..
so you are starting a new square when point=0, and skipping drawing that line. I dont have your code in front of me but i think you used trig to define your squares which is not a good way (expensive)
If anyone can be bothered to explain that better feel free :P
point=if(equal(point,4),0,point+1);
x1=<define square>+megabuf(index)
y1=<define square>+megabuf(index+1);
z1=<define square>+megabuf(index+2);
index=index+bnot(point);
skip=bnot(point);
define a square using equal(point,0)*bleh+equal(point,1)*blehbler etc..
so you are starting a new square when point=0, and skipping drawing that line. I dont have your code in front of me but i think you used trig to define your squares which is not a good way (expensive)
If anyone can be bothered to explain that better feel free :P
just need to make sure, because i never really dealt with equal/above/below functions very much, so what the equal(point,0) , equal (point,1) means is that you are telling the scope to draw a line from 0 to 1 so i would need a total of four lines to define a square right?
@ WotL, you'd want to talk to unconed about scope swapping, just take at his preset goldie.
Well, yes you need four lines but thats five points per square because the last point and first point have to be the same to make it join up. My pseudocode should probably be point=if(equal(point,5),0,point+1); I rushed it off just to give you an idea of the structure.
You can search the forums for a point to point square drawing method but I'll knock one out here quickly:
frame:
n=5;
point=0;
point:
x1=
equal(point,0)*-1
+equal(point,1)*1
+equal(point,2)*1
+equal(point,3)*-1;
y1=
equal(point,0)*-1
equal(point,1)*-1
equal(point,2)*1
+equal(point,3)*1;
z1=0;
point=point+1;
....
if you want it to be a long line of squares you can say
frame:
n=50;
point=0;
offset=-1;
point:
x1=
equal(point,0)*-1
+equal(point,1)*1
+equal(point,2)*1
+equal(point,3)*-1;
y1=
equal(point,0)*-1
equal(point,1)*-1
equal(point,2)*1
+equal(point,3)*1;
point=if(equal(point,4),0,point+1);
offset=offset+bnot(point)*0.1;
z1=offset;
skip=bnot(point);
....
that way 'point' defines the point of the square you are drawing, and when it hits 0 you offset in the z axis a little bit and draw another square. You get rid of the lines by setting skip to 1 when point = 0. I dont know if that code works as is, I'm not in front of AVS but its basically right.
You should get my programming guide if you want learn how to do more 'advanced' stuff like this
You can search the forums for a point to point square drawing method but I'll knock one out here quickly:
frame:
n=5;
point=0;
point:
x1=
equal(point,0)*-1
+equal(point,1)*1
+equal(point,2)*1
+equal(point,3)*-1;
y1=
equal(point,0)*-1
equal(point,1)*-1
equal(point,2)*1
+equal(point,3)*1;
z1=0;
point=point+1;
....
if you want it to be a long line of squares you can say
frame:
n=50;
point=0;
offset=-1;
point:
x1=
equal(point,0)*-1
+equal(point,1)*1
+equal(point,2)*1
+equal(point,3)*-1;
y1=
equal(point,0)*-1
equal(point,1)*-1
equal(point,2)*1
+equal(point,3)*1;
point=if(equal(point,4),0,point+1);
offset=offset+bnot(point)*0.1;
z1=offset;
skip=bnot(point);
....
that way 'point' defines the point of the square you are drawing, and when it hits 0 you offset in the z axis a little bit and draw another square. You get rid of the lines by setting skip to 1 when point = 0. I dont know if that code works as is, I'm not in front of AVS but its basically right.
You should get my programming guide if you want learn how to do more 'advanced' stuff like this
you know what? i think i wil 😉