A.D.A. Amiga Demoscene Archive

  Welcome guest! Please register a new account or log in

  

  

  

Demos Amiga Demoscene Archive Forum / Coding / Free directional tunnel / plane / sphere deformations ?

 

Author Message
uzo
Member
#1 - Posted: 8 Jan 2010 11:56
Reply Quote
I've got my FD tunnel up and running, and I would like to do deformations on it like done in tractor beam / tbl and showbase shape. I'm at a loss, it must be done in the quadratic equations, but I'm not sure where and what factors should be placed within them. Any clues?
bonkers
Member
#2 - Posted: 9 Jan 2010 18:43
Reply Quote
What you want to alter is the norm you are using that defines the isosurface. L2 will be a normal circular tunnel, L1 will be a square tunnel. I guess what one would do to morph between two is to interpolate between two different norms.
uzo
Member
#3 - Posted: 13 Jan 2010 21:14
Reply Quote
Thanks for the reply. I've tried this a bit on my freedir planes, interpolating to the freedir tunnel. Not really a beauty, to be honest. More ore less, what I'm looking for is the same effect as TBL / Captured Dreams, second freedir tunnel.

http://ada.untergrund.net/?p=demo&i=254

The second to last screenie on that one. I have no idea how to deform the tunnel like that. Any clues ?
z5_
Member
#4 - Posted: 13 Jan 2010 21:43 - Edited
Reply Quote
@uzo: is this tunnel going to end up in a demo or intro? Are you planning one doing a demo? Would be cool :)

And while i can't help you on the question, it's cool to see that your tunnel is up and running. Always wanted to do a tunnel... but never did. Hope somebody can help with your question.
uzo
Member
#5 - Posted: 14 Jan 2010 18:01
Reply Quote
Thanks z5_!

This is just me researching all this stuff. Not sure if it will ever become an amiga demo.
Kalms
Member
#6 - Posted: 14 Jan 2010 23:39
Reply Quote
uzo:

First, simplify the problem a bit by always assuming that the camera is in the center of the tunnel. (that is, the camera can rotate freely but only move along the Z axis.)

Then, in your ray<->cylinder intersection, modulate the cylinder's radius by a sinewave-lookalike function depending on which direction (in the XY plane) that the intersection ray is going. That is: let the radius of the tunnel change between different rays cast during the same frame.
uzo
Member
#7 - Posted: 15 Jan 2010 10:42
Reply Quote
Thanks Kalms! I was trying to just that, but without the simplification to t = rad / sqrt(directionx*directionx + directiony*directiony); I couldn't get it to work. Got it up and running now and think I understand how to go back to free x and y origin too. Thanks so much!

 

  Please register a new account or log in to comment

  

  

  

 

A.D.A. Amiga Demoscene Archive, Version 3.0