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.
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
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.
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 ?
slab and videoplane are related to textures.
you should send your matrix to a jit.gl.mesh instead
here's a simple example:
but the jit.gl.model helpfile is much more detailed (have a look at the last tab...)
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 :)