scripted cameras

ET Pro Documentation Project

Moderators: Forum moderators, developers, ET Pro Documentation

User avatar
fretn
Posts: 341
Joined: Sun Jul 27, 2003 4:35 am
Location: Belgium!

scripted cameras

Post by fretn »

not finished

Camera definitions are simply a position, view direction, and FOV which can be defined and obtained over a set amount of time. A camera definition is made up of a camera path and at least one target path. Paths can be one of three different types.

1.Fixed – Does not move.
2.Interpolated – The position is interpolated between two points over a given amount of time.
3.Spline – The position is interpolated between the two nearest pre-computed time segments along the derived spline path.

Camera definitions are stored in “.camera” files which can be loaded anywhere from the base path.

A ".camera" file looks like this:

Code: Select all

cameraPathDef {
	time <time_in_seconds>
	camera_Interpolated &#123;
		time <time_in_milliseconds>
		type <some_number>
		name <some_name>
		baseVelocity <some_velocity>
		startPos &#40; x y z &#41;
		endPos &#40; x y z &#41;
	&#125;
	target_Interpolated &#123;
		time <time_in_milliseconds>
		type <some_number>
		name <some_name>
		baseVelocity <some_velocity>
		startPos &#40; x y z &#41;
		endPos &#40; x y z &#41;
	&#125;
	event &#123;
		// dunno - I need to check this
		type 4
		param ""
		time 0
	&#125;
	fov &#123;
		fov <some_fov>
		startFOV <some_fov>
		endFOV <some_fov>
		time <time_in_milliseconds ?>
	&#125;
&#125;
_Interpolated can be switched with _Fixed

Code: Select all

_Fixed &#123;
	time <time_in_milliseconds>
	type <some_number>
	name <some_name>
	pos &#40; x y z &#41;
&#125;
camera_ is the position of the camera, if you want a static position, use camera_Fixed, if you want a moving camera use camera_Interpolated

or camera_Spline, I recommend building spline paths with GTKRadiant.
target_ is the place where the camera is looking at, if you use a moving target, the angle of your camera will slightly move
in the moving direction of the target.
You can retrieve your current position in a map with /getpos (bleh I need to check the name of this cmd).
Day by day : http://w.twwwo.be/
User avatar
fretn
Posts: 341
Joined: Sun Jul 27, 2003 4:35 am
Location: Belgium!

Post by fretn »

new example scripted camera:

railgun03

start a server with the map railgun

/forcevar sv_cheats 1
/camera railgun03

or open a demo with this map and exec the last command.

this camera is made with gtkradiant 1.4

first I decompiled the bsp with q3map2 to a .map file, then I opened the source file with gtkradiant, went to plugins->cameras and started a new spline camera

example to convert a bsp to a map file

Code: Select all

C&#58;\Program q3map2.exe -convert -format map -map railgun.bsp -game et
then fire up gtkradiant open the .map file and go to plugins->camera->new spline camera

the camera inspector will popup drop some points and preview it

tip: when making a camera both camera and target are a spline, and they have to follow a path like my example, just add the nodes for the camera, and then edit the .camera file by hand, copy paste the camera nodes to the target , remove the first node by the target and the last by the camera, save it, and the camera will always look in the direction it travels. [/code]
Day by day : http://w.twwwo.be/
GrO
Posts: 3
Joined: Tue Jan 11, 2005 11:11 am

Post by GrO »

Hello!

Where can i download this plugin? I have searched it but no found... :)

best regards, GrO
User avatar
=FF=im2good4u
Posts: 3821
Joined: Wed Feb 05, 2003 7:30 am
Location: The Netherlands, HOLLAND
Contact:

Post by =FF=im2good4u »

(oh)

its in etpro ! no plug in needed
User avatar
=FF=im2good4u
Posts: 3821
Joined: Wed Feb 05, 2003 7:30 am
Location: The Netherlands, HOLLAND
Contact:

Post by =FF=im2good4u »

or if u mean the Q3map2 its inside gtk radiant
GrO
Posts: 3
Joined: Tue Jan 11, 2005 11:11 am

Post by GrO »

no no :D i mean this one
then fire up gtkradiant open the .map file and go to plugins->camera->new spline camera
I have all map converted ! but i need this plugin (and i don't found it on etpro or am a noob imHo)
User avatar
Nail
Posts: 425
Joined: Fri Jan 02, 2004 3:47 pm
Contact:

Post by Nail »

fretn wrote:
this camera is made with gtkradiant 1.4

first I decompiled the bsp with q3map2 to a .map file, then I opened the source file with gtkradiant, went to plugins->cameras and started a new spline camera
Improvise, Adapt, Overcome
Bouaap
Posts: 25
Joined: Fri Oct 22, 2004 3:02 am

Post by Bouaap »

Right.. the latest 1.5 GtkRadiant does not have this plugin bundled. Get 1.4.
wargle.c
GrO
Posts: 3
Joined: Tue Jan 11, 2005 11:11 am

Post by GrO »

omg :shock: k thanks
User avatar
=FF=im2good4u
Posts: 3821
Joined: Wed Feb 05, 2003 7:30 am
Location: The Netherlands, HOLLAND
Contact:

Post by =FF=im2good4u »

or else 1.3 witch has it for sure
Bouaap
Posts: 25
Joined: Fri Oct 22, 2004 3:02 am

Post by Bouaap »

=FF=im2weak4u wrote:or else 1.3 witch has it for sure
I've been using 1.4 to create some .camera's ;)
wargle.c
Bouaap
Posts: 25
Joined: Fri Oct 22, 2004 3:02 am

Post by Bouaap »

Hmm.. maybe somebody can help me a little with those camera paths. When I've created one, and I want to move the complete path up/down orso, is there a simple way todo that? I cant seem to figure out how to select them all..
wargle.c
User avatar
skooli
Posts: 9
Joined: Sun Jan 16, 2005 2:33 am

Post by skooli »

hi, i'm using gtkradiant 1.4, but always when i klick on "preview", there occurs a critical error, and the radi has to be closed.
so i think theres something wrong with my camera definitions i made with the inspector ^^

would be great if somebody could make little description about getting a valid camera file... step-by-step

thanks and cya :D
Bouaap
Posts: 25
Joined: Fri Oct 22, 2004 3:02 am

Post by Bouaap »

Guess that's because you dont have a path and a target with enough waypoints.. add some more ;)
wargle.c
User avatar
skooli
Posts: 9
Joined: Sun Jan 16, 2005 2:33 am

Post by skooli »

tell me: how can i make waypoints with the camera inspector? :shock:
Post Reply