realtime dithering for 8x8 plasma effect on c64
category: general [glöplog]
xptr what?
you know what variables are?
"xptr what?"
[img]http://i201.photobucket.com/albums/aa52/lolercoptor/fuuu.png
[/img]
[img]http://i201.photobucket.com/albums/aa52/lolercoptor/fuuu.png
[/img]
"As I said.. whatever curves. I don't know what.. and I am not asking for a 1x1 effect. Using charset I think you are limited, isn't it? You should have ideally 360 chars for every angle the curve makes.. so couldn't it be rendered realtime considering the angle inside the 8x8 space? This is what I mean."
No need to go into why plasmas don't use splines to explain why this makes no sense.
Its a lot simpler.
You want to do realtime calculation of chars in a charset to get smoother plasmas.
So what you're trying to do is get a better resolution, by calculating the shape at a higher resolution than 8x8 (realtime rendering into chars).
How is this any different (other than being slower) than just rendering in bitmap mode and not having any charset?
Answer: It isn't.
No need to go into why plasmas don't use splines to explain why this makes no sense.
Its a lot simpler.
You want to do realtime calculation of chars in a charset to get smoother plasmas.
So what you're trying to do is get a better resolution, by calculating the shape at a higher resolution than 8x8 (realtime rendering into chars).
How is this any different (other than being slower) than just rendering in bitmap mode and not having any charset?
Answer: It isn't.
Also: You don't know what "curve" you have at a given 8x8 pixel block. The calculation gives you a value for that whole block. You can interpolate to get a higher resolution plasma (although the bigger the gaps you interpolate, the less smooth the plasma will look).
But again, if you want to calculate every 8th pixel and interpolate, you're just looking at bitmap mode again.
But again, if you want to calculate every 8th pixel and interpolate, you're just looking at bitmap mode again.
yes exactly.. rendering of the chars in the charset. Why slower? Shouldn't be a lot faster than rendering the whole screen?
But if you're rendering into the chars, you're rendering the whole screen anyway. Why do you think using a charset would speed it up if you're redefining them every frame?
I think he means if you know what's going to be in that particular char, you can prepare a set of chars with all the possible bits of curve in them and just select. But to do that with a plasma, you'd have to do a lot of heavy lifting anyway, it'd be quicker to just draw the screen.
Chriz: where I suspect you're going wrong is understanding how a plasma works.. you don't work out any curves at all, just use a simple formula to work out the colour of each point on the screen. If you use a charset in a simple way, you just find the colour at each char's position and write a char of that colour to screen. For more detail, you use points that are closer together to make it higher res.
To do what you're thinking of, you'd basically have to draw the pixels around the edge of the char. That would give you an outline, from which you could choose a char with a line across at the right angle. If the chars are 8x8 (no idea what size c64 chars are), that's 28x more work. You could optimise that plenty, but it's still going to be pretty slow in comparison.
Chriz: where I suspect you're going wrong is understanding how a plasma works.. you don't work out any curves at all, just use a simple formula to work out the colour of each point on the screen. If you use a charset in a simple way, you just find the colour at each char's position and write a char of that colour to screen. For more detail, you use points that are closer together to make it higher res.
To do what you're thinking of, you'd basically have to draw the pixels around the edge of the char. That would give you an outline, from which you could choose a char with a line across at the right angle. If the chars are 8x8 (no idea what size c64 chars are), that's 28x more work. You could optimise that plenty, but it's still going to be pretty slow in comparison.
@psonice
Knowing what shape needs to go into a char and picking the right one is different to rendering a "best fit" charset on the fly (and then applying it), which I couldn't never imagine being very fast, ever.
Knowing what shape needs to go into a char and picking the right one is different to rendering a "best fit" charset on the fly (and then applying it), which I couldn't never imagine being very fast, ever.
aarrghh... swap "picking the right one" for "picking a close match".
Also swap "couldn't never" for "couldn't".
I suck.
Also swap "couldn't never" for "couldn't".
I suck.
Yeah, rendering a char instead of just rendering directly wouldn't make sense, but I think he was on about using a pre-prepared charset unless I'm remembering wrong (quite possible). He seemed to think you could work out the shape of the line through each char though (which you would if you made a plasma with splines, but then it'd be slow as hell anyway on a c64 I suspect :) If you did, what he's suggesting would make sense (and everyone would have been doing it ;)