Posts

Install Python3 and PyQt5 on mac

I switched to Python3 and PyQt5 on mac Sierra because of ImportError while importing modules from Packages. It is due to SIP (System Integrity Protection) that Apple introduced in recent OS. from PySide2 import QtGui ImportError: dlopen(/Users/usr/Others/PySide2/QtGui.so, 2): Library not loaded: @rpath/libpyside2.2.0.dylib Referenced from: /Users/usr/Others/PySide2/QtGui.so Reason: image not found Easiest way I found to install python and Pyqt is using brew and pip3 brew install python3 pip3 install pyqt5 Directory where Python3 is install /usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/bin/python3.6

Easy PIL install

https://stackoverflow.com/questions/8863917/importerror-no-module-named-pil At first install Pillow with pip install Pillow or as follows c : \Python35 > python - m pip install Pillow Then in python code you may call from PIL import Image

Rendering order and Z-sorting

Image
Rendering order and Z-sorting . In Unity, there are a couple of options using which we can control render order of the objects, two of them are 1. Render queue in shaders and 2. Painter's algorithm but eventually, what appears in front and what stays hidden is decided by Z-sorting/depth sorting. Here is the authoritative sequence of order of objects that will appear on the screen. Z-sorting/ Depth sorting is the final step to sort pixels based on the z-distance from the camera, but we can still turn ZWrite-off in the shaders (which in a way breaks Z-sorting). If we turn off ZWrite in all the shaders then render-queue will be in charge of deciding what comes in front and what goes in back If all shaders have ZWrite turned off and as well as they are on the same render-queue then the distance of their transform point from the camera will decide the render order. Eg : - ZWrite Off - Render Queue same - Painter's algorithm - ZWrite Off - Render Queue in

Run Python Script using Jenkins to add to SVN

Image
(Not a tutorial - I am keeping it just for my own reference) Step 1: Setting Jenkins Job and Python script. Step 2 : Setting permission on svn data cache. chmod -R a+rwx /Users/xxx/src/starts-art/.svn Step 3: Setting permission on repo files. chmod -R a+rwx /Users/xxx/src/starts-art/DatabaseBackup/backup

When normal is just a direction not a position then why position of mesh changes the normal map?

Image
When Normal is just a direction, not a position then why positioning of the object in the scene or transformation (translation, rotation, and scale) of the object matters while baking object-space or world-space normal map? As we know that Normal is a direction (and it is orthogonal to the face of the mesh). When we bake Normal-map as RGB image, we calculate its x, y, z values to represent a direction.  To calculate x, y, z of a normal-direction, we need a reference point such as when we calculate a position of a dot on graph paper, (0,0) is the reference point. Reference point we pick, may change the x, y, z value of a direction. Eg : If we have a pyramid and we are calculating Normal of a face. Object Space Normal Map : To write Object-space normal value, we will find out x,y,z value from a center of the mesh. x, y, z value of Normal direction will remain the same at any rotation of the mesh as when we rotate the mesh, center-of-mesh i.e. transformation-axis rotate a

Beginner's guide to Shader Development using Unity

Image
-  Teachable.com     -  Cgcircuit.com What are we going to understand here? What is a shader? Types of shaders based on their functionality. Shader and their types : W hat is a shader ? When we ask a computer to perform any operation, we give an instruction to it, and a set of these instructions is called a  Program .  A program that is used or contributes to shade or draw something on the screen is called a  shader . Shader is a set of instructions that is run on  GPU — Graphics Processing Unit GPU:  A processing unit or circuit specially designed for faster and efficient computer graphics operation or image manipulation. If we quickly take a look at the comparison of GPU and CPU, GPU is also being used in deep-learning calculations. A CPU with four (or 8 or 10) cores in it A GPU with thousands of cores in it. Cores of CPU are designed for serial operations, whereas cores of GPU are designed for parallel or simultaneous o

Hollywood vs Bollywood - Scene Comparison

Image
Here are some shot comparison of similar scenes from Bollywood movie "Mohan Jodaro" and TV-series "Game of Thrones" I always want to pin point things that Bollywood movies lack in quality that Hollywood movies and TV-series have. It begins with some simple math that when input is better, there is a good chance that output will be better as well. Hollywood movies have big budgets, they can have better production quality and they can invest more in things like visual effects. Their target audience is slightly different, which I believe is changing. People all over world watch Hollywood movies and TV-series like Game of thrones which raises their expectation from Bollywood movies as well (Indian TV-series are not even in comparison - they are just bull shit). Bollywood typical formula of Muscle show-off, shaking of head while delivering dialogue, jumps that break all physics rules, cat walks will soon come to an end, they will have to give more to their audience.