texture mapping not working with jit.gl.multiple


    Sep 24 2006 | 11:41 pm
    I'm having problems mapping textures using jit.gl.multiple. I basically want
    to use a texture in environment mapping, and need to scale it using
    tex_plane_s/t. Nothing seems to work like using regular jit.gl objects.
    There is no change to the mapping at all. Here's an example patch. I can't
    scale the dozer so that it will fit the screen. Really wanted to use this
    for a project, with just one day to go... guess I'm screwed :-(
    -thijs
    using windows max 4.6.2rc2 jitter 1.6.2

    • Sep 25 2006 | 12:22 am
      Hi Thijs,
      Thanks for pointing out this tex_map/tex_plane_* bug. Please note
      though that tex_plane_s/t only work in tex_map modes 1 and 3. For
      environment mapping, they have no effect. You can however use a
      shader to do this kind of stuff. Reflection mapping is a bit tricky
      as you're taking a vector in 3D and doing a 2D texture lookup, so
      scaling the thing. Here's a patch that uses a shader called
      td.reflect.jxs that I made to replicate @texgen environment as a
      shader so that you can have more control over it. If you need
      lighting, this also has to be done in the shader. I can make an
      example of how to do that if you need it. Below are the patch *and*
      the shader.
      best,
      wes
      ******************************PATCH*********************************
      ******************************************Shader**********************************
      Shader for for modifying image contrast by interpolation
      and extrapolation
    • Sep 25 2006 | 12:28 am
      And here's a second way of scaling the texture in the shader with a
      slightly different effect. Anyway, compare the 2 ways of scaling and
      you can get the idea. There are many domains in which to do it in for
      different kinds of funkiness.
      wes
      Shader for for modifying image contrast by interpolation
      and extrapolation
    • Sep 25 2006 | 10:46 am
      Hi Wes, thanks a lot! I didn't think about using shaders. This will solve
      the problem. Thanks to your quick response I might be able to catch up just
      in time.
      best, -thijs
      On 9/25/06, Wesley Smith wrote:
      >
      > And here's a second way of scaling the texture in the shader with a
      > slightly different effect. Anyway, compare the 2 ways of scaling and
      > you can get the idea. There are many domains in which to do it in for
      > different kinds of funkiness.
      >
      > wes
      >
      >
      >Shader for for modifying image contrast by
      > interpolation
      > and extrapolation
      > > >
      >
      > >
      > > >
      > >
      >
      >