What is the best way to blend two normal maps together? Why can’t I just add two normal maps together in Photoshop? I heard that to combine two normals together, you need to add the positive components and subtract the negative components, then renormalize. Looks right to me… Why shouldn’t I be using Overlay (or a series of Photoshop blend modes) to blend normal maps together? I want to add detail to surfaces. How does one combine normal maps in real-time so that the detail normal map follows the topology described by the base normal map?
Needless to say that from one software project to another, compile times vary greatly. When debugging we often spend a significant amount of time changing some lines of code, recompiling, waiting and then relaunching the software. While it is true that one has to change their debugging “style” from one project to another (i.e. having a thorough understanding of the problem before “poking around” code is definitely a plus when dealing with big code bases where edit-and-continue is not possible), waiting for the compiler and linker when debugging is never fun. It’s also very unproductive.
In parallel, some of the tools we use everyday allow us to greatly improve our debugging efficiency, though sometimes we are completely oblivious to the power that is available to us. Regardless of how fast or slow compile and link times are on your current project, any tools that can mitigate the recompile cycle when debugging are welcome. One such tool is Visual Studio’s tracepoint: a breakpoint with a custom action associated to it.
Every once in a while you stumble onto a tool that makes your life (as a software developer) so much easier. What’s even better is when the tool is so great that you can’t (or really hard to) work without it anymore! Over the years, many have fallen into this category. I recall when I was first introduced to Whole Tomato Software’s Visual Assist X and Perforce (coming from the pre-changelist era SCMs): it was hard to even consider working on a project without the latter (especially side projects at home – luckily these are affordable/available for home/side projects). So many people have made so many great add-ons for current IDEs and external tools, finding some that suit your code poet style will definitely make your life easier.
This new addition to my list of must-haves is called RockScroll:
Developed by Rocky Downs from Microsoft and publicly released by Scott Hanselman, Rockscroll is an add-on for Microsoft’s Visual Studio which replaces the scroll bar with a zoomed-out/graphic view of the file you’re currently editing. Acting as a graphic replacement to the default scroll bar, the current section of code you’re editing is highlighted, allowing you to quickly identify where you’re positioned in that file. This is especially useful for big files in which you keep scrolling from section to section. As you work, you will recognize the various sections from the zoomed-out image/bar (i.e. sections of comments, big blocks of code, etc), and instinctively jump to them as you progress with your modifications. Additionally, the bar will update itself and show supplementary information as required. For example, if you double-click on a word or variable, it will highlight all the other sections of code that have that same word/variable. Also, RockScroll will show differences in color based on saved/unsaved code.
RockScroll is free and available here.
In parallel, Mihnea Balta has released an open-source and improved version: MetalScroll. Here are some of the improvements, taken from the Google Code page where this nifty variation resides:
- double-clicking the scrollbar brings up an options dialog where the color scheme and various other things can be configured.
- the width of the scrollbar is configurable.
- the widget at the top of the scrollbar which splits the editor into two panes is still usable when the add-in is active.
- you must hold down ALT when double-clicking a word to highlight all its occurrences in the file. RockScroll highlights words on regular double-click, which can be annoying when you actually meant to use drag&drop text editing, for example when dragging a variable to the watches window. People who prefer the old behavior can disable this in the options dialog.
- pressing ESC clears the highlight markers.
- lines containing highlighted words are marked with 5×5 pixel blocks on the right edge of the scrollbar, to make them easier to find (similar to breakpoints and bookmarks).
- multiline comments are recognized.
- hidden text regions and word wrapping are supported.
- it works in split windows.
- middle-clicking the scrollbar shows a preview of the code around the clicked line
- it’s open source, so people who want to change stuff or add features can do so themselves.
Whether you settle for the original RockScroll or the improved MetalScroll, you will never want to code without these ever again. Luckily, both are free, so you should definitely check them out, and see which one you prefer.
Happy coding, and Happy Holidays 🙂