spectator camera

A forum about everything related to the Cafu World Editor CaWE: mapping, editing, scripting, making GUIs and fonts, using the BSP, PVS and Light compilers.
Post Reply
purga
Posts:4
Joined:2009-01-15, 08:36
spectator camera

Post by purga » 2009-01-15, 08:40

when building a map in the caWE and run it in engine, is there a "spectator" camera available to quickly examine the designed level, like q3's "/noclip" command?

Also, how can I tweak this spectator (or player's) movement speed? like in q3 it's "/g_speed <speed>"

Thanks in advance.
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: spectator camera

Post by Carsten » 2009-01-15, 11:36

Dear purga,
welcome to the Ca3D-Engine forums! :welcome:

The "noclip" movement mode in Ca3DE is implemented in the human player entity code itself, class EntHumanPlayerT, file Games/DeathMatch/Code/HumanPlayer.cpp
The player movement speed is defined there as well.

However, the code is currently deactivated, due to the client-server nature of the game that applies even for single-player games. Activating this code again should not be a problem though.
Best regards,
Carsten
purga
Posts:4
Joined:2009-01-15, 08:36

Re: spectator camera

Post by purga » 2009-01-15, 13:11

Thanks Carsten!

I saw the commented out part around line 403 in HumanPlayer.cpp. Does this mean that after removing the /*...*/ bracket the game code(deathmatch module) has to be recompiled?

If so, is there a Visual Studio workspace or Solution file (we're using VS 2005)available with the Demo? Or maybe you can share it privately? You can just email it to the one I left for registering the forum.

Another question will be the wireframe mode. Is it possible to toggle between shaded/wireframe mode in-game? Like in Q3 it's [r_showTris "1"] We would like to see how the culling works in Ca3D, and also a couple of engine features like terrain LODs can be only seen in wireframe mode.

I did check the lua commands but can't find any useful.... any hints?
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: spectator camera

Post by Carsten » 2009-01-15, 17:17

Dear purga,
purga wrote:I saw the commented out part around line 403 in HumanPlayer.cpp. Does this mean that after removing the /*...*/ bracket the game code(deathmatch module) has to be recompiled?

If so, is there a Visual Studio workspace or Solution file (we're using VS 2005)available with the Demo? Or maybe you can share it privately? You can just email it to the one I left for registering the forum.
Yes, activating this code requires recompiling the (DeathMatch) game code.
Here is a suggestion: I'm currently preparing the first release candidates for the upcoming demo. Would it work for you when I just activate the code (toggled via a console variable), and then ship it with the upcoming demo? The first release candidates are due soon.
Another question will be the wireframe mode. Is it possible to toggle between shaded/wireframe mode in-game? Like in Q3 it's [r_showTris "1"] We would like to see how the culling works in Ca3D, and also a couple of engine features like terrain LODs can be only seen in wireframe mode.

I did check the lua commands but can't find any useful.... any hints?
Yes, at the console, type:

Code: Select all

 forceRM("wireframe") 
In order to get normal rendering again, use no parameter:

Code: Select all

 forceRM() 
Some notes:
  • forceRM means "force Render Material", it tells the material system to always use the material with the given name, rather than the usual ones.
  • The command also affects the console text rendering, so you either have to type forceRM() blindly or simply type it as the first command (then it does nothing), then type forceRM("wireframe"), and in order to get back later, simple use the ARROW UP key two times in order to get the forceRM() from the consoles command history.
  • The "wireframe" material is defined in file Games\DeathMatch\Materials\meta.cmat, but you can use the forceRM command with any other material, e.g. try forceRM("Textures/generic/_white"), then close the console with F1 or ESC in order to see the lightmaps only!
In order to toggle the PVS, type

Code: Select all

 usePVS = not usePVS 
As above, using the ARROW UP key gives you an easy way to toggle this on and off.


Finally, please note that the console supports command completion with the TAB key,
and that you can easily add shortcut commands by editing the config.lua file, e.g.

Code: Select all

MatNr=1;

function rstyle()
    Materials={ nil, "wireframe", "Textures/generic/_white" };

    MatNr=MatNr+1;
    if (MatNr>#Materials) then MatNr=1; end

    if (MatNr==1) then forceRM() else forceRM(Materials[MatNr]); end
end
toggles between normal rendering, wireframe and lightmaps whenever rstyle() is called from the console.
Best regards,
Carsten
purga
Posts:4
Joined:2009-01-15, 08:36

Re: spectator camera

Post by purga » 2009-01-16, 09:35

Thanks for sharing the knowledge using wireframe.

Providing the new compiled game module (DeathMatch.dll) works. Certainly, it will be really nice if a "noclip"-command-only-version ready in advance; this will be a huge plus making ppl like us familiar with Q3 System debugging levels more easier.
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: spectator camera

Post by Carsten » 2009-01-16, 12:11

purga wrote:Providing the new compiled game module (DeathMatch.dll) works. Certainly, it will be really nice if a "noclip"-command-only-version ready in advance; this will be a huge plus making ppl like us familiar with Q3 System debugging levels more easier.
Release candidates for the next release will be ready soon (likely next week), and I will make sure that they come with "noclip" support built-in.

However, I'm wondering, is there a specific problem with a map that you wish to debug but cannot due to missing noclip feature?
Best regards,
Carsten
purga
Posts:4
Joined:2009-01-15, 08:36

Re: spectator camera

Post by purga » 2009-01-17, 03:10

It's just the desiger's favor.

When building the map it's just simpler for us to jump right into it, and quickly fly to the point we wanna see.
Like when building levels in Q3 you don't need your weapons mapped as number1~9; what really is necessary are different speeds setup (g_speed 1000) ~ (g_speed 5000), mapped as 1~5.

I guess once Ca3D has these kind of flexibility (allowing customization) it will become more popular :D
Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests