Difference between revisions of "Artist Debug Mode"

(Update and refresh page)
Line 1: Line 1:
From version 0.7.1 on, SuperTuxKart contains a hidden track debugging mode packed with features to make it easier for artists to make tracks.
+
SuperTuxKart includes a hidden "Artist Debug Mode" with a variety of features to help artists solve problems with their tracks more easily. Artist Debug Mode includes special rendering views and other features both for artists and developers.
  
Before starting, let me remind you that there is a feature always enabled to let you start directly into a track, so that you don't need to go through the menus everytime. Simply launch STK from terminal with
+
Running SuperTuxKart from the command line can also provide useful insight in debugging a track in the terminal output.
  
<pre>
+
== Enabling Artist Debug Mode ==
supertuxkart -N -t trackname
 
</pre>
 
  
where "trackname" is the name of the directory your track is in.
+
When STK is closed, open the STK config file. (See the [[FAQ]] question "Where is the configuration stored?")
  
Furthermore, if you encounter problems, make sure to '''run Supertuxkart from a terminal''', there you may be able to see error messages related to your track.
+
Locate the line that reads
 +
 
 +
{{Popup-code
 +
|content=<nowiki><!-- Whether to enable track debugging features -->
 +
<artist_debug_mode value="false" /></nowiki>
 +
}}
 +
 
 +
and change it to
 +
 
 +
{{Popup-code
 +
|content=<nowiki><!-- Whether to enable track debugging features -->
 +
<artist_debug_mode value="true" /></nowiki>
 +
}}
 +
 
 +
== Features  ==
 +
 
 +
{{Popup-warning|content=Many of the tools listed below use keyboard bindings. Of course you will need to make sure your keyboard configuration does not assign these keys to something else if you wish to be able to use them. Other features (as noted) use the debug menu, which is available on any screen by right-clicking.}}
 +
 
 +
=== Track Layout Debugging ===
  
== Enabling the debug mode ==
+
* Flying: karts may be instantly turned into flying objects. This is quite useful to take a closer look at meshes that aren't too visible from the road, or to skip large portions of a track to go straight to the area you're interested in.
 +
** I: fly up
 +
** K: fly down
 +
* If there is no ground under the area where karts start, normally STK will print an error message on the terminal and abort; in debug mode, however, the kart will just hover so you can see what the problem is.
 +
* First person camera (available in debug menu): Fly around the map with WASD and rotate the camera with Q and E. Use a mouse to control your direction. There's also a smooth version which damps your movements, which can be adjusted in the config file of SuperTuxKart.
 +
* No Ready-Set-Go: To speed up testing your track, in Artist Debug Mode, when you play alone against no opponent, the ready/set/go messages are skipped very quickly.
  
When STK is closed, open the STK config file.
+
=== Kart/AI Debugging ===
* On '''Windows''': It is in %APPDATA%/supertuxkart/0.8.2 (you can enter that in the Explorer and it will take you there)
 
* On '''Linux''': Either in $XDG_CONFIG_HOME/supertuxkart/0.8.2 (first choice), ~/.config/supertuxkart/0.8.2 (second choice) or in ~/.supertuxkart/0.8.2 (third choice).
 
* On '''Mac OS X''': It is in ~/Library/Application Support/supertuxkart/0.8.2. Note that this directory may be hidden.
 
You can also watch the output in the terminal to see if there is a note on where the config files are stored or search for a file called "config.xml".
 
  
 +
* Debug checklines: Launch SuperTuxKart from the command line with <code>'''--check-debug'''</code>, and you will visually see where checklines are; active checklines will appear as red, inactive ones as white; and information about which kart crosses which checkline will be printed on the terminal.
 +
* <code>'''--track-debug'''</code> will enable you to see where drivelines are.
 +
* It is possible to set 0 laps in the race setup screen. This is useful for testing kart animations.
  
Locate the line that reads
+
=== Graphics Debugging ===
  
    <!-- Whether to enable track debugging features -->
+
* Reload Textures (available in debug menu): This allows you to reload textures on-the-fly, including gloss, alpha, and normal maps, making it much easier to see how a gloss map will look in-game.
    <artist_debug_mode value="false" />
+
* Frames Per Second (available in debug menu): Click "Toggle FPS" to show frames per second, polycount, etc. in-game.
 +
* Adjust Lights/Adjust values (available in debug-menu): You can adjust the values for red, green, blue, energy and radius of the light nearest to the kart (nitro emitters and other invisible lights are skipped) and see the effect immediately. This also applies to the sun (if no other light is closer) to easily find the right color for your sun.
  
and change it to
+
=== Physics Debugging ===
  
    <!-- Whether to enable track debugging features -->
+
* Physics debug (in debug menu under '''Graphics'''): This shows the edges and normals of some meshes.
    <artist_debug_mode value="true" />
+
* Normals view (in debug menu under '''Graphics'''): This shows all normals of all meshes except animated ones. However, it hides all textures.
  
== Features  ==
+
=== Camera Effects ===
  
'''Note''': Many of the tools listed below use keyboard bindings. Of course you will need to make sure your keyboard configuration does not assign these keys to something else if you wish to be able to use them.
+
* Alternative camera views (available in debug menu, under GUI)
 +
** Top view
 +
** Behind wheel view (more like below and behind kart view)
 +
** Behind kart view
 +
** Side of kart view
 +
* Toggle GUI (available in debug menu, under GUI): Hide the racing GUI, for screenshots, etc.
 +
* Hide karts (available in debug menu, under GUI) (Note: '''not''' a toggle; you will have to quit the race and restart to make the karts reappear.)
 +
