pouët.net

Go to bottom

realtime dithering for 8x8 plasma effect on c64

category: general [glöplog]
xptr what?
added on the 2009-11-26 01:05:36 by chriz74 chriz74
you know what variables are?
added on the 2009-11-26 01:18:26 by havoc havoc
"xptr what?"

[img]http://i201.photobucket.com/albums/aa52/lolercoptor/fuuu.png
[/img]
added on the 2009-11-26 08:01:15 by Oswald Oswald
BB Image
added on the 2009-11-26 08:02:00 by Oswald Oswald
"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.
added on the 2009-11-26 10:11:15 by xeron xeron
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.
added on the 2009-11-26 10:13:39 by xeron xeron
yes exactly.. rendering of the chars in the charset. Why slower? Shouldn't be a lot faster than rendering the whole screen?
added on the 2009-11-26 12:04:13 by chriz74 chriz74
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?
added on the 2009-11-26 12:22:36 by xeron xeron
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.
added on the 2009-11-26 12:43:26 by psonice psonice
@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.
added on the 2009-11-26 12:52:58 by xeron xeron
aarrghh... swap "picking the right one" for "picking a close match".

Also swap "couldn't never" for "couldn't".

I suck.
added on the 2009-11-26 12:53:55 by xeron xeron
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 ;)
added on the 2009-11-26 13:02:49 by psonice psonice

login

Go to top