Gridshape texture resolution


    May 26 2006 | 1:16 pm
    Hi,
    When I put a texture on a videoplane, the texture resolution appears to be higher than a texture on a gridshape.
    Is there a way to increase the resolution of a texture on a gridshape?
    Cheers, Mattijs

    • May 26 2006 | 3:25 pm
      change the dim attribute of the gridshape object itself.
    • May 26 2006 | 4:21 pm
      Hi, thanks for your reply.
      As far as I can see, the dim message changes the resolution of the gridshape itsself, not of the -texture- of the gridshape.
      Mattijs
    • May 26 2006 | 4:40 pm
      I have narrowed down my problem. In case of a videoplane you can either send the texture to the renderobject or to the videoplane object. A gridshape hasn't got the last option.
      When I use the method of sending the texture to the render, the resolution is half of when I send the texture to the videoplane. The patch below illustrates this.
      Hope anyone recognizes this.. ?
      For the texture I use this jpg, it contains clear edges and high contrast: http://www.oli.tudelft.nl/avdl1064/Eboman-Logo.png
    • May 26 2006 | 4:50 pm
      As of Jitter 1.5, the preferred method of texturing objects is to use jit.gl.texture or jit.gl.slab. This will give you many more quality options, and is more reliable.
      Cheers, Andrew B.
    • May 26 2006 | 4:58 pm
      Hi Mattijs,
      I've always wondered what the real difference is between a plane shaped gridshape and a videoplane. Only thing I can think of is that jit.gl.videoplane is capable of texture interpolation. Maybe this is the reason why your texture appears to have a higher resolution on a videoplane?
      -thijs
    • May 26 2006 | 5:14 pm
      Hi Andrew, thanks for the tip, checking it out right now. Maybe in that case it's time for the jit.gl.gridshape help to be updated? ;)
      Hee Thijs! I thought about that too. I compared the output of my patch with the image in an image viewing app. The texture-to-render method definitly down-grades the resolution of the texture. Btw in the patch I set the jit.qt.movie to the exact dimensions of the image.
      Greets, Mattijs
    • May 26 2006 | 5:35 pm
      Andrew, that did it! Thanks a lot!
    • May 26 2006 | 6:03 pm
      Hi Mattijs, To clarify, jit.gl.render uses power-of-two textures by default. This means that your 400x400 image is getting resampled to some power of two without interpolation. Using jit.gl.texture provides a more friendly interface for managing textures, and will use rectangular textures by default (as opposed to power of two), so you will not run into the aliasing issues. Note also that interpolation can be turned on and off with jit.gl.texture by using the @filter attribute.
      jit.gl.render can create rectangular textures by sending the message sequence:
      texture name , usetexture name, sendtexture rectangle 1
      You can also turn off the @rectangle attribute of jit.gl.texture if you need to use power-of-two textures (as some video cards have limitations with rectangular textures).
      Cheers, Andrew B.
    • May 26 2006 | 6:56 pm
      I understand, so render auto-resampled my texture to 256 x 256, videoplane didn't, which caused my confusion. Thanks again.
      I believe it would be good to introduce jit.gl.texture in the various helpfiles. If you don't know what you're doing it is better to copy a setup that works by default. At least consider placing jit.gl.texture under 'see also'.
      ... Hope I don't sound too critical ;)
      Cheers, Mattijs