Search this blog

11 April, 2011

Tools that I use

Update: I've dropped the "2011" from the title, as I've kept this list more or less up-to-date every time I change a computer.

Other than Visual Studio, Photoshop, Office/Outlook, 3dsMax (/Maya/Modo/...) and Perforce, these are the tools that I always have installed on my development computer.

In strikethrough are tools that I used to install / might still be useful, but don't really rely upon anymore (these might go away as I update the list)

I don't use OSX for development at all, but I use it almost exclusively at home for photography and general computer stuff... So I included a few OSX tools too, even if you won't find as much programming stuff.

A good way of installing software in bulk is to use Ninite. On OSX: ZeroInstall or GetMacApps are alternatives.


The opposite, uninstall, is also best served by some bulk/batch tools: Absolute Uninstaller and for Windows 8+ App Uninstaller.

File tools
  • MUST-HAVE! Everything is by far the tool I use the most. It's life-changing. After installing it I also I limit windows search indexing options only to the start menu and email, as the latter is required by Outlook). Agent Ransack is nice too.
  • MUST-HAVE Beyond Compare is a must for programming. Araxis Merge is also nice to have.
  • Nowadays I'm working more across workstations it's handy to have a faster file copier over the network, I use FastCopy (see http://www.raymond.cc/blog/12-file-copy-software-tested-for-fastest-transfer-speed/) so I can sync Perforce depots (and then use p4 flush) on both machines without going through the p4 server (also, if you have HDD space, use a local p4 proxy, it's nifty!). TeraCopy is similar and has a Mac version too.
  • TreeSize or WinDirStat or similar, but as I don't really need it often, I just get the portable version as needed (OSX: Grand Perspective).
  • MUST-HAVE 7-Zip (OSX: Keka or Zipeg). I found that WinRAR can still be very useful if you need to handle symlinks / hardlinks. Most other compressors don't.
  • TestDisk and Recuva for file recovery.
  • BareTail seems nice.
Coding
  • Visual Studio plugins/extensions
    • MUST-HAVE Extensions (from the VS extension store): Debug Command Line (adds a drop-down that allows to quickly switch between recently used command-lines), Debug Single Thread, Concurrency Visualizer
    • Other minor ones:
    • I used to rely on Visual Assist X (and disabling Intellisense), but nowadays I just use find in files (SSDs!) most of the times...
  • Text editors
    • MUST-HAVE NotePad++ for almost everything (with this HLSL syntax add-on by Pettineo).
    • Markdown editors
      • I still write a lot of plain .txt files, and using markdown gets you some formatting for free. Typora is my choice (OSX too), MarkDeep is nice, Marp can be cute as well (for presentations, there are many other similar ones).
    • LaTeX for publications - I use TexStudio and BasicTeX (a smaller version of MacTeX) on OSX (then manually add packages I need via the command line package manager).
    • Sometimes you need a hex editor (e.g. to open huge files)
  • IDEs.
    • ...Of course, Visual Studio, but you might need stuff for other languages.
    • MUST-HAVE Visual Studio Code is great nowadays (also on OSX)
    • Lua
      • Decoda is a great (now opensource!) IDE if you need one for Lua (which you probably shouldn't).
      • ZeroBrane Studio is good too and integrates a number of game engines (mostly 2d and indie-ish, like Love, Moai, Corona) with a limited "livecoding" support (change of constant parameters)
    • Python
    • C#
      • ILSpy is great, as it is NDepend but I use them rarely as I'm not dealing usually with large C# projects. DotPeek sometimes is handy.
    • For most other things (and for OSX...), JetBrains has an IDE.
  • Everybody in videogames is on P4, but the outside world likes GIT too. 
  • Other development tools:
Graphics and Rendering
  • MUST-HAVE IrfanView is my image viewer. Picturenaut, HDRShop and PTGui for HDR images.
    • OSX Alternatives: Xee
  • VisiPics is the best near-duplicate image finder I've found so far.
  • MUST-HAVE RenderDoc is great, a must! ApiTrace is promising, Intel's GPA is ok too.
  • MUST-HAVE VideoLan (OSX too)
    • Also for screen captures! I just use the desktop capture device and encode a mp4. On OSX, the built-in Quicktime allows do to screen recording.
    • Giffing and ScreenToGif are great for desktop capture too (using webM encoding) Giphy capture works wonders as well (and it's on OSX too)
  • Prototyping
    • MUST-HAVE Processing (also on OSX).
    • MUST-HAVE C-Toy (also on OSX). Quite nifty! Tiny-C-Compiler integrated with some graphic drawing functions and wrapped with a file-monitor so your project live updates. Very useful to quickly test C algorithms!
    • SharpDX
    • Unity3D is great for prototypes!
    • KodeLife for shader experiments. (also on OSX)
  • Other stuff
    • MeshLab for 3d stuff.
    • Marmoset Toolbag and cmftStudio which is somewhat similar, but opensource.
    • I hate Gimp but I do use sometimes the portable version if I don't have Photoshop on a given machine.
    • Blender is good now!
Desktop
  • AutoIt is NIFTY! I use it to craft quick GUIs around command-line tools or to automate GUI tools... It's really nice when you have to do a given thing over and over, and its basic-inspired language makes me nostalgic too. Also, is "portable", which I always prefer. AutoHotKey uses AutoIt scripting, but I didn't use it yet.
  • MUST-HAVE OSX I use Alfred
  • MUST-HAVE Acrobat Reader (even if I should probably prefer the less bloated SumatraPDF, that does not annoy the user with endless updates)
  • ProcrastiTracker... Also for "productivity" I like sometimes to use the "pomodoro technique", I have a kitchen timer on my work desk that seems to work best (I like it being physical and ringing), but ChronoSlider on OSX doesn't seem to suck as well (you'd be surprised how bloated or bad most timer apps are...)
  • System tools
  • SharpKeys if I need to remap some of my keyboard keys. 
    • Some keyboards emit "weird" scancodes (e.g. my wired Apple Italian keyboard) the only program which I've found to be flexible enough to recognize them is KeyTweak.
  • Speaking of using Apple hardware, if you have a laptop and you like your natural scrolling direction on the touchpad, WizMouse can enable that. 
    • By the way, Win 8.1/bootcamp on my MBPr2013 does dragging horribly, but it seems better if you enable the (unrelated!) "tap to click" and "dragging" options in bootcamp. 
    • Trackpad++ is also related but I haven't tried it yet - same people do a number of bootcamp-related apps http://www.forbootcamp.org/
    • MUST-HAVE On OSX when using the external mouse you might want to not use natural scrolling, while keeping it enabled for the trackpad. Scroll Reverser does that!
    • MUST-HAVE This website -might- have more up-to-date AMD GPU drivers for Bootcamp https://www.bootcampdrivers.com/ (but check also the official AMD bootcamp page)
  • Other OSX MUST-HAVE is gSwitch to force integrated GPU only (or discrete only). 
    • Background Music allows to change audio volume per app. 
  • MUST-HAVE Synergy for keyboard/mouse sharing across computers.
  • VirtualBox can be useful and it's free, even if I usually prefer VmWare (sometimes I use the Player with pre-made OS images). 
    • HyperV, included with Windows, can be great too, it's not a bad idea to keep your different work environments in different VMs / drives nowadays, as drive space is not a big deal. On OSX, Parallels is really good.
    • I use Docker for all the times some python library are available on Linux only (e.g. happens for deep neural network stuff...).
  • Command-line / Terminal
    • I love Cathode on OSX. Also on OSX: CoolRetroTerm, which is opensource, but it's not quite as great.
    • MUST-HAVE For OSX, I use Homebrew and Cakebrew.
    • I'm not really a command-line ninja, but I've started adopting it a bit more. I usually install tmux, nnn, tldr, a recent version of nano.
  • Window management various
    • 1Up industries stuff is really good: Fences, Bins (7Stacks is somewhat similar, and free, emulates OSX stacks).
    • SysTools Desktops is a tiny free utility for virtual desktops
    • My own bugfixed version of AnAppADay Jedi Concentrate (a Windows clone of the OSX Think Isolator, Spirited Away is a nice complement to these too, there are clones as well). WindowFX 4 does the same too (and much more)
    • On OSX some people/setups seem to need SmoothMouse to avoid mouse lag
    • There are a lot of other tools that look nifty but I didn't end up using them often... Displayfusion looks neat but I didn't try it yet, the most interesting feature for me is placing a second taskbar with only the applications used on the second monitor there, MultiMon does it for free. A tiling window manager is good if you have a lot of screen space, like WinSplit (OSX alternative: SizeUP)
  • OSX: not a tool, but important, kill the lag in the dock autohide: defaults write com.apple.Dock autohide-delay -float 0
Internet
  • MUST-HAVE Chrome (w/a session manager to not swear if things crash, a tab auto-suspender, and I also disable flash/other plugins auto-start and use the morphine extension at work)
  • MUST-HAVE DropBox (even if I'm thinking to migrate out of it)
  • Google Calendar Sync, if the company doesn't have decent intranet VPN access
  • MUST-HAVE Skype.
    • MUST-HAVE Zoom is GREAT!
  • For home at least I use a free TeamViewer account (join.me is nifty), which I find many times easier/better than setting up UltraVNC. Splashtop looks promising.
Math
  • I still use the PowerToy Calculator (patched to install on Win7/Vista)
  • MUST-HAVE Mathematica (OSX too) if the studio has a license for it (or I make them buy one!)
    • Python Anaconda distribution that I already mentioned
  • GeoGabra can be useful when tinkering with geometrical constructions, it's quite powerful (currently the beta of v5 supports 3d too, and it's available "portable" as well) but slightly more focused on contraints than I'd like (I'd love something very interactive with optional constrained stuff, like a parametric CAD)
    • Some people swear by TikZ (examples), looks extremely cool but it's not interactive...
    • On the simpler side, and 2d only, DrGeo (portable as well) is great to tinker
  • SciLab which I prefer over Octave (that is though more compatible w/MatLab), but nowadays I don't really care about MatLab-like environments, I prefer either Mathematica or SciPy (Anaconda)

06 April, 2011

A different way of generating high-res screenshots

Having a hi-res screenshot tool in a game, even if you don't ship a "photo mode" to the user, is very common for marketing purposes (posters and so on). Now what I see commonly done for such things is to have a tiling renderer, that's to say, render the same scene multiple times, each time writing out a portion of the final screenshot. That's done because GPUs have limits in terms of rendering sizes and often the memory needed to store intermediate buffers is simply not there (especially if you're shipping on consoles).

