jit.gl.model with jit.gl.texture – looking ugly – help?

What is the best way to get an image to map onto a torus in jitter? None of the settings that I can find yield acceptable results. It’s very easy to do in Blender, UV-mapped and all. How does one create this effect using jit.gl.model or jit.gl.gridshape with jit.gl.texture? the repeat and etc options get all stretched and weird – lol – I wouldn’t mind a straight repeat/tile.

Also, I have a pretty hi-res image that I’m trying to use as the texture, and no matter what scaling settings I try, I seem to get a very degraded result in my jit.window.

Must be I’m missing a setting or two here both in mapping and scaling or positioning the image.

It would be great to know the correct approach for mapping and scaling an image onto a torus so that it looks reasonably high quality (as the source image does).

Thanks so much for responding. I'm attaching the maxpat here. I'm using a torus as the model (about 5 mb so I can't upload here) and a fairly hi-res jpg for the texture (also about 5mb )

The main question is what is the best way to get a nice clean map on the inside of the torus (trying for a tunnel effect). I need to be able to tile/repeat the texture (or something) and have it look like the attached jpg which is what it looks like in blender using a UV map – I wouldn't mind some stretching since I can't UV map in Max (or can I?), but currently the result doesn't look at all as nice as with the blender setup.

It gets splotchy probably due to attempting to "zoom" to size the texture on the model. I think it would work better to somehow resize, but i don't know how that is done.

Let me know if this is helpful info at all, and/or if you need anything else. Thanks!

Valentin

p.s. I can send you the actual torus .obj and texture .jpg if you need to determine the problem. The image is just a large square with patterns on it.

[attachment=194617,3932]

Attachments:

if you have it looking how you like in blender, why not simply export a collada file from blender?
this should export whatever material you are using in blender, which should have the proper texture settings and mesh uv’s.

you can load collada files in jit.gl.model, and it should very close to the blender version.

I wasn’t aware of the Collada export/import ability – I’m somewhat new to the OpenGL aspects of Max other than simple videoplane functionality. This is my first set of patches using jit.gl.model . I’m digging in a lot further now and also got Max6 and Gen today =)

Thanks for such a quick response, and I’ll look into Blender–> Collada–> Max. It sounds like that would be perfect !

I exported the model with UV and Texture to Collada (.dae) file. It reads into Max but although the graphic I’m using as a texture appears much cleaner now, I don’t know how to get it to "tile" or repeat. Max doesn’t seem to support the UV mapping or the repeat mode from Blender/Collada.

I also don’t know what wrap modes are supported in Max6 for texture, or how to properly message the texture to try changing to mapping to see what might work. jit.gl.model now has the texture "inside" it.

Attachments:

I’ve uploaded the .dae file and maxpat with its json file (read the .json after reading the model .dae file) to setup the position of the model and camera etc.)

So frustrating that I can’t seem to get anywhere still. Different path, but although some minor progress with texture image quality, no idea how to get a fully mapped torus that looks even about right.

I’m tryin’ – lol

Valentin

Attachments:

can you also send the texture you’re using?
i can’t really test this out without it. you can compress it so it’s not so huge.

one possible issue is that certain wrap modes in opengl only work if the texture is non-rectangular (rectangle 0).
jit.gl.model *should* load the textures as non-rectangular if their dimensions are equal, and this *should* allow you to try all the wrap modes.

Hi Robert – Right in a recording session now, but I had to check, and voila – you have responded – Thank you so so much, and I will let you know how it goes when I get a chance to check it all out later.