Gridshape texture resolution

Mattijs's icon

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

joshua goldberg's icon

change the dim attribute of the gridshape object itself.

Mattijs's icon

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

Mattijs's icon

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

Max Patch
Copy patch and select New From Clipboard in Max.

Andrew Benson's icon

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.

Thijs Koerselman's icon

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

Mattijs's icon

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

Mattijs's icon

Andrew, that did it! Thanks a lot!

Andrew Benson's icon

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.

Mattijs's icon

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