Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AbrahamR, 1 invisible), 858 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Handheld style camera movement? #213775
06/30/08 19:16
06/30/08 19:16
Joined: Feb 2002
Posts: 288
California, USA
J
jaknine Offline OP
Member
jaknine  Offline OP
Member
J

Joined: Feb 2002
Posts: 288
California, USA
Does anyone know of existing code that would add a smooth random movement to a free camera?

Think of any scene in a movie where the camera is handheld and the (very) subtle movement that results. Basically a smooth movement from random point to random point. Is there any code out there already that does this?

Re: Handheld style camera movement? [Re: jaknine] #214888
07/08/08 00:28
07/08/08 00:28
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline

Senior Expert
Orange Brat  Offline

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
I want to say this was covered once on here a long time ago, but I can't remember exactly when or if it even was. I used to be known as the resident camera guru around here, but I haven't been that active in recent months (I'm here just about everyday, but I don't spend that much time browsing or actively playing with camera code anymore).

I know once upon a time I wanted this, and I still want it. You might try searching the User Contributions forum or one of the scripting forums. There have been massive changes to the forum system over the years, and things get moved around and sometimes posts just disappear, so if there was something here then it may or may not have survived.

Perhaps randomly changing the camera's coordinates within a very small range inside a loop would do it. You'd have to build some internal clamps so the camera position wouldn't go crazy and end up 10 miles from where it started. In other words just move around a fixed point. If the camera can be moved by the player then just save the fixed point where ever the camera ends up once the player stops moving it. It might be a bit trickier whenever the camera is in motion, though.

Oh, and good movie reference would be the newest Rambo. Almost every shot is handheld. It has a very documentary style to it.


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Re: Handheld style camera movement? [Re: Orange Brat] #215199
07/09/08 19:25
07/09/08 19:25
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
in the gpu gems book there's some sine wave formula for smooth random-looking movement. if you'd apply that on pan, maybe with slight modification, you'll probably get what you want. i'll post the formula later on.

Re: Handheld style camera movement? [Re: Orange Brat] #215556
07/12/08 00:59
07/12/08 00:59
Joined: Feb 2002
Posts: 288
California, USA
J
jaknine Offline OP
Member
jaknine  Offline OP
Member
J

Joined: Feb 2002
Posts: 288
California, USA
Thanks guys.

Joey that would be great if you could post the code.

And Orange_Brat... I saw Rambo the other night and the camera work was awesome. Loved it.

Last edited by jaknine; 07/12/08 00:59.
Re: Handheld style camera movement? [Re: jaknine] #215821
07/13/08 16:00
07/13/08 16:00
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
Code:
cos(x*pi) * cos(x*3*pi) * cos(x*5*pi) * cos(x*7*pi) + sin(x*25*pi) * 0.1


this formula gives you a nice smooth looking animation with not too much repetitance. apply that to pan and tilt and maybe even to its position, maybe with different factors. try replacing some of the numbers by different ones, e.g. cos(x*13*pi) or the like. i think you get the idea.

joey.

Re: Handheld style camera movement? [Re: Joey] #216100
07/15/08 06:44
07/15/08 06:44
Joined: Feb 2002
Posts: 288
California, USA
J
jaknine Offline OP
Member
jaknine  Offline OP
Member
J

Joined: Feb 2002
Posts: 288
California, USA
Originally Posted By: Joey
Code:
cos(x*pi) * cos(x*3*pi) * cos(x*5*pi) * cos(x*7*pi) + sin(x*25*pi) * 0.1


this formula gives you a nice smooth looking animation with not too much repetitance. apply that to pan and tilt and maybe even to its position, maybe with different factors. try replacing some of the numbers by different ones, e.g. cos(x*13*pi) or the like. i think you get the idea.

joey.


Great, thanks, I appreciate it. I'll give it a shot.

Re: Handheld style camera movement? [Re: Orange Brat] #216101
07/15/08 06:45
07/15/08 06:45
Joined: Feb 2002
Posts: 288
California, USA
J
jaknine Offline OP
Member
jaknine  Offline OP
Member
J

Joined: Feb 2002
Posts: 288
California, USA
Originally Posted By: Orange Brat
I used to be known as the resident camera guru around here...


Speaking of that... any chance of getting updated forum links for your Master List? None of the links in it work anymore.

Re: Handheld style camera movement? [Re: jaknine] #216107
07/15/08 08:17
07/15/08 08:17
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline

Senior Expert
Orange Brat  Offline

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
I've meant to fix that. I did it for the link in my signature, but I'll have to update the thread with corrected links. Thanks for reminding me.


Joey, thanks for the formula. I'll put it to good use.


My User Contributions master list - my initial post links are down but scroll down page to find list to active links

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1