Forums > Jitter

using "jit.gl.pix @gen xfade" to crossfade geometry on 2 jit.gl.models

July 24, 2013 | 5:58 am

Hi everyone

If I put two git.gl.models to @matrix out 1 and send them both to a jit.xfade i can morph between one model to another (same amount of verts,edges,faces).
If I try to do it "jit.gl.pix @gen xfade" nothing happens. What is it I’m missing ??

Any and all tips welcome.


July 24, 2013 | 6:33 am

It may be related to the number of planes coming out from the jit.gl.model.
jit.gl.pix only supports 4-plane matrices. You should try using [jit.gen @gen xfade] instead


July 24, 2013 | 12:43 pm

jit.gl.pix is intended to be used with 4 plane texture data (as mentioned above).
jit.gl.model outputs geometry data, not texture data, and so should be used with jit.gen.

check out the "Appendix B: The OpenGL Matrix Format" section of the reference docs for more info on the geometry matrix format.


July 24, 2013 | 1:20 pm

Thanks Lska ! Missed that one !
Rob, I tried it with jit.gen @gen xfade but still no joy , I’ve plugged it into jit.gl.slab and then into a videoplane.
I’m still a noob with Gen but should I maybe use jit.unpack on both models and fade the values together with Gen, or will this not give me an advantage with CPU compared to just using the standard jit.xfade ?


July 24, 2013 | 3:16 pm

slab and videoplane are related to textures.

you should send your matrix to a jit.gl.mesh instead

here’s a simple example:
<code>

– Pasted Max Patch, click to expand. –

</code>

but the jit.gl.model helpfile is much more detailed (have a look at the last tab…)


July 25, 2013 | 3:40 am

Finally nailed it ! Thanks Lska !
jit.gl.mesh just slipped under my radar. I’m going to try and make 5 models which can all be crossfaded together into one model. Time to dig into Gen :)


Viewing 6 posts - 1 through 6 (of 6 total)