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

Jul 24, 2013 at 5:58am

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

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.

#257003
Jul 24, 2013 at 6:33am

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

#257006
Jul 24, 2013 at 12:43pm

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.

#257037
Jul 24, 2013 at 1:20pm

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 ?

#257042
Jul 24, 2013 at 3:16pm

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…)

#257058
Jul 25, 2013 at 3:40am

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 :)

#257090

You must be logged in to reply to this topic.