background preloader

OpenGL Video Tutorial - Home

OpenGL Video Tutorial - Home
Related:  OpenGL

OpenGl - Tutorial 09 : Blending Introduction Blending is commonly used to make objects translucent. To view and understand some blending effects, it requieres some learning on how OpenGl computes Blending. This is a little longer so I put this in a Lesson 3. It is highly recommanded to read it for an accurate understanding of this tutorial. Sample use of Blending In this tutorial, we will see some blending application, the technique part is written in Lesson 3. Make an object translucent Mixing Pictures Filter effect Many other other effects can be created with blending. Translucent object Translucent objects is the common use of Blending. Without blending, when an object is rendered, all pixels drawn replace existing pixels in the frame buffer. The Blending formula defined with glBlendFunc is : srcColor+destColor In case of multiple translucent object, disable the writting in the depth buffer (Lesson 3). You can control how the object is translucent. Translucent object Mixing pictures First Method The alpha value is 0.75. Keys

HOWTO Avoid Being Called a Bozo When Producing XML “There’s just no nice way to say this: Anyone who can’t make a syndication feed that’s well-formed XML is an incompetent fool.——Maybe this is unkind and elitist of me, but I think that anyone who either can’t or won’t implement these measures is, as noted above, a bozo.” – Tim Bray, co-editor of the XML 1.0 specification There seem to be developers who think that well-formedness is awfully hard—if not impossible—to get right when producing XML programmatically and developers who can get it right and wonder why the others are so incompetent. I assume no one wants to appear incompetent or to be called names. Therefore, I hope the following list of dos and don’ts helps developers to move from the first group to the latter. Note about the scope of this document: This document focuses on the Unicode layer, the XML 1.0 layer and the Namespaces in XML layer. Contents Don’t think of XML as a text format Don’t use text-based templates Don’t use these systems for producing XML. Don’t print Use NFC

Chapter 6 - OpenGL Programming Guide Chapter 6 Blending, Antialiasing, Fog, and Polygon Offset Chapter Objectives After reading this chapter, you'll be able to do the following: Blend colors to achieve such effects as making objects appear translucentSmooth jagged edges of lines and polygons with antialiasingCreate scenes with realistic atmospheric effectsDraw geometry at or near the same depth, but avoid unaesthetic artifacts from intersecting geometry The preceding chapters have given you the basic information you need to create a computer-graphics scene; you've learned how to do the following: Draw geometric shapesTransform those geometric shapes so that they can be viewed from whatever perspective you wishSpecify how the geometric shapes in your scene should be colored and shadedAdd lights and indicate how they should affect the shapes in your scene Now you're ready to get a little fancier. "Blending" tells you how to specify a blending function that combines color values from a source and a destination. Blending

Linux find and replace on commandline with sed Quick Links - NEW Table of Contents Copyright 1994, 1995 Bruce Barnett and General Electric Company Copyright 2001,2005,2007,2011,2013 Bruce Barnett All rights reserved You are allowed to print copies of this tutorial for your personal use, and link to this page, but you are not allowed to make electronic copies, or redistribute this tutorial in any form without permission. Original version written in 1994 and published in the Sun Observer How to use sed, a special editor for modifying files automatically. There are a few programs that are the real workhorse in the UNIX toolbox. Sed is the ultimate stream editor. Anyhow, sed is a marvelous utility. Do not fret! Sed has several commands, but most people only learn the substitute command: s. sed s/day/night/ <old >new Or another way (for UNIX beginners), sed s/day/night/ old >new and for those who want to test this: echo day | sed s/day/night/ This will output "night". I didn't put quotes around the argument because this example didn't need them. or

Basic OpenGL Lighting. by Steve Baker Introduction. Many people starting out with OpenGL are confused by the way that OpenGL's built-in lighting works - and consequently how colour functions. I hope to be able to clear up some of the confusion. Lighting ENABLED or DISABLED? The first - and most basic - decision is whether to enable lighting or not. glEnable ( GL_LIGHTING ) ; ...or... glDisable ( GL_LIGHTING ) ; If it's disabled then all polygons, lines and points will be coloured according to the setting of the various forms of the glColor command. glColor3f ( 1.0f, 0.0f, 0.0f ) ; ...gets you a pure red triangle no matter how it is positioned relative to the light source(s). With GL_LIGHTING enabled, we need to specify more about the surface than just it's colour - we also need to know how shiney it is, whether it glows in the dark and whether it scatters light uniformly or in a more directional manner. glMaterial and glLight glColorMaterial The problem with using glMaterial to change polygon colours is three-fold:

