tags:

views:

74

answers:

5

Hi all. I'm completely new in Open GL, so have a question. I need to apply hi quality texturing on the surface rendered via triangles . But on zooming i continue see the triangle's under the skin, it's not smooth. I use OpenGL built-in minMapping. So I wonder (lookig at other products) do i need to implement my own mipMapping algorithm or I'm doing something wrong ?

This is what I want , more ore less, like a quality: alt text

Ok, here what I got : alt text

As yuo can see triangles are clear visible. Instead on the image befpre aren't, even after zooming (I watched a video)

+1  A: 

You're probably doing something wrong, the built-in mip mapping should be fine. In any case your description of seeing the triangles doesn't sound like a texturing issue, it sounds like a geometry issue. Are you complaining that you see geometric facets caused by the tessellation when you zoom in really close? If so it has nothing to do with textures, you need to tessellate your geometry more finely (more, smaller triangles).

bshields
Also, smoothing the normals might help
zerm
Do you mean that there is no other way then or execute tasselation algorithm over data, or just recover high quality data from the begininng?
Tigran
Smoothing is enabled (I think glEnable(GL_SMOOTH)) have to be enough, correct ?
Tigran
@Tigran: Uh, not exactly. Interpolating normals between two adjacent triangles, if they are supposed to be smooth. If you have a mesh of your data, you can load it into e.g. MeshLab and try some smoothing of the normals there...However, this depends on the data..
zerm
Ah ok, got it, you mean normals interpolation. I'm not so sure, that the program does it... need to verify.
Tigran
A: 

As others said, that is not a texture problem is a tassellation problem.

The easiest solution would probably be to use normal mapping (unless you want to increase the polygon count). Otherwise you may have to go into more complicated situations like using subdivision surfaces or similar approaches to smoothing.

nico
+1  A: 

As you said, you have 8x8 textures, that's terribly small, try at least with 256x256 or 512x512 textures.

Matias Valdenegro
A: 

I will throw in another opinion, and say that it is a shading problem. The good version is using something like Gouraud shading to smooth things out. Here is a video off of YouTube to illustrate the effect OpenGL GLSL Gouraud Shading so my first guess is that you need to turn on shading.

Ukko
Phong or smooth shading models will probably give prettier results than Gouraud.
nico
I thought thar the 'Smooth' shader in open gl was Gouraud, then again when I was working with this stuff we still powered the computers with steam ;-). At any rate there is no shading in the example image and it would certainly help the OP.
Ukko
Great, it seems like something what I'm looking about. But now another quesiton yet. Are there some useful examples on that stuff ? Can I using an example of vector shading file downloaded from the internet potentialy apply to my project without big problems ?
Tigran
A: 

OK, seems that I found a solution. It's actually the vertex smoothing and cube mapping that creates shining reflective image.

Tigran