Looking for a tunnel
category: general [glöplog]
lookin for a tunnel?
Coming up: Random tunnel thread
Found it:
Sorry. Couldn't resist... ;)
Sorry. Couldn't resist... ;)
Another nice pouet coding thread pouetized :P
Where can I find info on how to do a wormhole? They can't be complicated to do since I've seen them everywhere.
great. there are bazillion threads that actually deserve that yet you didn't pick any of them. keep up the good work.
every single one of you!
I can render a simple straigth tunnel like I already have, and distort it. But it won't look so pretty (sharp).
what about using "sprites"?
http://www.pouet.net/prod.php?which=14446 (last part)
textures can be used better that in this example
http://www.pouet.net/prod.php?which=14446 (last part)
textures can be used better that in this example
iq's comments about the old blackaxe tutorial were funny. I (and probably others) very well remember that time in the scene: when discovering WHAT raytracing is and the trick of 8x8 blocks were actually awesome. we were high school (?) level students back then figuring stuff out! a raycast like that was really discovering math that was new to us and above out school level! which was awesome to learn things. after cs and math studies i think of those formulas as trivial and trivially optimizable as well.
the barrier of entry, or rather which discoveries are great AND competitive has shifted upwards a lot nowadays. if you want to compete with one of iq's great 4k procedurals you are quite out of luck if you try to figure out matrix math for the first time while you go.
derailing the topic, but somehow the ancient tutorial and the comment really struck me in showing how the scene has grown.
you can either consider this evolution or death:
the first c64 cracktro guys figure out basic pointers and hw registers through scene challenges.
my generation figured out matrix math and raster graphics (and 8x8 block raycasters :)).
the new guys have to master advanced compression and 3d apis just to compete.
i pity and admire the girls and boys coming next :)
imagine the people writing a moderately bad debris clone at 16 :)
the barrier of entry, or rather which discoveries are great AND competitive has shifted upwards a lot nowadays. if you want to compete with one of iq's great 4k procedurals you are quite out of luck if you try to figure out matrix math for the first time while you go.
derailing the topic, but somehow the ancient tutorial and the comment really struck me in showing how the scene has grown.
you can either consider this evolution or death:
the first c64 cracktro guys figure out basic pointers and hw registers through scene challenges.
my generation figured out matrix math and raster graphics (and 8x8 block raycasters :)).
the new guys have to master advanced compression and 3d apis just to compete.
i pity and admire the girls and boys coming next :)
imagine the people writing a moderately bad debris clone at 16 :)
oh, and on the topic:
- do a real raycaster. instead of fixed 8x8 blocks, subdivide those blocks that are on edge down to 1x1. a good criterion might be unclamped uv or just depth. getting the torus - ray intersection right is a good exercise as 216 pointed out.
- you can also try doing a rotated 2d wormhole: just a texture scrolling lookup, a lookup that goes from [x+y*pitch] to texture-offset and then at x,y you put down texture[texture-offset + scroll]. computing the lookup can be very slow or offline. then you just rotate the resulting image with a rotozoomer. i always wondered if anybody ever actually did it like that :)
- of course just 3d rasterizing the inside of a torus works! trivial in hardware!
- do a real raycaster. instead of fixed 8x8 blocks, subdivide those blocks that are on edge down to 1x1. a good criterion might be unclamped uv or just depth. getting the torus - ray intersection right is a good exercise as 216 pointed out.
- you can also try doing a rotated 2d wormhole: just a texture scrolling lookup, a lookup that goes from [x+y*pitch] to texture-offset and then at x,y you put down texture[texture-offset + scroll]. computing the lookup can be very slow or offline. then you just rotate the resulting image with a rotozoomer. i always wondered if anybody ever actually did it like that :)
- of course just 3d rasterizing the inside of a torus works! trivial in hardware!
hey, I pointed those optimization out cause I have written like eight raycasters already. In fact I belong to the second group too (your generation), at least partially. I made all the pixel-effects path and reinvented a lot of wheels in the way; only after all that (in 2002) I changed to Windows+OpenGL.
And I completely agree with you. That's why I always believed that making demos today is far more difficult than it was in the 95.
And I completely agree with you. That's why I always believed that making demos today is far more difficult than it was in the 95.
Quote:
- you can also try doing a rotated 2d wormhole: just a texture scrolling lookup, a lookup that goes from [x+y*pitch] to texture-offset and then at x,y you put down texture[texture-offset + scroll]. computing the lookup can be very slow or offline. then you just rotate the resulting image with a rotozoomer. i always wondered if anybody ever actually did it like that :)
Hmm, I think somebody must have done it this way. I remember seeing such wormholes on C64 demos (I think AEG's) and I guess it's just look up table and second pass rotate the buffer, else it wouldn't be so fast on the commie.
btw, how amazingly interesting/especial/different is pouet, the only place in the world where you can discuss about the evolution of the demoscene, maths, optimizing square roots away from a computer graphics effect and male's anus in full glory, all in the same thread \o/ Genuine :)
Opti: Uhm, wouldn't it be better to just merge the rotozoomer and the table-effect in the same routine? That is, look up uv-offset from rotozoomed LUT?
iq: word!
kusma: yep the "rotozoom" should be done on the LUT.
kusma: yep the "rotozoom" should be done on the LUT.
Hey xernobyl,
Just wondering: Do you want the tunnel for a 256byte intro or something bigger?
Just wondering: Do you want the tunnel for a 256byte intro or something bigger?
something bigger. I just said a 256 because I probably need a fake thing. Forming a tube with a few polys is simple ;)
well that's the fun thing with raytracing, compared to polygons :) you can change x and y depending on the z (with something like sine :) ) and it distorts the space.
hmmm just realized i wasn't on the last page. but at ldeast i'm not too much out of context :)
Quote:
Uhm, wouldn't it be better to just merge the rotozoomer and the table-effect in the same routine?
Well, maybe yes. I don't know how they are doing it but that would be a better idea than what I just assumed :)
To the guy above: I can't use sprites.
Back to the basics:
I have:
And I just need to find a simple way to draw non concentric circles on my straight tunnel (and make it a gay tunnel! Pun intended). My brain's ALU hasn't been what it was a few years ago :P
Back to the basics:
I have:
Code:
texture2D(difuse, vec2(atan(p.y-look_.y, p.x-look_.x)*0.31831, 1.0/length(p-look_)+time)));
And I just need to find a simple way to draw non concentric circles on my straight tunnel (and make it a gay tunnel! Pun intended). My brain's ALU hasn't been what it was a few years ago :P
Ok. I feel mega lame. I just found out now how a wormhole effect is done :S
Anyway, I guess I can try doing what I wanted to do now.
Anyway, I guess I can try doing what I wanted to do now.