How to apply a texture image in GLGravity Teapot iphone?

You need some kind of texture coordinate, otherwise the whole concept of textures makes no sense: A texture is a function mapping a set of n coordinates to some value (depth, luminance, alpha, colour or combination of those) defined by data the samples are taken from and interpolated.

Up vote 0 down vote favorite share g+ share fb share tw.

For openGl expample, Xcode given a project GlGravity. But Instead of showing yellow color how to apply a Texture image without textureCoordinates?. Iphone opengl-es texture link|improve this question edited Jun 29 '11 at 14:02genpfault11.3k4918 asked Jun 29 '11 at 10:02Sivakumar1 0% accept rate.

You need some kind of texture coordinate, otherwise the whole concept of textures makes no sense: A texture is a function mapping a set of n coordinates to some value (depth, luminance, alpha, colour or combination of those) defined by data the samples are taken from and interpolated. You can generate the texture coordinates, either statically from your mesh, or in the vertex shader. Or you supply them directly.

But you need some texture coordinates to make this work. A very cheap and simple texture coordinate generator is using the vertex position as texture coordinate; this will project your texture along the coordinates axes onto the model. So if you've got a 2D texture it will be applied in the XY plane, as if there were a parallel projecting slide projector at coordinates (0,0,\infinity).

I got texture using blender.. But the problem is the openGl object showing as large number of triangles (like a mesh) connected together. Is there any way to get clear 3D opengl textured object..? – Sivakumar Jun 29 '11 at 13:45 @Sivakumar: If you mean connected triangles like this i.imgur.com/hxvM0.jpg then this is exactly what you need to do. Surface textures are flat, moreover the texture coordinates are sort of a flat mesh.

After you created a UV map for your mesh you can texture paint in the 3D View in Blender. But the texture itself is a flat image. There are 3D textures, but those are volumetric data and in most cases not suited for the job.

– datenwolf Jun 29 '11 at 14:09 No. I got image like This. How to get a complete 3D object?

Here is the URL i55.tinypic.com/a4x4p3.png... – Sivakumar Jun 30 '11 at 7:24 @Sivakumar: This looks like the default UV layer. You need to unwrap the mesh. In case of the sphere I'd use a (surpise) sphere projection.

Select sphere, Edit-Mode, select all (press 'A' once or twice, depending if something was selected or not), 'U'? "Sphere Projection". In the UV Editor check that you've got a unwrapped mesh.

– datenwolf Jun 30 '11 at 7:30 Thanks a lot. I will Try This. – Sivakumar Jun 30 '11 at 7:43.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions