Tuesday 25 March 2014

Notepad ++ tips.

You can already find this elsewhere on the internet but this post just means there’ll be one more source that might help someone find the info. (Plus it’s a note to self.)

So. I wanted two things to get done in notepad ++: 
  • Modify an existing colour theme.
  • Set the default language to C++ for certain files types.

Modify an existing colour theme.

Go to the Settings menu > Style Configurator.
In the upper part of the window, choose a selected theme.

Good for you if you find one that suits you entirely. I generally like the one named ‘Choco’ but I don’t like the selected text colour which I find not visible enough.

To personalize a theme, go find your themes folder within your Notepad++ files. (Mine is C:\Program Files (x86)\Notepad++\themes).
Copy your favourite theme and rename it. Now you’d think that you could edit your newly created theme from the Style Configurator and go Global Styles > Selected text colour and change the background colour. So did I.

Yeah, but for some reason this is only going to last for your current session and next time you restart, your changes will be lost. You need to edit your theme’s text file directly. Open it, search for ‘Selected text colour’ and change the background colour to your desired value.



Set the default language to C++ for certain files types.

Go to the Settings menu > Style Configurator.
Choose the language you want to add extensions to from the left hand side list then add the extensions in the ‘User ext’ box:


--------------------------------------------
Edit:

This too doesn't save properly so you have to your extensions yourself in the text file.
The file you need to modify is called langs.xml.
I found it in: C:\Users\youName\AppData\Roaming\Notepad++\langs.xml (although from what I read it might also be in your notepad ++ install files).

Find the language you're after (C++ in my case) and add the extensions you need in ext =""

By the way, I found all my answers on Super User.
 


Wednesday 19 March 2014

Erratum.

In a previous post: http://mklvfx.blogspot.fr/2014/02/radial-mapping.html
I said something very wrong while talking about linear vs srgb intepretation of a texture.

I said that ‘At the bottom, remapping with a linear texture is almost accurate. It's not exactly, but it's a matter of texture compression.’

I WAS WRONG. Systematically blaming texture compression is too easy. A flow in my photoshop knowledge was to be blamed, and I found out about that thanks to Simon Trümpler in this post. (We will be getting back to this post some time soon).

When you create a gradient in photoshop, there's a property called smoothness that you need to set to 0 if you want the interpolation between your gradient stops to be linear. This is what was truely messing up my gradient.

An easy way to double check that this is correct in photoshop is to create a 256 texture and compare the mouse pointer position with the brightness value.

At 48 in position, the 0% smoothness gradient = 48
              while the 100% smoothness gradient = 36


At 173 in position, the 0% smoothness gradient = 174
                while the 100% smoothness gradient = 184

At 255 in position, the 0% smoothness gradient = 255
                while the 100% smoothness gradient = 255
 

At 100 % smoothness, the values get accurate in certain positions (near the stops and midpoints) but they shift in between.
The 0 % smoothness ramp is not fully accurate, you might be a pixel off sometimes but overall it's pretty good.

And this how it verifies in the udk:
(don't forget that the srgb option needs to be false in your gradients textures)






Tuesday 11 March 2014

Value variation.

Today we'll look at a very simple way to generate a ‘random’ value. Of course it's not truely random, but it does the job for an artist sake.

What will happen if you plug a constant as your texture coordinates?
Every single pixel of your constant has the same value so they're all going to go pick the same pixel. That means that you'll get a constant value as an output as well.


If you're after a flicker, simply add a panner in the middle. You'll move the texture around so the value of the pixel in the centre will be different over time, and you get a fluctuating value. You wanna pan in both U and V to avoid repetitive patterns.
 
The rhythm of a malfunctioning neon light could be something like this:
(The texture is simply the inverted cell pattern effect from the after effects with some levels to darken it. )

If you want some mad flicker, use a very contrasted texture and pan it faster.
If you want some very soft variations, use some very soft gradients that you'll pan slowly.

Unfortunately, I haven't been able to record any of this because the framerate issues make it useless.