Outerra forum

Anteworld - Outerra Game => Modding: Importer, Tools & Utilities => Topic started by: Acetone on July 23, 2014, 01:53:49 pm

Title: List of all the debug/monitoring tools
Post by: Acetone on July 23, 2014, 01:53:49 pm
Outerra includes many debug tools, but they are well hidden for normal user. Some of them may be usefull for moders, others for performance monitoring and a few are just fun.
I have tried to list some of them, fell free to search for other ones  ;)

First, you need to go into your eng.cfg (yourname/outerra/eng.cfg).
Search for the "debug_keys" line and set the value to "true". You can now use the tools listed below :


Various tools

Alt+m and Alt+s : Occulus Rift mode
Ctrl+p : Flight path recorder
Ctrl+F4 : Recorder
Ctrl+F7 : FBX importer
Alt+F5 : Shader editor
Alt+c : command console (not the same as "p" key)
Alt+F8 : Reload Cubemap (environnemental reflexions)
Alt+F11 : Reduce exposure (not sure why it's usefull)

Bugged/Missing

Alt+e and Alt+s : spawn cubes (not working : they are missing on the public version directory)
Ctrl+k : weird spawn menu

Terrain tools

Alt+t : disable vegetation
Alt+i : display geographic coordinates on ground texture
Alt+n : elevation map. Repeat to toggle between various modes.
Ctrl+n : display terrain grid. Repeat to toggle between various modes.

Debug monitors

Alt+1 : Render tasks stats
Alt+2 : Gpu times
Alt+3 : Textures stats
Alt+4 : Sounds monitor
Alt+5 : Tiles monitor
Alt+6 : Memory tracker
Alt+7 : Models monitor
Ctrl+F12 : Show fps

Secret hidden features ;)

Alt+v : basic night vision mode (warning : full green screen during day!)
Ctrl+i : basic thermal vision mode

Title: Re: List of all the debug/monitoring tools
Post by: ZeosPantera on July 23, 2014, 01:59:19 pm
THIS.. is a good post.
Title: Re: List of all the debug/monitoring tools
Post by: PytonPago on July 23, 2014, 02:29:14 pm
nice to have it at one list !
Title: Re: List of all the debug/monitoring tools
Post by: Jagerbomber on July 23, 2014, 03:56:58 pm
I picture you holding alt for every key on the keyboard.  ;D
Title: Re: List of all the debug/monitoring tools
Post by: Acetone on July 23, 2014, 04:33:49 pm
I picture you holding alt for every key on the keyboard.  ;D

That's not true, I also did it with Ctrl  ;D
(and, in case you were wondering, I tested Alt-Gr too...)

In fact some of these shortcuts have already been posted by Cameni, but I figured out that spending some time to make a single list would be a good idea. It was worth it since two announced features (basic IR and night vision mode) were already accessible that way.
Title: Re: List of all the debug/monitoring tools
Post by: PytonPago on July 24, 2014, 01:22:25 am
Wouldn't be bad it it was in the OTs options menu somewhere too ...

... also, would be neat do add some Temperature-texture to the vehicles (actually characters too - maybe even activity dependent), witch would show temperature distribution on the vehicle surface more realistically. Being ambient cold at spawn and heating up slowly when started (just coloration due to the time and local color on the texture).

P.S.: Try spawn some Urals/BTRs, go 200-500 meters height, move the camera slowly sideways in thermal vision and try to shoot them with the crater gun ! ... UAV Simulator ! !! :D

(http://t1.aimg.sk/pokec/fotoalbumy/07/o_460645183_04602cda962c5ac6783bf4504e0dea62.png?t=L2ZpdC1pbi8xOTIweDE5MjA%3D&h=I36FDMMGxct0n_-plo88Fg&e=2145916800)
Title: Re: List of all the debug/monitoring tools
Post by: Acetone on July 26, 2014, 03:38:58 am
Interresting fact :

Yesterday, when using both Terrain grid display and Show Fps tools, I realised that Outerra cannot go under 30 fps (in most cases). In fact the engine prioritize this minimum framerate over terrain rendering, and most specifically terrain procedural refinement. I've always wondered why terrain detail generation (when turning camera for example) was more visible in montainous areas or in the locations where I have placed a lot of heavy detailed buildings (Levi's GTA4 imports, for example).

In fact, when the polycount/detail of the scene is highter, the engine use terrain refinement as an adjustment variable. It's why sometimes the terrain seems to "lag" or seems "to be loading". Outerra is just taking more time to refine it because the scene is more heavy. It's a clever system to avoid FPS drops depending on the scenery density.

