Old 31st July 2003, 18:54   #1
Akuso
Member
 
Join Date: Jun 2003
Location: North Carolina
Posts: 83
Send a message via AIM to Akuso
yaw movement

I know this has probably been asked before, but I searched for it and since I didn't know what to call it I didn't get anything.
So here's the problem, in a DM I currently have a 3d plane with the formula

z=1.2+y;
x=x/z;
y=y/z;y=y+t; (t=t+.02)

What I want to do is be able to pivot the plane left and right, like your moving forward and turn your head to the side.

Any suggestions?
Akuso is offline   Reply With Quote
Old 31st July 2003, 20:17   #2
dirkdeftly
Forum King
 
dirkdeftly's Avatar
 
Join Date: Jun 2001
Location: Cydonia, Mars
Posts: 2,651
Send a message via AIM to dirkdeftly
...learn to raytrace?

"guilt is the cause of more disauders
than history's most obscene marorders" --E. E. Cummings
dirkdeftly is offline   Reply With Quote
Old 31st July 2003, 20:40   #3
Akuso
Member
 
Join Date: Jun 2003
Location: North Carolina
Posts: 83
Send a message via AIM to Akuso
I don't know what that is...
Akuso is offline   Reply With Quote
Old 31st July 2003, 20:53   #4
anubis2003
Forum King
 
anubis2003's Avatar
 
Join Date: Dec 2002
Location: middle of somewhere
Posts: 5,564
Send a message via AIM to anubis2003
search the forums and the internet. In the website thread(it's prob'ly on the second page) 32849235 posted a good beginner raytracing tutorial - it may help. Also, unconed had a nice post that explained it.
anubis2003 is offline   Reply With Quote
Old 31st July 2003, 23:09   #5
Akuso
Member
 
Join Date: Jun 2003
Location: North Carolina
Posts: 83
Send a message via AIM to Akuso
DAMN! what kind of math is that?! well I halfway understand it...
but if anyone has nothing better to do, it'd be very helpful if I could see the code doing just the task I'm trying to do. It seemed like alot of the examples were doing complex shapes.
Akuso is offline   Reply With Quote
Old 31st July 2003, 23:24   #6
anubis2003
Forum King
 
anubis2003's Avatar
 
Join Date: Dec 2002
Location: middle of somewhere
Posts: 5,564
Send a message via AIM to anubis2003
If anybody gave you some code then you would have to give them full credit for it, you know. By the way, did you code what you already have?
anubis2003 is offline   Reply With Quote
Old 31st July 2003, 23:27   #7
Akuso
Member
 
Join Date: Jun 2003
Location: North Carolina
Posts: 83
Send a message via AIM to Akuso
yeah, but that just simple stuff.
Akuso is offline   Reply With Quote
Old 1st August 2003, 01:02   #8
Nic01
Major Dude
 
Nic01's Avatar
 
Join Date: Mar 2002
Location: The Biggest Little City
Posts: 508
Send a message via AIM to Nic01
Raytracing uses mostly the simple functions, just more of them - Take it piece by piece, you'll understand it.

[soon to leave, sirs]
Nic01 is offline   Reply With Quote
Old 7th August 2003, 19:53   #9
jheriko
Forum King
 
jheriko's Avatar
 
Join Date: Aug 2002
Location: a twist in the fabric of space
Posts: 2,150
Send a message via ICQ to jheriko
Firstly do the rotations you want on x1=x;y1=y*h/w;z1=1;

Take the plane equation ax+by+cz+d=0 for a general plane and substitute ox+x1*k, oy+y1*k and oz+z1*k respectively and solve for k. k is the 'distance' along the ray which must be traveled to reach the intersection point of the ray and the plane.

ox,oy,oz represent the position of the camera and the rotation angles represent the direction that it faces.

If you want the plane z=0 for instance:

k=oz/z1;

Next you do x=x1*k+ox;y=y1*k+oy; this deforms the texture so that it is smaller for bigger values of k and larger for small values.. giving the illusion of 3D. Adding the camera positions moves the texture to make it look like the camera is moving, the texture is already rotated correctly from the calculations of x1,y1,z1. If you were to render a plane perpendicular to the y axis.. e.g. y=1 then x=x1*k+ox;y=z1*k+oz; would be a better projection to use. Figure it out and play with it.

-- Jheriko

'Everything around us can be represented and understood through numbers'
jheriko is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Visualizations > AVS > AVS Troubleshooting

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump