- AVS Troubleshooting
- 3d orientation problem
Archive: 3d orientation problem
Adasha
1st June 2003 23:37 UTC
3d orientation problem
I'm going to have to admit defeat and ask for some help with a scope problem I have
I'm drawing a flat scope so that z=0, then spinning it in 3d. Up until now my rotations were done in the wrong order (z last) so I changed things around.
Now although the object seems to spin correctly it starts off facing the wrong way, side-on, and the axes don't seem to be in the right places. Also, if the rotation is wrong, then the shading calculations are wrong too.
Can anyone help? I've got to the point where I'm just staring blankly at the code. It would be less frustrating if I wasn't so sure its something REALLY obvious...
Thanks
dirkdeftly
1st June 2003 23:59 UTC
The axes look fine to me...not much time to look at the code, but I really don't see a problem except for how the rotation seems a bit stiff and unnatural. The scope itself is really nice, though.
And as UnConeD put it...don't use blur as a replacement for anti-aliasing, becuase they're simply not the same :)
sidd
2nd June 2003 05:11 UTC
the perspective is fine, i dont know what you think is wrong with it.
there are some tmes when your color code makes the distance/angle slightly confusing, but the actual axes are fine.
Atero, do you think you could give us a rundown of 'proper' anti-aliasing?
Jaheckelsafar
2nd June 2003 08:21 UTC
The problem is you're not initializing you rotation values. Set xrot, yrot and zrot to pi/2 in init and you'll see it head on when you start.
dirkdeftly
2nd June 2003 09:53 UTC
siddhartha: proper anti aliasing is impossible with avs. but you shouldn't use blur as a replacement, because it looks fugly :)
shreyas_potnis
2nd June 2003 10:00 UTC
fuck+ugly=fuckly :D Cool. Anyway, there is some problem with the rotation, and when all rotations are 0 then you can see only one line which indicates that y is 0 or something. rx and rz seem to be the same :igor:
sidd
2nd June 2003 11:34 UTC
blur is better than nothing no?
Adasha
2nd June 2003 12:07 UTC
Jaheckelsafar: yeah, I was doing that before, but I'm trying to do things properly, and as far as I can tell it should be drawing in the x/y axes in the first place, so why am I having to compensate?
Here's a version which highlights the problem - I've taken out the on beat stuff, and set a fixed y rotation speed, only its rotating in z instead
re: blur, would some sort of convolution filter do any better a job?
UnConeD
2nd June 2003 17:09 UTC
It definitely looks like something IS wrong with your scope, though I can't pinpoint it. It could just be the round shapes though... an ellipse in projected 3D looks wrong until you draw the stuff around it and it turns out it was okay all along ;).
By the way, whoever said anti-aliasing couldn't be done in AVS? It's just not very fast or practical... this is an antialiased cubic bézier scope. Of course it still suffers from the 45° linedrawing problem, but that's AVS' fault, not mine ;).
And blur is not the same as AA, but usually you can fake simple AA by blurring and turning up the contrast. Especially great when combined with the previous technique, as I did in the attachment (delete conv+colormap to get 'pure' superscope only antialiasing).
The reason blur is not real AA is because anti-aliasing requires sub-pixel information, whereas all you can do with blur is attempt to guess it. This causes sharp spikes to get rounded off and can cause meta-blob-ish behaviour.
If you want this to work with solid scopes, you'll have to maxblend each layer separately and then add them together. Or you could fake it and use additive with lower opacity, but this will result in a pattern on the scope (but this might look cool).
dirkdeftly
2nd June 2003 19:50 UTC
Siddhartha: That's like saying really ugly is better than only slightly ugly.
sidd
3rd June 2003 00:43 UTC
Atero: depends on the individual yes yes. Blur can look happy and nice at times. :) :D
You can also creat a like effect by using small texer particles and a really narrow-between dot scope.
Unconed: Waaah0000t that looks nice! I dont get why you have used eight scope though..