You can still go under sub-30fps in two specific cases :

-Your computer cannot support Outerra even at minimum detail level. I have only experienced it by testing the engine on a sub-powered laptop with a CPU integretad graphic chip.

-Since Outerra seems to not use LOD or occlusion culling(for the moment), spawned objects (vehicules and buildings) can kill perfs, simply by skyrocketing the polycount (number of polygons the engine have to handle each frame). With proper LODs (different levels of detail depending of the distance between object and camera) and occlusion culling (objects behind an other object or terrain are not rendered), engine performances should remain stable in most situations.
(However, it seems that the mercenary model already use LOD).

Little experiment on my rig (Intel core I3-3.40Ghz, AMD Radeon R9 200 series) :

(http://i.imgur.com/3MTb8mw.jpg)
Droping below 30fps at :
Faces in view : 1851659
batches in view : 2565
faces in shadows : 1936469
batches in shadows : 2670

Between 15/25 high poly Levi's buildings and 26 Bt67 (not static model, fully working planes with JBSIM running for each one of them, wich is probably not helping a lot for the framerate).

Not bad.
Title: Re: List of all the debug/monitoring tools
Post by: cameni on July 26, 2014, 04:13:57 am
I realised that Outerra cannot go under 30 fps (in most cases). In fact the engine prioritize this minimum framerate over terrain rendering, and most specifically terrain procedural refinement. I've always wondered why terrain detail generation (when turning camera for example) was more visible in montainous areas or in the locations where I have placed a lot of heavy detailed buildings (Levi's GTA4 imports, for example).

This can be controlled by adjusting requests-per-frame parameter in world.cfg. It tells the maximum number of terrain tile tasks that can run per frame, by default set to 6.
Title: Re: List of all the debug/monitoring tools
Post by: Levi on July 26, 2014, 04:26:44 am
#Acetone (http://forum.outerra.com/index.php?action=profile;u=112564)

Also, the airplane (BT-67) uses lots of materials (86 to be precise), and each material is using 1 draw call, from what I understand. So this may drop several frames as well...
Title: Re: List of all the debug/monitoring tools
Post by: PytonPago on July 26, 2014, 05:53:15 am
LODs are there ... the models arent done in all of them ...
Title: Re: List of all the debug/monitoring tools
Post by: SpaceFlight on July 26, 2014, 02:48:44 pm
Outerra includes many debug tools, but they are well hidden for normal user. Some of them may be usefull for moders, others for performance monitoring and a few are just fun.
I have tried to list some of them, fell free to search for other ones  ;)

First, you need to go into your eng.cfg (yourname/outerra/eng.cfg).
Search for the "debug_keys" line and set the value to "true". You can now use the tools listed below :


Various tools

Alt+m and Alt+s : Occulus Rift mode
Ctrl+p : Flight path recorder
Ctrl+F4 : Recorder
Ctrl+F7 : FBX importer
Alt+F5 : Shader editor
Alt+c : command console (not the same as "p" key)
Alt+F8 : Reload Cubemap (environnemental reflexions)
Alt+F11 : Reduce exposure (not sure why it's usefull)

Bugged/Missing

Alt+e and Alt+s : spawn cubes (not working : they are missing on the public version directory)
Ctrl+k : weird spawn menu

Terrain tools

Alt+t : disable vegetation
Alt+i : display geographic coordinates on ground texture
Alt+n : elevation map. Repeat to toggle between various modes.
Ctrl+n : display terrain grid. Repeat to toggle between various modes.

Debug monitors

Alt+1 : Render tasks stats
Alt+2 : Gpu times
Alt+3 : Textures stats
Alt+4 : Sounds monitor
Alt+5 : Tiles monitor
Alt+6 : Memory tracker
Alt+7 : Models monitor
Ctrl+F12 : Show fps

Secret hidden features ;)

Alt+v : basic night vision mode (warning : full green screen during day!)
Ctrl+i : basic thermal vision mode

This information would fit onto the wiki page too.
Title: Re: List of all the debug/monitoring tools
Post by: Acetone on July 27, 2014, 04:18:19 am
-> Cameni, Levi and PytonPago

Thanks for these informations! I've set requests-per-frame in world.cfg to 10. Seems to improve terrain procedural refinement speed, without crash so far.
Anyway, I was also wondering if my current gpu_lag is not a little bit high (between 50 and 90), does anyone else have similar results? My bet on the infamous ATI's OpenGL drivers (Catalyst 14.4 for me)...
Title: Re: List of all the debug/monitoring tools
Post by: Levi on July 27, 2014, 04:53:01 am
-> Cameni, Levi and PytonPago