Home - CS Animated Vertex Specification Best Practices Overview See VBO for general details. Size of a VBO/IBO How small or how large should a VBO be? You can make it as small as you like but it is better to put many objects into one VBO and attempt to reduce the number of calls you make to glBindBuffer and glVertexPointer and other GL functions. You can also make it as large as you want but keep in mind that if it is too large, it might not be stored in VRAM or perhaps the driver won't allocate your VBO and give you a GL_OUT_OF_MEMORY. 1MB to 4MB is a nice size according to one nVidia document. Formatting VBO Data VBOs are quite flexible in how you use them. One option for using them would be, for each batch (draw call) allocate a separate VBO per vertex attribute. Another approach is to store the vertex attribute blocks in a batch, one right after the other, in the same block and stuff them all in the same VBO. Now this is just a single batch. Minimize vertex state changes Indexed rendering is a little tricker. Attribute sizes Normals Colors

Webmin rosnodejs - Program robots with JavaScript Rosnodejs is currently deprecated. Most of my efforts for JavaScript and robotics has been shifted to the Robot Web Tools project. I highly recommend taking a look at Robot Web Tools if interested in putting your robot on the web. JavaScript interface to ROS functionality 2D tools for mapping and more 3D tools for robot visualization in a 3D environment I still feel a Node.js interface into ROS is important. Rosnodejs is a Node.js module that lets you use JavaScript to interact with the Robot Operating System, an open-source robot framework used by many of the top universities and research programs around the world. Perform a range of robotic tasks, from controlling the motors on an Arduino to processing Kinect sensor data using JavaScript and Node.js. The goal is to make the field of robotics more accessible to the countless intelligent web developers out there. One of the top frameworks to program robots with today is the Robot Operating System (ROS). How to get started with ROS?

Blend modes Most applications, like Adobe Photoshop and GIMP, allow the user to modify the basic blend modes - for example by applying different levels of opacity to the top picture. Normal blend mode[edit] This is the standard blend mode which uses the top layer alone,[1] without mixing its colors with the layer beneath it.[examples needed] Dissolve[edit] The dissolve mode takes random pixels from both layers. Multiply and Screen[edit] Multiply and Screen blend modes are basic blend modes for darkening and lightening images respectively. Multiply[edit] Multiply blend mode multiplies the numbers for each pixel of the top layer with the corresponding pixel for the bottom layer. , where a is the base layer value and b is the top layer value. If one layer contains a homogeneous color, for example the gray color (0.8, 0.8, 0.8), multiply blend mode is equivalent to a curve which simply is a straight line. Screen[edit] This mode is symmetric: exchanging two layers does not change the result. Overlay[edit] where

How to enable USB-Serial Port adapter (RS-232) in Ubuntu Linux : mypapit gnu/linux blog Though some might argue that Serial port are things in the past, it is still the most popular port for those who are into electronic DIY. Building electronic device with serial port interface is cheaper than buiding one that uses USB. That is the reason why people still sell USB-Serial adapter to those electronic DIY enthusiast. Here’s how to enable USB-Serial port adapter in Ubuntu Linux (with credit to Freeman from RepRap forum) First plug in the USB-Serial Port adaptor to one of your USB port. usb 1-1: new full speed USB device using uhci_and address 2 usb 1-1: configuration #1 chosen from 1 choice After that, unplug the device and type “lsusb”. Plug in the USB-Serial Port converter back, and run “lsusb” again, and you shall see an additional line, like this. Bus 003 Device 001: ID 0000:0000 Bus 002 Device 007: ID 03f0:4f11 Hewlett-PackardBus 001 Device 002: ID 4348:5523 --- --- --- (notice the additional line!) sudo modprobe usbserial vendor=0x4348 product=0x5523

Mobile Autonomous Robot using the Kinect Given a priori knowledge of the environment and the goal position, mobile robot navigation refers to the robot’s ability to safely move towards the goal using its knowledge and sensorial information of the surrounding environment. In fact, in mobile robot operating in unstructured environment, the knowledge of the environment is usually absent or partial. Therefore, obstacle detection and avoidance are always mentioned for mobile robot missions. Kinect is not only normal camera sensor but also a special device can provide depth map.Depth map is acquired through OpenNI library then processed by Point Cloud library to extract accurate information about the environment. Here is link of full project: (code + references in English, others in Vietnamese but still good to understand from the source code) Some fun stuffs using kinect are available on my channel.

opengl - How does the fragment shader know what variable to use for the color of a pixel?

Related: