texture-mapping

How do Google Maps do their panoramas?

How do Google Maps do their panoramas in Street View? Yeah, I know its Flash, but how do they skew bitmaps with Correct Texture Mapping? Are they doing it on the pixel-level like most Flash 3D engines?, or just applying some tricky transformation to the Bitmaps in the Movieclips? ...

iPhone camera images as OpenGL ES textures

Is it possible to use an image captured with the iPhone's camera as a texture that is then manipulated in OpenGL ES (flag wave effect, etc.)? The main problem being the size of the iPhone screen being 320x480 (no status bar) and thus the image won't have dimensions that are power-of-2. Is the main option copying it into a 512x512 textu...

Constant horizontal band heights in a polygonal mesh undergoing vertical deformation (OpenGL ES 1.1)

When implementing texture mapping on a standard polygonal mesh using the usual algorithm, you can run into issues related to deformations along the y-axis in that the deformations follow along bands of constant height rows of quads instead of the vertices in this direction being able to stretch independently compared to that along the x-...

Texturing Spheres with Cubemaps (not reflection maps)

I want to texture a sphere with a cube map. So far my research has thrown up many many results on Google involving making OpenGL auto generate texture coordinates, but I want to generate my own coordinates. Given an array of coordinates comprising the vertexes of an imperfect sphere (height mapped but essentially a sphere) centered on 0...

iPhone, how do you draw from a texturepage using coregraphics?

Hi, I'm trying to work out how to draw from a TexturePage using CoreGraphics. Given a texture page (CGImageRef) which contains multiple 64x64 packed textures, how do I render sub areas from that page onto the device context. CGContextDrawImage seems to only take a destination rect. I noticed CGImageCreateWithImageInRect, however this ...

How to use GL_REPEAT to repeat only a selection of a texture atlas? (OpenGL)

How can I repeat a selection of a texture atlas? For example, my sprite (selection) is within the texture coordinates: GLfloat textureCoords[]= { .1f, .1f, .3f, .1f, .1f, .3f, .3f, .3f }; Then I want to repeat that sprite N times to a triangle strip (or quad) defined by: GLfloat vertices[]= { -100.f, -100.f, ...

OpenGL tex-mapping: Whole object is a single texel's color.

Hi guys, I've been trying to get a HUD texture to display for a simulator for a while now, without success. First I bind the texture like this: glGenTextures(1,&hudTexObj); gHud = getPPM("textures/purplenebula/hud.ppm",&n,&m,&s); glBindTexture(GL_TEXTURE_2D,hudTexObj); glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT); glTexPa...

WPF 3D Gradientbrush problem

The main problem is in LinearGradientBrush. It fills triangle in solid red. What's wrong? I have tried almost the same code with 2d shapes. It worked perfectly. <Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1...

Power of two textures

Can you explain me, why hardware acceleration required for a long time textures be power of two? For PCs, since GeForce 6 we achieved npot textures with no-mips and simplified filtering. OpenGL ES 2.0 also supports npot textures without mipmaps and etc. What is the hardware restriction for this? Just simplified arithmetics? ...

texture minification filter in raytracing?

can someone point me to a paper/algorithm/resource/whatever that tells me how to implement a texture minification filter (applies when texels are smaller than pixels) in a raytracer? thanks! ...

textureMappingu/v in common Vertex structures?

Looking through some directx examples, I'm often seeing the structure for a vertex to be defined as such: struct Vertex { vector position; vector normal; int textureMappingu; int textureMappingv; } Under this type of vertex, what are textureMappingu/v for? ...

opengl texture lod bias adjusting via opengl function call?

how is it possible to change the lod bias via an opengl function call? i dont like the default settings, changes the miplevels too early and makes the nearby ground look ugly. i couldnt find any codes to do this, every topic was about some external programs that does the job... Edit: This is my texture settings: glTexParameteri(GL_TEX...

Reading 32-bit RGBA float values in GLSL

I'm trying send some 32 bit float data to a shader, but the results are erratic. If I test with full white (1,1,1,1) the values are all zero. This is my code for creating the texture: gl.glTexImage2D(GL.GL_TEXTURE_2D, 0, GL.GL_RGBA32F_ARB, 512, 512, 0, GL.GL_RGBA, GL.GL_FLOAT, data); and reading from it in GLSL: uniform sampler2D u_t...

Mapping texture to 3D objects in a batch process on the server

Hi, we have the following use case: the user uploads her picture on a web server at a later time - on the server - the picture(s) are mapped on predefined 3D objects and stored as normal images (png, jpeg, ...). For now just the front-view. The files will be deleted once the session ends. show them in normal img tags to the user In ...

Getting x,y coordinates of a texture mapped on sphere (WPF, synch, no visualtreehelper.hittest)

Hello everyone, technology: WPF, C# pretext: I am making a game with a custom gyroscope+accelerometer device. I have a sphere that has a labyrinth map on it. The texture is mapped by a set of positions and texture coordinates generated from 3rd party. The user rotates the sphere via device trying to solve the labyrinth. question: I ...

How do I draw a texture-mapped triangle in MATLAB?

I have a triangle in (u,v) coordinates in an image. I would like to draw this triangle at 3D coordinates (X,Y,Z) texture-mapped with the triangle in the image. Here, u,v,X,Y,Z are all vectors with three elements representing the three corners of the triangle. I have a very ugly, slow and unsatisfactory solution in which I (1) extract a...

How to map multiple images on a sphere in openGL?

I am able to map a single image as a texture onto the entire surface of a sphere. But when I try to map the image to a small part of the sphere by using mipmaps the image quality is very poor. What should I do to improve that? And also how do I set texture coordinates for the image on the sphere? Is there an option other than mipmaps? ...

How do I arbitrarily distort a textured polygon?

I'd like to write a program that lets me arbitrarily distort a textured polygon by dragging its vertices. I want the texture to distort fluidly and without overlap, assuming the new polygon doesn't intersect itself. I should also be able to repeat the process with the new shape, and with a minimum amount of loss. Are there any algorithm...

Direct3D: Draw textured cube with single DrawIndexedPrimitives call. Possible?

I am trying to draw a textured cube using just 8 vertices and one DrawIndexedPrimitives call. Is this even possible? I am having problems with the UV co-ordinates. I am finding it impossible to come up with suitable UV values which will work for all faces of the cube. Take the following numbering as an example: UV is set to (0, 0) ...

Ratio of multipass textures compared to the color map

I have 4 textures used in a multi-pass effect with the color map at the highest quality - which for this example is 512x512. Currently the Normal, Specular & Parallax maps are the same dimensions. The additional maps are taking a significant portion of VRAM. This seems incredibly wasteful. My intention is to reduce the size of the multi...