Thanks for these informations! I've set requests-per-frame in world.cfg to 10. Seems to improve terrain procedural refinement speed, without crash so far.
Anyway, I was also wondering if my current gpu_lag is not a little bit high (between 50 and 90), does anyone else have similar results? My bet on the infamous ATI's OpenGL drivers (Catalyst 14.4 for me)...
My gpu_lag is between 15-45 on NVIDIA GeForce GTX 550 TI, driver version 337.88 WHQL.
Title: Re: List of all the debug/monitoring tools
Post by: HiFlyer on July 27, 2014, 07:26:10 am
-> Cameni, Levi and PytonPago

Thanks for these informations! I've set requests-per-frame in world.cfg to 10. Seems to improve terrain procedural refinement speed, without crash so far.
Anyway, I was also wondering if my current gpu_lag is not a little bit high (between 50 and 90), does anyone else have similar results? My bet on the infamous ATI's OpenGL drivers (Catalyst 14.4 for me)...
My gpu_lag is between 15-45 on NVIDIA GeForce GTX 550 TI, driver version 337.88 WHQL.

Gpu lag? Where are you seeing that?
Title: Re: List of all the debug/monitoring tools
Post by: Levi on July 27, 2014, 07:31:04 am
Gpu lag? Where are you seeing that?
Make sure you have "debug_keys" enabled, then press CTRL+F12 and you should be able to see it next to "FPSs"
Title: Re: List of all the debug/monitoring tools
Post by: HiFlyer on July 27, 2014, 08:01:21 am
Gpu lag? Where are you seeing that?
Make sure you have "debug_keys" enabled, then press CTRL+F12 and you should be able to see it next to "FPSs"

Hmmmmmmm... Just to add to the info, with trees maxed, highest lag I saw was 20. It mostly was in the 12 to 14 range.
Title: Re: List of all the debug/monitoring tools
Post by: Levi on July 27, 2014, 08:10:57 am
Gpu lag? Where are you seeing that?
Make sure you have "debug_keys" enabled, then press CTRL+F12 and you should be able to see it next to "FPSs"

Hmmmmmmm... Just to add to the info, with trees maxed, highest lag I saw was 20. It mostly was in the 12 to 14 range.
Did you tried to go down in to the forest at ground level? There's where I get the highest gpu_lag...
Title: Re: List of all the debug/monitoring tools
Post by: HiFlyer on July 27, 2014, 09:28:13 am
Gpu lag? Where are you seeing that?
Make sure you have "debug_keys" enabled, then press CTRL+F12 and you should be able to see it next to "FPSs"

Hmmmmmmm... Just to add to the info, with trees maxed, highest lag I saw was 20. It mostly was in the 12 to 14 range.
Did you tried to go down in to the forest at ground level? There's where I get the highest gpu_lag...

Yup, that was with max trees racing over the ground in UFO mode.

EDIT: The above was a very high speed flyover. At regular speeds it stays locked at 15ms at about 130FPS
Title: Re: List of all the debug/monitoring tools
Post by: Levi on July 27, 2014, 09:45:17 am
Yup, that was with max trees racing over the ground in UFO mode.
Then you obviously have a better GPU than me :D
Title: Re: List of all the debug/monitoring tools
Post by: HiFlyer on July 27, 2014, 09:47:31 am
Yup, that was with max trees racing over the ground in UFO mode.
Then you obviously have a better GPU than me :D

Just a Nvidia 770
Title: Re: List of all the debug/monitoring tools
Post by: Levi on July 27, 2014, 09:55:13 am
Just a Nvidia 770
Well, that's better than my old GTX 550 TI  :D
Comparison between 550Ti and 770 (http://www.hwcompare.com/14654/geforce-gtx-550-ti-vs-geforce-gtx-770/)
Title: Re: List of all the debug/monitoring tools
Post by: Acetone on July 27, 2014, 10:19:56 am
Yup, that was with max trees racing over the ground in UFO mode.
Then you obviously have a better GPU than me :D

Just a Nvidia 770

Just   ::)

Seems like Nvidia's GPUs get a more decent lag. I hope ATI will improve support for OpenGL apps over the time. Their hardware is good but they seriously need to put some efforts on the software side :(

Related : http://richg42.blogspot.co.uk/2014/05/the-truth-on-opengl-driver-quality.html (http://richg42.blogspot.co.uk/2014/05/the-truth-on-opengl-driver-quality.html)
Title: Re: List of all the debug/monitoring tools
Post by: zzz on August 25, 2014, 12:42:20 pm
Alt+c : command console (not the same as "p" key)

Does anyone know any console commands? Like spawning?
Title: Re: List of all the debug/monitoring tools
Post by: Acetone on August 26, 2014, 04:30:59 am
Alt+c : command console (not the same as "p" key)

Does anyone know any console commands? Like spawning?

/set_cloud 1

 ;D

More seriously, I have digged into the HTML and javascript files but haven't find anything like a command list. The Console HTML file just describe the behaviour of the window and the fact that you can write things into it. So it's currently not possible to use it.

BTW, there is a Treegen window in these files. It's probably the remains of the original 3D tree system, it's cool to see they have a fully customizable tool in mind for this part of the engine  :)
If you have installed Outerra in the normal directory, you can acess this tool here: C:/Program Files/Outerra/Anteworld/www/treegen.html (Outerra interface is built in HTML/CSS/Javascript).

Treegen window is interesting too : C:/Program Files/Outerra/Anteworld/www/treegen_window.html
Title: Re: List of all the debug/monitoring tools
Post by: HiFlyer on August 26, 2014, 09:03:23 am
Acetone I re-posted this in the new Outerra forum at avsim, and the mods found it useful enough to make it a sticky!  ;D

http://forum.avsim.net/topic/450211-list-of-outerra-debugmonitoring-tools/ (http://forum.avsim.net/topic/450211-list-of-outerra-debugmonitoring-tools/)
Title: Re: List of all the debug/monitoring tools
Post by: Acetone on August 26, 2014, 05:40:35 pm
Acetone I re-posted this in the new Outerra forum at avsim, and the mods found it useful enough to make it a sticky!  ;D

http://forum.avsim.net/topic/450211-list-of-outerra-debugmonitoring-tools/ (http://forum.avsim.net/topic/450211-list-of-outerra-debugmonitoring-tools/)

Great!
Title: Re: List of all the debug/monitoring tools
Post by: necro on August 27, 2014, 06:56:53 am
The Wiki was missing this information too. So i added them there -> http://xtrac.outerraworld.com/trac.fcgi/wiki/ShortKeys (http://xtrac.outerraworld.com/trac.fcgi/wiki/ShortKeys)
We should add new ShortKeys there, so its one centralized location for information.
Title: Re: List of all the debug/monitoring tools
Post by: cameni on August 27, 2014, 12:29:48 pm
I'll go ahead and throw in some info, even though it's all preliminary.

