how to make a camera


(Qualmi) #1

anybody wants to tell me how to make a camera :smiley: i cant find a tutorial about it and all my tryings failed.


(shagileo) #2

Camera for limbo or for making videos? :slight_smile:

EDIT: with videos I mean for programs like Tracecam (or was it camtrace ? :o )


(Qualmi) #3

camera like in mlb, the secret rooms; ones, where i can see certain areas of the map at a screen. tried misc_portal_camera, but didnt work.


(shagileo) #4

Well, you can have a look at the MLB source map Temple:

or other MLB sources:

http://www.gd-experience.eu/index.php?section=2&category=6

EDIT:
goto:

http://www.gd-experience.eu/index.php?section=2&category=6

and press in the search field: MLB
that’s it and you’ll see a list of the MLB map sources


(Qualmi) #5

wow thx, didnt know that this was open source. ill take a look at it when i will install my secret room.

note: this information is exclusive only. some of the next maps ill release will have secret rooms and kinda passwords to get there. but i wont tell this when i release, at least until i have laughed my ass off by doing crazy things from there :smiley:


(stealth6) #6

I have one in my map.

Apply the attatched texture to the TV screen.
Shader:


textures/stealth/mirror_portal
{
	qer_editorimage textures/stealth/mirror_portal.jpg
	surfaceparm playerclip
	surfaceparm nolightmap
	portal
	{
		map textures/stealth/mirror_portal.jpg
		blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
		depthWrite
		alphaGen portal 1024
	}
}

(change the paths to w/e you want)

-Then place a misc_portal_surface just in front of it.
-Then place a misc_portal_camera where you want your camera to look from.
-Then place an info_notnull in the direction you want your camera to be looking.
-Deselect everything.
-Select FIRST the misc_portal_surface THEN the misc_portal_camera, press ctrl+k.
-Deselect everything.
-Select FIRST the misc_portal_camera THEN the info_notnull, press ctrl+k.
-Deselect everything.
-Compile.

Then it works enjoy your camera.


(Qualmi) #7

sup :slight_smile:

this spares me some time to filter the textures and the shaders from the mlb_map. i have one mirror now in my map, but its from the mlb_map and it only works with the pk3 in my directory.

for the texture, is a normal 56 X 56 texture enough ? or is there sth ‘special’ with your texture ?


(aaa3) #8

bubba’s q3 tute


(stealth6) #9

no idea, I think i got that texture from mlb :stuck_out_tongue:


(Qualmi) #10

hm…there bumped up a problem with this. i have applied now the shader and the texture on it, tried texture .tga and .jpg. the camera works, shows a spot of the map i have targeted. but when i move my crosshair to the left when i stand in front of it, it suddenly shows another picture of the map. anybody knows what is wrong ?


(-SSF-Sage) #11

That is how it is supposed to work. It’s more like a window or such than a cam.


(Qualmi) #12

staying in the analogy of the window you can imagine this like looking at a spot. when you suddenly glance left while watching out of the window, then you and your window move to a complete new spot and watch there some other things :smiley: its a bit strange, cant explain this to me. i have linked everything like stealth said :confused:


(stealth6) #13

is the camera close to a wall? maybe you are looking through it.


(Qualmi) #14

here a little video to explain better. i have used the shader and the texture of stealth, although i know i could simply use a black texture :wink:

camera problem vid

btw. what you see in the background is my crap map i am working on atm. it wont be thaat good, but its ok :slight_smile:


(IndyJones) #15

[QUOTE=stealth6;190297]I have one in my map.

Apply the attatched texture to the TV screen.
Shader:


textures/stealth/mirror_portal
{
	qer_editorimage textures/stealth/mirror_portal.jpg
	surfaceparm playerclip
	surfaceparm nolightmap
	portal
	{
		map textures/stealth/mirror_portal.jpg
		blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
		depthWrite
		alphaGen portal 1024
	}
}

(change the paths to w/e you want)

-Then place a misc_portal_surface just in front of it.
-Then place a misc_portal_camera where you want your camera to look from.
-Then place an info_notnull in the direction you want your camera to be looking.
-Deselect everything.
-Select FIRST the misc_portal_surface THEN the misc_portal_camera, press ctrl+k.
-Deselect everything.
-Select FIRST the misc_portal_camera THEN the info_notnull, press ctrl+k.
-Deselect everything.
-Compile.

Then it works enjoy your camera.[/QUOTE]
my screen is rotated by 180 degrees. how do i fix it?


(Destroy666) #16

Add texture to the whole brush, rotate it 180 degrees and remove/change textures from wrong faces.
Or change angles key in misc_portal_camera.


(IndyJones) #17

both didnt work.


(stealth6) #18

lol no:
-Key: roll
-Value: 180

roll rotates the camera

btw this is a better shader (no extra images needed):


textures/stealth2/mirror_portal
{
	qer_editorimage gfx/colors/ablack.tga
	surfaceparm playerclip
	surfaceparm nolightmap
	portal
	{
		map gfx/colors/ablack.tga
		blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
		depthWrite
		alphaGen portal 1024
	}
}


(IndyJones) #19

ok, i’ll try. btw. is there a way to make a infinite loop (or at least draw camera more times than once)?


(stealth6) #20

not sure what you mean. But you can’t make a hall of mirrors effect.

Also screens that are within each others vis also cause problems like a bunch of tv’s next to eachother (well I tried putting 3 different feeds near eachother but it had difficulty getting the right feeds on the right tv’s