* Change camera target (available in debug menu)
  
* If there is no ground under the area where karts start, normally STK will print an error message on the terminal and abort; in debug mode, however, the kart will just hover so you can see what the problem is
+
=== Items & Attachments ===
* You can now select "0 laps" in the race setup; useful to test kart animations
 
* More precise polygon count is displayed when "show FPS" is enabled
 
* You can get into 3-strikes battle mode in single-player mode (useful to test battle arenas)
 
* Flying: karts may be instantly turned into flying objects. This is quite useful to take a closer look at meshes that aren't too visible from the road, or to skip large portions of a track to go straight to the area you're interested in.
 
** I: fly up (press repeatedly if needed)
 
** K: fly down (press repeatedly if needed)
 
* Debug checklines: Launch supertuxkart from the terminal with '''--check-debug''', and you will visually see where checklines are; active checklines will appear as red, inactive ones as white; and information about which kart crosses which checkline will be printed on the terminal.
 
** Also '''--track-debug''' will enable you to see where the drivelines are
 
* No Ready/Set/Go: To speed up testing your track, in artist debug mode, when you play alone against no opponent, the ready/set/go messages are skipped very quickly
 
* In-game debug menu (see next section)
 
  
== In-Game Debug Menu ==
+
You can give yourself limitless items through the '''Items''' submenu. The '''Attachments''' submenu provides options for things like parachutes and anchors (called anvils in-game).
By right clicking somewhere in the STK window, you can open the debug menu. Beside some features only usefull for debugging or other developer tasks, there are also some features just for artist:
 
* Powerups at will: Nitro and zippers are especially helpful in order to quickly get to an area far from the start
 
* Hide karts and race GUI: This is especially useful when you need to take the screenshot of your track, to get all annoyances out of the way
 
* Debug views: You can cycle through several rendering and physics debug draw modes. Render debug views will show intermediate render steps, like the normals or lights buffers. Physics views will show the physics data being used in STK (including the faces and normals).
 
* A different viewpoint: Launch SuperTuxKart from the terminal with <tt>--camera-debug</tt> or select "Top view" from the menu, the camera will be placed from above, allowing you to see what's going on from a different perspective
 
* [STK 0.8.2] First person camera: Fly around the map with WASD and rotate the camera with Q and E. There's also a smooth version which damps your movements. The damping can be adjusted in the config file of SuperTuxKart
 
* [STK 0.8.2] Adjust Lights: You can adjust the values for red, green, blue, energy and radius of the light nearest to the kart (nitro emitters and other invisible lights are skipped) and see the effect immidiately
 

Revision as of 21:21, 30 December 2016

SuperTuxKart includes a hidden "Artist Debug Mode" with a variety of features to help artists solve problems with their tracks more easily. Artist Debug Mode includes special rendering views and other features both for artists and developers.

Running SuperTuxKart from the command line can also provide useful insight in debugging a track in the terminal output.

Enabling Artist Debug Mode

When STK is closed, open the STK config file. (See the FAQ question "Where is the configuration stored?")

Locate the line that reads


and change it to


Features

Track Layout Debugging

  • Flying: karts may be instantly turned into flying objects. This is quite useful to take a closer look at meshes that aren't too visible from the road, or to skip large portions of a track to go straight to the area you're interested in.
    • I: fly up
    • K: fly down
  • If there is no ground under the area where karts start, normally STK will print an error message on the terminal and abort; in debug mode, however, the kart will just hover so you can see what the problem is.
  • First person camera (available in debug menu): Fly around the map with WASD and rotate the camera with Q and E. Use a mouse to control your direction. There's also a smooth version which damps your movements, which can be adjusted in the config file of SuperTuxKart.
  • No Ready-Set-Go: To speed up testing your track, in Artist Debug Mode, when you play alone against no opponent, the ready/set/go messages are skipped very quickly.

Kart/AI Debugging

  • Debug checklines: Launch SuperTuxKart from the command line with --check-debug, and you will visually see where checklines are; active checklines will appear as red, inactive ones as white; and information about which kart crosses which checkline will be printed on the terminal.
  • --track-debug will enable you to see where drivelines are.
  • It is possible to set 0 laps in the race setup screen. This is useful for testing kart animations.

Graphics Debugging

  • Reload Textures (available in debug menu): This allows you to reload textures on-the-fly, including gloss, alpha, and normal maps, making it much easier to see how a gloss map will look in-game.
  • Frames Per Second (available in debug menu): Click "Toggle FPS" to show frames per second, polycount, etc. in-game.
  • Adjust Lights/Adjust values (available in debug-menu): You can adjust the values for red, green, blue, energy and radius of the light nearest to the kart (nitro emitters and other invisible lights are skipped) and see the effect immediately. This also applies to the sun (if no other light is closer) to easily find the right color for your sun.

Physics Debugging

  • Physics debug (in debug menu under Graphics): This shows the edges and normals of some meshes.
  • Normals view (in debug menu under Graphics): This shows all normals of all meshes except animated ones. However, it hides all textures.

Camera Effects

  • Alternative camera views (available in debug menu, under GUI)
    • Top view
    • Behind wheel view (more like below and behind kart view)
    • Behind kart view
    • Side of kart view
  • Toggle GUI (available in debug menu, under GUI): Hide the racing GUI, for screenshots, etc.
  • Hide karts (available in debug menu, under GUI) (Note: not a toggle; you will have to quit the race and restart to make the karts reappear.)
  • Change camera target (available in debug menu)

Items & Attachments

You can give yourself limitless items through the Items submenu. The Attachments submenu provides options for things like parachutes and anchors (called anvils in-game).