| |
Luca
Registered: Apr 2002 Posts: 178 |
Twister's primer
How to obtain simple/cool/elaborate primer graphics (bitmap) for a general vertical twister effect (let's say simply 3 colours+background colour)? Should I draw'em on PC first, with a 3DMax or similars, then convert'em? Which height in pixels would be enough to smoothly describe and include the whole 360° rotation?
For a very basic one, I could simply draw a slice of column in two colours by drawing them with a sin(x) function, what with more complex stuff? |
|
... 16 posts hidden. Click here to view all posts.... |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: "Coding your own raytracer for generating the twister graphics isn't a bad idea."
its like coding your own ext editor for the twister's code...
I see your point, however, it's not valid to me. For me, learning some 3d program to generate the gfx takes longer than doing a simple raytracer. However, as complexity of the objects increases, using a real tool becomes more and more sane. F.e. the wireframe cube in Andropolis was generated using povray. (And now that I know povray I don't think I'd make my own raytracer again for a twister. :) )
The horizontal twisters in The Wild Bunch and Amplifire both used a custom raytracer that only could render such an object (i.e. some cylinders and planes). |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
okay, in some cases it is a good idea indeed :) but I'd guess most coder's cant just slap together a raytracer even this simple in 5-10 minutes, it needs some perequisites like in the case of using a tool. :) |
| |
Pantaloon
Registered: Aug 2003 Posts: 124 |
a simple twist tracer in kickasm script, stores which side is visible for each line.
.for (var side = 0; side < 4; side++)
{
.var y0 = round(coords.get(side*2+0))
.var y1 = round(coords.get(side*2+1))
.var ydiff = y1 - y0
.if (ydiff > 0)
{
.for (var y = y0; y < y1; y++)
.eval points.put(y,side)
}
}
|
| |
Mace
Registered: May 2002 Posts: 1799 |
@ Pantaloon: don't you forget declaring 'coords' as a List()? Or something... |
| |
Pantaloon
Registered: Aug 2003 Posts: 124 |
was just a little snippet. you need to rotate the coords first, and store them in a list. |
| |
MagerValp
Registered: Dec 2001 Posts: 1078 |
POV-Ray is perfect for these kinds of tasks. It's trivial to get it to render a series of 21x1 pixel (or whatever you need) cubes, and as a programmer you gotta love its scene description language. Slapping out a POV-Ray'd twister is faster than coding your own raytracer too, even if you've never used POV before. |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Depending on the type of twister, you can also simply generate the graphics on the c64 itself, like i did here in 4k: Bar4Kode - doesn't look as cool as raytraced, but still nice enough. :) |
| |
Mace
Registered: May 2002 Posts: 1799 |
Hey, this was the kind of stuff I was looking for :-)
Thanks Krill. |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Mace: I can send you the source if need be.. But it's uncommented and generally not up to my current standards :D |
| |
Luca
Registered: Apr 2002 Posts: 178 |
Plenty of available choices, I see.
I tried POV-ray but as a complete prophan, I ran away in pain. Probably a bit more patience would be needed. The Krill's solution looks tasty too.
Scout: I still dunno how to use the .raw image, because I didn't understand if that twister's primer is deliberately drawn in 3 colors, or there's something I missed around it (probably my ignorance in DTV...). |
Previous - 1 | 2 | 3 - Next |