Code: [Select]
.bind w world
var o = w.create_instance("outerra/mig29/mig29", #(pos 10), #rot, false)
o.enter()

Spawns object 10 meters before the camera and enters it.
#pos, #rot, #dir are macros that provide current camera's positional data, otherwise the arguments expect a coordinates object like {x: ..., y: ..., z: ...} in ECEF for positions.

The console runs javascript, so you can run arbitrary JS code there. There are a few special commands starting with dot:

.bind <var> <interface>Bind Javascript variable to an interface.
.print <expr>Print a JSON-formatted result of expression
.load <script_path>Load and execute script from given path.
.runstable <stmt>Run given statement each frame in which the terrain is fully refined. Used to capture videos without jitter and transient glitches etc.
.stopStop invocation of .runstable

Real console documentation will be mostly about the documentation of (usable) engine interfaces. Since out interfaces are generated, I'll be extending the generator to produce the docs automatically, probably directly in wiki format and publish it there.

Here's another example script we used to capture presentation videos from flight path recorder, to make them fluid and fully refined (since the normal video capture sometimes interferes with rendering). It uses console's own interface that provides functions like pause_time, step_time, capture_screen, capture_frame etc.
If you put it into scripts folder, you'd load and run the scripts as follows:

Code: [Select]
.load scripts/video.js
.runstable video("my_video", 60)
Title: Re: List of all the debug/monitoring tools
Post by: Acetone on August 28, 2014, 11:03:48 am
I was planning to learn Javascript for unrelated projects but seems like it's another good reason to start  :) 
Title: Re: List of all the debug/monitoring tools
Post by: zzz on September 07, 2014, 03:28:01 pm
I'll go ahead and throw in some info, even though it's all preliminary.

Code: [Select]
.bind w world
var o = w.create_instance("outerra/mig29/mig29", #(pos 10), #rot, false)
o.enter()

Spawns object 10 meters before the camera and enters it.

When I try spawning a second mig, it crashes, even with new variables for world and create_instance. Also is there a way to make it spawn an object as a static model instead of a vehicle?
Title: Re: List of all the debug/monitoring tools
Post by: cameni on September 09, 2014, 02:08:07 pm
When I try spawning a second mig, it crashes, even with new variables for world and create_instance. Also is there a way to make it spawn an object as a static model instead of a vehicle?
Must be a bug in last build, because it works normally here.
Static object - just give it the object path. The last argument is permanent - true if the object should be made permanent in the world, applies to static ones.
Title: Re: List of all the debug/monitoring tools
Post by: zzz on September 09, 2014, 05:21:20 pm
What's the format for xyz co-ordinates for #pos or #rot?

tried w.create_instance("outerra/mig29/mig29", #(pos 10, 20, 50), #rot, false) and variations thereof to no avail.
Title: Re: List of all the debug/monitoring tools
Post by: cameni on September 10, 2014, 02:37:58 am
#pos or #(pos distance) are macros that expand to the current world position + distance ahead. Normally you'd write a position vector there, like {x:6000000, y:14124, z:-1135222}. It's in ECEF.
#rot is rotation quaternion of the camera. Entering quaternion manually is the same (it has also w: component), but you'll probably rather want to convert it from Euler angles. Unfortunately there's no vector math library included in javascript, so working with vector operations is clumsy.
Title: Re: List of all the debug/monitoring tools
Post by: M7 on September 16, 2014, 10:18:35 pm
Ctrl+F4 : Recorder

What does it record? Is it recording video in another format? I tried to record something with it but when i hit record, the window close and i see the red dot with the time but i can't reopen that window with ctrl+F4 so i cant stop recording whatever it records.
Title: Re: List of all the debug/monitoring tools
Post by: cameni on September 17, 2014, 01:24:11 am
I think that was used to record vehicles and aircraft and their flight paths, to be replayed later. But it was just a temporary stuff, it should not be accessible there.
Title: Re: List of all the debug/monitoring tools
Post by: zzz on March 16, 2015, 06:42:54 pm
Can any of these commands be executed from within a vehicle's JS file? I'd like to be able to spawn smaller objects from larger ones.
Title: Re: List of all the debug/monitoring tools
Post by: cameni on March 17, 2015, 02:27:12 am
You could query the world interface and call the equivalent methods, but it's not guaranteed to stay supported. We should add methods to spawn objects from within other objects. I guess initially they should be attached to the parent, and then released while inheriting the motion vectors etc.
Title: Re: List of all the debug/monitoring tools
Post by: zzz on March 17, 2015, 07:06:58 am
You could query the world interface and call the equivalent methods,

Could you give an example of that code? Thanks.

And I guess another future request is an option to stop vehicles from automatically resetting to ground level when they're spawned.
Title: Re: List of all the debug/monitoring tools
Post by: cameni on March 17, 2015, 04:51:22 pm
Code: [Select]
var world = this.$query_interface("ot::js::world.get");
var vehicle = world.create_instance("outerra/ddg/ddg", pos, {x:0, y:0, z:0, w:1}, false);

This does not reset vehicles to ground, that's just what the object placer does.
Title: Re: List of all the debug/monitoring tools
Post by: zzz on April 16, 2015, 03:32:12 pm
Sorry to bother you again but how would I execute $con.get_hpr() from a js file?
Title: Re: List of all the debug/monitoring tools
Post by: cameni on April 16, 2015, 04:48:52 pm
From what js file? A vehicle script? Vehicles have this.heading_pitch_roll() function.
Title: Re: List of all the debug/monitoring tools
Post by: zzz on April 16, 2015, 04:55:49 pm
I'm sorry, I meant "get_camera_angles()", though that heading_pitch_roll function is indeed a useful unlisted command.

and, yes from a vehicle script.
Title: Re: List of all the debug/monitoring tools
Post by: cameni on April 16, 2015, 05:09:48 pm
get_camera_angles() returns lat/lon of current camera position. If you want to get lat/lon of a point, you could use the following (returns radians):

Code: [Select]
lon = Math.atan2(p.y, p.x);
lat = Math.atan2(p.z, Math.sqrt(p.x*p.x + p.y*p.y);

If you specifically want the coordinates of the camera, I can't think of a way to get them from vehicle script ... but if you want the angles for the object, you can use the code above with its position.
Title: Re: List of all the debug/monitoring tools
Post by: zzz on April 16, 2015, 05:29:52 pm
I was hoping it had the angles set_camera_angle had but thanks anyway.