Re: Texture 3D interpolation between layers



Maik Wagner ha scritto:
Thats what i meant. But i can't find a fault (maybe thats just again
some dumb thing :()
If you want to take a look to my code i can post it. It's about 250
rows and uses SDL and glew.

It's hard to explain. So interpolation is done right on the Quads lines,
at least i think so, but within this polygons it looks odd. (It sure is
interpolated through the polygon, but not right according to height)
I think that the best method to see how it does interpolation is to
apply a 3d texture to a vertical line :) (or a vertical triangle like
(0, 0, 0) (1, 1, 0) (0.5, 0.5, 2))
I think that interpolation is made anyway per-fragment, and not
per-vertex. So even a splitting-in-triangles should works fine as well.

If the driver splits this Quad in a way that the line from top to bottom
becomes an triangle edge (internally), ogl interpolates itself on this
edge, regardless how i set up coordinates to get these transitions.
But we (I) aren't even sure if driver splits the quad. And even if it
does, i don't think this is an acceptable result. I mean: even when
opengl clip a triangle that is half out of the screen it is splitted by
the driver, but withouth changes (i think) with the original polygon.

Hmm hope i got it explained.
Yeah, splitting operation is quite common :)

I'm going to test my code with others terrains, textures and filled
quads, to see if it happen also to me that some texture are "badly
interpolated".

.



Relevant Pages

  • Re: Texture 3D interpolation between layers
    ... this edge has on both endpoints the same texture value in r-component even if it's different height. ... becomes an triangle edge, ogl interpolates itself on this ... but withouth changes with the original polygon. ...
    (comp.graphics.api.opengl)
  • Re: stop texture from interpolating
    ... different or different color) if you don't want continuity. ... > difrent texture coordinates, then the edge is painted with a texture value ... No interpolation. ... > the triangle is blue, then all of the triangle is blue. ...
    (microsoft.public.win32.programmer.directx.managed)
  • Re: stop texture from interpolating
    ... I think that the problem that you are having is related to filtering. ... > difrent texture coordinates, then the edge is painted with a texture value ... No interpolation. ... > the triangle is blue, then all of the triangle is blue. ...
    (microsoft.public.win32.programmer.directx.managed)
  • Re: Repeating textures
    ... Imagine your texture as a repeating 1x1 unit square, ... opened it up in an image editor, and the duplicated it in many times to ... coordinates you use on your polygon. ... For example, if you have a triangle, when you plot the three texture ...
    (comp.graphics.api.opengl)
  • Re: Basic Texture Mapping Question/Problem
    ... Given a 2x2 texture, the texel centers are at .25,.25; ... You can set the interpolation to NEAREST to get sharp edges. ... Is there an easy way to unrotate the modelview matrix and ...
    (comp.graphics.api.opengl)