(→Configuring bug plug) |
|||
| Line 133: | Line 133: | ||
The ''Bugplug.Capture.FilenameFormat'' key gives the format of the screenshot picture names. When you add the scrshot000.png format, the bug plug will saves your screenshots with this naming form (scrshot000,png, scrshot001.png) . The Bugplug.Capture.Image.MIME = image/png key stores the format of the screenshots. You can change it az any image format, that Crystal Space can handle (jpg, tga, bmp, etc). | The ''Bugplug.Capture.FilenameFormat'' key gives the format of the screenshot picture names. When you add the scrshot000.png format, the bug plug will saves your screenshots with this naming form (scrshot000,png, scrshot001.png) . The Bugplug.Capture.Image.MIME = image/png key stores the format of the screenshots. You can change it az any image format, that Crystal Space can handle (jpg, tga, bmp, etc). | ||
| - | The second config file has the name bugplug.key. There is a simple text file, here is the content: | + | The second config file has the name bugplug.key. There is a simple text file, here is the (default) content: |
| - | + | ||
| + | <pre> | ||
ctrl-d=debugenter | ctrl-d=debugenter | ||
| - | |||
ctrl-s=mouseenter | ctrl-s=mouseenter | ||
| - | |||
d=dumpeng | d=dumpeng | ||
| - | |||
shift-d=dumpsec | shift-d=dumpsec | ||
| - | |||
e=edges | e=edges | ||
| - | |||
c=clear | c=clear | ||
ctrl-shift-c=colorsectors | ctrl-shift-c=colorsectors | ||
| - | |||
alt-c=cacheclear | alt-c=cacheclear | ||
| - | |||
alt-d=cachedump | alt-d=cachedump | ||
t=texture | t=texture | ||
| - | |||
l=lighting | l=lighting | ||
| - | |||
shift-g=gouraud | shift-g=gouraud | ||
| - | |||
shift-m=mmx | shift-m=mmx | ||
| - | |||
shift-t=transp | shift-t=transp | ||
| - | |||
ctrl-b=bilinear | ctrl-b=bilinear | ||
| - | |||
ctrl-t=trilinear | ctrl-t=trilinear | ||
| - | |||
ctrl-l=ilace | ctrl-l=ilace | ||
| - | |||
m=mipmap | m=mipmap | ||
| - | |||
shift-i=inter | shift-i=inter | ||
| - | |||
g=gamma | g=gamma | ||
| - | |||
alt-b=dblbuff | alt-b=dblbuff | ||
| - | |||
shift-c=dumpcam | shift-c=dumpcam | ||
| - | |||
f=fov | f=fov | ||
| - | |||
shift-f=fovangle | shift-f=fovangle | ||
| - | |||
alt-t=terrvis | alt-t=terrvis | ||
| - | |||
b=meshbbox | b=meshbbox | ||
| - | |||
r=meshrad | r=meshrad | ||
| - | |||
ctrl-alt-c=meshcd | ctrl-alt-c=meshcd | ||
| - | |||
ctrl-alt-v=meshvis | ctrl-alt-v=meshvis | ||
| - | |||
ctrl-alt-s=meshshad | ctrl-alt-s=meshshad | ||
| - | |||
ctrl-alt-b=meshbase | ctrl-alt-b=meshbase | ||
| - | |||
ctrl-g=debuggraph | ctrl-g=debuggraph | ||
| - | |||
ctrl-c=enginecmd toggle_cullstat | ctrl-c=enginecmd toggle_cullstat | ||
| - | |||
shift-e=enginestate | shift-e=enginestate | ||
| - | |||
v=visculview | v=visculview | ||
| - | |||
shift-v=visculcmd cycle_view | shift-v=visculcmd cycle_view | ||
| - | |||
ctrl-v=visculcmd clear_stats | ctrl-v=visculcmd clear_stats | ||
| - | |||
alt-v=visculcmd dump_state | alt-v=visculcmd dump_state | ||
| - | |||
alt-a=visculcmd analyze_vis | alt-a=visculcmd analyze_vis | ||
| - | |||
1=visculcmd toggle_frustum | 1=visculcmd toggle_frustum | ||
| - | |||
2=visculcmd toggle_coverage | 2=visculcmd toggle_coverage | ||
| - | |||
3=visculcmd toggle_history | 3=visculcmd toggle_history | ||
| - | |||
4=visculcmd toggle_queue | 4=visculcmd toggle_queue | ||
| - | |||
5=visculcmd toggle_vpt | 5=visculcmd toggle_vpt | ||
| - | |||
6=visculcmd toggle_ignoresmall | 6=visculcmd toggle_ignoresmall | ||
| - | |||
7=visculcmd toggle_clampoccluder | 7=visculcmd toggle_clampoccluder | ||
| - | |||
8=visculcmd toggle_splatting | 8=visculcmd toggle_splatting | ||
| - | |||
9=visculcmd toggle_invertedclipper | 9=visculcmd toggle_invertedclipper | ||
| - | |||
0=visculcmd toggle_ignorebadoccluder | 0=visculcmd toggle_ignorebadoccluder | ||
| - | |||
shift-1=visculcmd origin_z -- | shift-1=visculcmd origin_z -- | ||
| - | |||
shift-2=visculcmd origin_z ++ | shift-2=visculcmd origin_z ++ | ||
| - | |||
shift-3=visculcmd setup_debugsector | shift-3=visculcmd setup_debugsector | ||
| - | |||
shift-4=visculcmd navigate_child1 | shift-4=visculcmd navigate_child1 | ||
| - | |||
shift-5=visculcmd navigate_child2 | shift-5=visculcmd navigate_child2 | ||
| - | |||
shift-6=visculcmd navigate_parent | shift-6=visculcmd navigate_parent | ||
| - | |||
shift-s=debugsector | shift-s=debugsector | ||
| - | |||
shift-up=mesh_yplus | shift-up=mesh_yplus | ||
| - | |||
shift-down=mesh_ymin | shift-down=mesh_ymin | ||
| - | |||
shift-left=mesh_xmin | shift-left=mesh_xmin | ||
| - | |||
shift-right=mesh_xplus | shift-right=mesh_xplus | ||
| - | |||
shift-pgup=mesh_zplus | shift-pgup=mesh_zplus | ||
| - | |||
shift-pgdn=mesh_zmin | shift-pgdn=mesh_zmin | ||
| - | |||
up=ds_forward | up=ds_forward | ||
| - | |||
down=ds_backward | down=ds_backward | ||
| - | |||
left=ds_turnleft | left=ds_turnleft | ||
| - | |||
right=ds_turnright | right=ds_turnright | ||
| - | |||
alt-up=ds_up | alt-up=ds_up | ||
| - | |||
alt-down=ds_down | alt-down=ds_down | ||
| - | |||
alt-left=ds_left | alt-left=ds_left | ||
| - | |||
alt-right=ds_right | alt-right=ds_right | ||
| - | |||
alt-s=debugview | alt-s=debugview | ||
| - | |||
s=visculcmd setup_debugview | s=visculcmd setup_debugview | ||
| - | |||
alt-f=visculcmd toggle_freeze | alt-f=visculcmd toggle_freeze | ||
| - | |||
ctrl-f=visculcmd exact_freeze | ctrl-f=visculcmd exact_freeze | ||
| - | |||
f10=savemap | f10=savemap | ||
| - | |||
ctrl-f10=savemap | ctrl-f10=savemap | ||
| - | |||
f11=scrshot | f11=scrshot | ||
| - | |||
ctrl-f11=scrshot | ctrl-f11=scrshot | ||
| - | |||
shift-f11=uberscreenshot | shift-f11=uberscreenshot | ||
| - | |||
f12=scrshot | f12=scrshot | ||
| - | |||
ctrl-f12=scrshot | ctrl-f12=scrshot | ||
| - | |||
ctrl-alt-p=fps | ctrl-alt-p=fps | ||
| - | |||
h=hideselected | h=hideselected | ||
| - | |||
shift-h=undohide | shift-h=undohide | ||
| - | |||
ctrl-p=counterreset | ctrl-p=counterreset | ||
| - | |||
alt-p=counterremove | alt-p=counterremove | ||
| - | |||
shift-p=counterfreeze | shift-p=counterfreeze | ||
| - | |||
w=shadowdebug | w=shadowdebug | ||
| - | |||
alt-u=unprepare | alt-u=unprepare | ||
| - | |||
ctrl-m=memorydump | ctrl-m=memorydump | ||
| - | |||
p=profdump | p=profdump | ||
| - | |||
ctrl-shift-p=profreset | ctrl-shift-p=profreset | ||
| - | |||
ctrl-shift-s=debugcmd iGraphics3D dump_slms | ctrl-shift-s=debugcmd iGraphics3D dump_slms | ||
| - | |||
ctrl-shift-v=debugcmd iGraphics3D dump_vbostat | ctrl-shift-v=debugcmd iGraphics3D dump_vbostat | ||
| - | |||
ctrl-shift-f=debugcmd iGraphics2D dump_fontcache | ctrl-shift-f=debugcmd iGraphics2D dump_fontcache | ||
| - | |||
ctrl-shift-z=debugcmd iGraphics3D dump_zbuf | ctrl-shift-z=debugcmd iGraphics3D dump_zbuf | ||
| - | |||
ctrl-shift-1=switchculler crystalspace.culling.frustvis | ctrl-shift-1=switchculler crystalspace.culling.frustvis | ||
| - | |||
ctrl-shift-2=switchculler crystalspace.culling.dynavis | ctrl-shift-2=switchculler crystalspace.culling.dynavis | ||
| - | |||
ctrl-alt-m=selectmesh | ctrl-alt-m=selectmesh | ||
| - | |||
ctrl-alt-o=onesector | ctrl-alt-o=onesector | ||
| - | |||
ctrl-alt-l=listplugins | ctrl-alt-l=listplugins | ||
| + | </pre> | ||
So you can change the key bindings of the debug commands here. | So you can change the key bindings of the debug commands here. | ||
I hope, this short introduction help you to understand the basics of the usage of bug plug. Just press ''ctrl+D'', and enjoy it. | I hope, this short introduction help you to understand the basics of the usage of bug plug. Just press ''ctrl+D'', and enjoy it. | ||
Revision as of 05:58, 15 February 2007
Contents |
Using bug plug
The bug plug is a great feature is CS, you can easily debug your 3d world. You can use it in your own the same way, like any other plugin, you need it load and register.
So start walktest, the castle map will be perfecto our lessons. When walktest loads everything
,type it into the walktest console:
bugplug
This will load the bug plugin.
When bug plug is loaded, we’re ready to use it.
How it works
The bug plug is in action, when you see the current fps down on the screen:
But bug plug can do more.
First, you have to press the ctrl+D keys, and you will see this message:
Now push ‘e’ key, and you will see something like this:
So the bug plug shows you the wireframe of the rendered meshes. Nice.
You can always take a screenshot when press ctrl+D, and F11. The bug plug saves the screenshot in png format into your CS directory (by default, this can be changed) . The first image will be named crystalspace000.png, then crystalspace001.png etc. The plugin handles the correct numbering automatically, so be not afraid, you never rewrite your previously saved screenshots. When you need a really high resolution screenshot (an “überscreenshot”), press ctrl+D then shift+F11. It will make a 2048*1536 screenshot, I hope, this satisfy your needs.
Working with meshes
When you press ctrl+s, you can select meshes with mouse click. Just try it, press ctrls+s, and click on a simphatic mesh. The result will be something like this:
You can select any mesh in the loaded map file. The following example uses the castle map. Run walktest, then do the following:
Go to the table in the castle level:
Now press ctrl+s, and click on the table. The result will be something, like this:
Now we can move this mesh with some bug plug key. Press ctrl+D, then shift+Page up keys. The mesh will move 1 unit in Z direction (Z coordinate will be greater by one).
The other moving keys are:
shift+Up increase y coordinate by 1 unit
shfit+Down decrease_y coordinate by 1 unit
shift+Left decrease_x coordinate by 1 unit
shift+Right increase_x coordinate by 1 unit
shift+ Page Up increase _z coordinate by 1 unit
Shift+ Page down decrease z coordinate by 1 unit
Note, you can save the changes by pressing ctrl+D then ctrl+F10 keys.
You can hide your selected mesh with the ‘h ‘ debug key: (press ctrl+D, then ‘h’ key):
To undo hide, press shift+h after ctrl+D.
Now go right to the flaming torches:
Press ctrl+S, then click on the torch. The result will be something, like this:
See around, you will see, you selected a great box, that includes four torches. Now when you press ctrl+D, then ctrl+alt+C, you will see the colliding triangles:
So you can see, the four torches have been exported by one mesh.
Other possibilities
Bug plug can you show any sector with another colour. Press ctrl+D, then ctrl+shift+C, and you will see something, like this (the shot was taken form a point, where three sector is visible):
You can edit the camera field of view value. Press f key, then type a new value.
The b key enables/disables the bounding box display, r does the same with the radial meshes.
Configuring bug plug
Bug plug has two configuration file in the CS/data/config directory. The bugplug.cfg contents the following lines:
; file, where the key bindings are stored Bugplug.Keybindings = /config/bugplug.key ; format of the screenshot filename ; the rightmost string of digits is automatically replaced with a number Bugplug.Capture.FilenameFormat = /this/crystal000.png ; MIME type of the screenshot image to save Bugplug.Capture.Image.MIME = image/png ; image saver options for the screenshot file Bugplug.Capture.Image.Options = progressive
The Bugplug.Capture.FilenameFormat key gives the format of the screenshot picture names. When you add the scrshot000.png format, the bug plug will saves your screenshots with this naming form (scrshot000,png, scrshot001.png) . The Bugplug.Capture.Image.MIME = image/png key stores the format of the screenshots. You can change it az any image format, that Crystal Space can handle (jpg, tga, bmp, etc).
The second config file has the name bugplug.key. There is a simple text file, here is the (default) content:
ctrl-d=debugenter ctrl-s=mouseenter d=dumpeng shift-d=dumpsec e=edges c=clear ctrl-shift-c=colorsectors alt-c=cacheclear alt-d=cachedump t=texture l=lighting shift-g=gouraud shift-m=mmx shift-t=transp ctrl-b=bilinear ctrl-t=trilinear ctrl-l=ilace m=mipmap shift-i=inter g=gamma alt-b=dblbuff shift-c=dumpcam f=fov shift-f=fovangle alt-t=terrvis b=meshbbox r=meshrad ctrl-alt-c=meshcd ctrl-alt-v=meshvis ctrl-alt-s=meshshad ctrl-alt-b=meshbase ctrl-g=debuggraph ctrl-c=enginecmd toggle_cullstat shift-e=enginestate v=visculview shift-v=visculcmd cycle_view ctrl-v=visculcmd clear_stats alt-v=visculcmd dump_state alt-a=visculcmd analyze_vis 1=visculcmd toggle_frustum 2=visculcmd toggle_coverage 3=visculcmd toggle_history 4=visculcmd toggle_queue 5=visculcmd toggle_vpt 6=visculcmd toggle_ignoresmall 7=visculcmd toggle_clampoccluder 8=visculcmd toggle_splatting 9=visculcmd toggle_invertedclipper 0=visculcmd toggle_ignorebadoccluder shift-1=visculcmd origin_z -- shift-2=visculcmd origin_z ++ shift-3=visculcmd setup_debugsector shift-4=visculcmd navigate_child1 shift-5=visculcmd navigate_child2 shift-6=visculcmd navigate_parent shift-s=debugsector shift-up=mesh_yplus shift-down=mesh_ymin shift-left=mesh_xmin shift-right=mesh_xplus shift-pgup=mesh_zplus shift-pgdn=mesh_zmin up=ds_forward down=ds_backward left=ds_turnleft right=ds_turnright alt-up=ds_up alt-down=ds_down alt-left=ds_left alt-right=ds_right alt-s=debugview s=visculcmd setup_debugview alt-f=visculcmd toggle_freeze ctrl-f=visculcmd exact_freeze f10=savemap ctrl-f10=savemap f11=scrshot ctrl-f11=scrshot shift-f11=uberscreenshot f12=scrshot ctrl-f12=scrshot ctrl-alt-p=fps h=hideselected shift-h=undohide ctrl-p=counterreset alt-p=counterremove shift-p=counterfreeze w=shadowdebug alt-u=unprepare ctrl-m=memorydump p=profdump ctrl-shift-p=profreset ctrl-shift-s=debugcmd iGraphics3D dump_slms ctrl-shift-v=debugcmd iGraphics3D dump_vbostat ctrl-shift-f=debugcmd iGraphics2D dump_fontcache ctrl-shift-z=debugcmd iGraphics3D dump_zbuf ctrl-shift-1=switchculler crystalspace.culling.frustvis ctrl-shift-2=switchculler crystalspace.culling.dynavis ctrl-alt-m=selectmesh ctrl-alt-o=onesector ctrl-alt-l=listplugins
So you can change the key bindings of the debug commands here.
I hope, this short introduction help you to understand the basics of the usage of bug plug. Just press ctrl+D, and enjoy it.