The tiling strategy often results in being a pain for two reasons: first, you have to scale all pixel-based effects in order not to shrink in the final screenshot*, second, tiles create non symmetric frustums that are tricky to handle, as assuming a symmetric frustum ends up allowing simpler equations in a few places (i.e. in shaders that go from the z-buffer to view space and back).

So here it is a recipe for a different screenshot tool. 1... 2... 3...

Instead of generating N tiles, shift your viewport (yes, as in the viewport matrix) of a fraction of a pixel N times (in a grid fashion). Then instead of collating the tiles next to each other, take each generated image and interleave the samples, like this:

Four two-by two images. Image one has no shift, image two is shifted by half a pixel on the x, image 3 is shifted by half a pixel on the y, image 4 is shifted by half a pixel on x and y
11 22
11 22

33 44
33 44


High-res result:
1212
1212
3434
3434

Done!
...

Ok... not quite! I lied. Did you spot the error? A hint... pixel footprint...

Each image will cover one quarter of the scene in the final image, but the GPU does not really know. It will still generate all derivatives as if it was not a high-resolution image, thus all the mipmaps will be wrong in the final image (too blurry). The solution there is to mipbias all your samplers (it should be easy, in your material system probably there is only a point where the textures of a given material are bound), or even more easily just set the maximum mip level to be zero, as usually very high res screenshots will hit the top mip anyways.

