Inspiration

Phong illumination model (cheat sheet)

$$ f(  \vec p ) = \underbrace{I_a K_a}_{\color{red} \text{ambient component}} + \underbrace{\sum_i^\text{nb_lights} (\vec n( \vec p ) . \vec l_i) K_d I_i}_{\color{green} \text{diffuse component}} + \underbrace{\sum_i^\text{nb_lights} f_{spec}(\vec l_i( \vec p ), \vec v(\vec p)) K_s I_i}_{\color{blue} \text{specular component}} $$

I summarize the Phong illumination model with the above equation and explain all the terms one by one.

Anki tip, inserting furigana (pop up on mouse hover)

Here is how you can make furigana appear above kanjis in your anki flash cards like this: おはし上手じょうずですね!

Learning japanese: a life's journey

Learning a language is quite a challenge, here I will gather some resources and thoughts about learning Japanese.

MAYA_SHELF_PATH not working, empty Maya shelves

Skeletal animation, forward kinematic

Maya MEL commands and procedures

[Maya C++ API] Save MPxData attribute on file

In Maya nodes are connected through attributes, Maya provides base types (e.g. matrices, vector of floats) but sometimes you want to use your own type to transfer data from one node to another. In this case you need to inherit from MPxData. There are functions to override in MPxData to specify how to write and load your custom data into the Maya scene file. I found the official documentation to be a bit thin on the topic, so I'm leaving additional tips here related to:

[Maya C++ API] Unable to unload plugin in Maya

When developing a Maya plugin it can be very frustrating not to be able to unload a plugin because you have to restart Maya every time you want to test a change. Here are a few tips to help you pinpoint why you can't unload a Maya plugin.

[Maya C++ API] Per vertex color update in MPxDeformerNode

Code snippet in C++ to be able to update the color of a mesh on a per vertex basis inside a custom Maya node. Useful for debugging by displaying weights / float values associated to each vertex.

AnkiDroid: How to solve "Syncing error, type: 409, message: Conflict" problem

I ran into the infamous message "Syncing error, type: 409, message: Conflict" while syncing my AnkiDroid with AnkiWeb on my Nexus 4. Here is the solution:

Upgrade to CUDA 5.0: cudaMemcpyToSymbol invalid device symbol error

You have just upgraded to CUDA 5.0 and the function cudaMemcpyToSymbol() throws you the infamous "invalid device symbol" error. Here is what to do.

CUDA constant memory, namespace, and weird bugs

Edit: the usage of cudaMemcpyToSymbol describded below is deprecated since CUDA 4.1 (See also my new entry Upgrade to CUDA 5.0: cudaMemcpyToSymbol invalid device symbol error)

Today I want to discuss some issues I had with CUDA constant memory and share some workarounds.

Drag and drop not working in QTDesigner or QTCreator designer

This has upset me for some time and I finally found a forum entry solving this problem.

The problem: I wasn't able to drag&drop in QTDesigner any widgets from the widgets list to the form I was editing.
Solution found here: qtforum.org

You only need to add this entry to your /etc/X11/xorg.conf:

Section "Module"
Load "extmod"
EndSection

Broken F4 shortcut in Qtcreator for cuda files ".cu"

Well I'm using QtCreator to code my CUDA project and there has been a lot of things bothering me. Among them is this F4 shortcut which doesn't work. The shortcut enables switching between the header and source file but apparently the extension .cu is not recognized as a C++ source file. Here is how to fix it.

  • 1