Re: stop texture from interpolating

From: Michel Walsh (vanderghast_at_VirusAreFunnierThanSpam)
Date: 07/08/04


Date: Thu, 8 Jul 2004 16:38:18 -0400

Hi,

    Try

device.RenderState.ShadeMode = ShadeMode.Flat;

A better solution could be to define two vertices (same X, Y, Z, but
different (u,v) or different color) if you don't want continuity. As
example, pointA (x=10, y=20, z=30) in Blue for a face all in Blue, and the
same point, in Red, for another face all in Red. In other words, let the
interpolation takes place where it makes sense, and create the color
discontinuity (but geometry continuity) where it is required. You end up
with more data, but for a close look, that may worth it...

Hoping it may help,
Vanderghast, Access MVP

"Jakob NIelsen" <a@b.c> wrote in message
news:ehfMXeNZEHA.3688@TK2MSFTNGP12.phx.gbl...
> I am rendering a "terrain" with a large number of triangles. The triangles
> are drawn as indexed primitives, with one vertex for each grid position in
> the landscape.
> They are also given a texture coorinate based on some force value at each
> grid position.
> The problem is that if an edge in a triangle connects two vertices with
> difrent texture coordinates, then the edge is painted with a texture value
> which is between the two real values.
>
> imagine that a force of 1 is blue. 5 is yellow and 10 is green
> An edge connects force 1 and 10. The edge is now drawn mostly yellow.
> When even more colors exist between the two real ones, they are all drawn
> along the line.
>
> How do I get one color all the way? No interpolation. If the first vertex
in
> the triangle is blue, then all of the triangle is blue.
> This interpolation gives a very false image, which cant really be used to
> much.
>
> An example is shown here. www.greenleaf.dk/texture.jpg
> The colors should be dark and light green - certainly not yellow, white
and
> blue.
>
>



Relevant Pages

  • Re: Texture 3D interpolation between layers
    ... 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 ... becomes an triangle edge, ... but withouth changes with the original polygon. ...
    (comp.graphics.api.opengl)
  • 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: Osculating/Hermite Interpolation on sampled data
    ... > Speaking about continuity when using interpolating polynomials make sense ... > since we can set up equations of constraints for this when constructing ... > the polynomials. ... > When using windowed sinc interpolation, does it make sense to talk about ...
    (comp.dsp)
  • Re: Osculating/Hermite Interpolation on sampled data
    ... > Speaking about continuity when using interpolating polynomials make sense ... > since we can set up equations of constraints for this when constructing ... > When using windowed sinc interpolation, does it make sense to talk about ...
    (comp.dsp)
  • Re: Osculating/Hermite Interpolation on sampled data
    ... Speaking about continuity when using interpolating polynomials make sense ... since we can set up equations of constraints for this when constructing ... When using windowed sinc interpolation, does it make sense to talk about ...
    (comp.dsp)