Rendering jit.gl.mesh with jit.gl.node
Hello everyone,
After much research and testing, I'm asking you this question here.
I followed the beginning of Federico's tutorial from Amazing Max Stuff to deform a 3D model.
I'm working with 3D models that I deform with jit.gen and display with jit.gl.mesh. I send it a texture message to alternate between the original texture and another (export 3D models from Blender as OBJ with a mtl and jpg file for the texture). So far, so good.
I want to render the jit.gl.mesh with a jit.gl.node to have a texture on which to do postprocessing like jit.fx.brcosa and display the output with a jit.gl.videoplane.
If the jit.gl.node capture is set to 1 and the jit.gl.videoplane is active, everything seems correct. But if I want to disable the image to create a flash, for example, the jit.gl.mesh is still displayed (and without the post-processing effects, as if it were still rendered without going back into the node!)
I'll leave you an example in the patch.
Along with two other jit.gl.mesh examples (another that does the same thing, and the last one where it works for the display, but I can't use jit.gen).
Thank you by advance
Best regards
JWMThe reason why you got your meshes drawn both in the node and in the main context (which is why you still see them even if you disable the videoplane) seems to be because you bang your mesh objects every frame. This said, I'm not sure I understand why it does that. I mean, I know that banging an mesh draws it, but as far as I know it is supposed to draw it in its drawto context (the node).
Anyway, here you don't need to bang your meshes at each frame, because they're set to @automatic 1 (which is the default, so I removed the attribute from their box). I've also set their drawto attribute as the objects first argument instead of @drawto as I find it more clear (and it avoid confusions like having "stuff" marked as argument but "@drawto RENDERER" as attribute ;) ).
Without these unnecessary bangs, the meshes draw only in the captured node as expected, and thus only on the videoplane. Now you just need to quickly enable/disable your videoplane to make it blink.
Thank's a lot !
Everything works well !