Done!

Erhm... I lied again! Sort-of. This method does indeed work, but it's still not correct. We're shifting the view, it means that our images do not share the same view center, so we're not using a pinhole camera anymore (or well, we made that pinhole non infinitesimal). In pratice this is not a big deal, even if it can still screw some math (in a couple of SSAO implementations I've worked with, I had to disable the shift when generating the AO map). Of course, to be correct, we should rotate the camera...

Or should we? Ok enough toying. Rotating the camera is better but still not 100% right, as now we're also slightly rotating the near and far planes for each image. Again, it's not something noticeable, but in the end to be entirely correct we should maintain the near and far straight, and that will lead again to non-symmetric frustums (even if only a tiny bit).

Of course, once you have any method to generate high res screenshots, it's easy to do many more cool tricks, like accumulating images to simulate DOF and motion blur and antialiasing, rendering soft shadows and so on.

Note: * you'll still need to have such functionality if you're shipping a PC title that can do different resolutions. And it's quite a pain, because if you just express all your screenspace effects in relative units instead of pixels you get the right "size" of the effect, but you will also have less dense samples, and thus not really scale the quality with the resolution. Many effects will actually look worse (aliasing artifacts, i.e. in a bloom we can get shimmering), others do rely on accessing neighboring pixels (think about fast Gaussian filters that leverage the bilinear interpolation between samples).

04 April, 2011

Please NVidia...

If you don't care about maintaining FX Composer, at least open source it!

03 April, 2011

Mine your Data!

Some simple ideas:
  1. Add to your bug tracking two compulsory fields to be filled (choosing from a list) when closing a bug: where it was found (AI, Rendering, Loading etc...) and what caused it (Incorrect API usage, corner case not handled, memory stomp, wrong algorithm, variable not properly initialized, invariants not enforced and so on). Soon you'll see what parts require rewriting, what need unit testing, automated tests and so on.
  2. Give testers a build connected to a sampling profiler. Sample. Diff the profiled function list with the list of functions in your symbols file. Voila', cheap coverage analysis. Now we know which code to delete!
  3. Install automatic time tracking tools, like this one. Anonymously gather data about your project (be nice). At the end, you'll know how much time was spent in which area (much better than measuring the number of changes or check-ins or so). So we'll know which things are better to be moved into a scripting language, or into a dynamically loadable module!
  4. It's also a good idea to keep track of the CPU time of some key processes, like your compiler, linker, the time your VCS spends in networking operations and so on. Unfortunately I don't know any program that does that on windows and I ended up writing a simple one a year ago to prove we were spending too much time waiting for linking.
  5. Do you have a in-game telemetry? Are you not using it internally on testers machines to gather data (memory usage, FPS and so on). Shame on you!
What other data are you mining? Comment!