This is my rough notebook - I add information to it that I like to keep as reference.
Get link
Facebook
X
Pinterest
Email
Other Apps
Fisrt WIP-pass for shoes. I am creating this shoe for game engine so trying to keep the vertices to minimum.This is a single geometry, all sculpted in Zbrush.
Bounding Box in PIL(Python Image Library) : Bounding Box function of PIL can be very useful for removing unused pixels from an image. Eg. If we want to remove unused pixels based on alpha channel of an image, we can use following code. im = Image.open(imagePath) r,g,b,a = im.split() left,upper,right,lower = a.getbbox() tempImage = im.crop((left,upper,right,lower)) newPath = imagePath.split(".")[0]+"_Cropped" + "." + imagePath.split(".")[1] tempImage.save(newPath) To understand which values, getbbox() function returns and what do they look like on an image, I created an image showing the values returned by the function. left,upper,right,lower = image.getbbox() Suppose you have a point in an original image and you want to find out the new position of the same point in the cropped image, lets see how we can do it. Suppose the point is at (300,450) position in an original image, so after cr...
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 Qu...
- 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...
Comments