Invisible shader or other solution?
Hi, Jitterlist!
Very interesting, how to do particular invisible of model, mesh or primitive controlled by texture like mask. For example if texture black=transparency, if texture white=full visible.
Sorry for bad english!
May be I dont know about microsolution for this megaproblemm )))
Thanks for any tip!
Cheers!
if you want to create transparency based on luminance, you can utilize the alphaglue shader.
here is a basic example. make sure you pay attention to the depth_enable/blend_enable/automatic attributes on the object you wish to apply transparency to.
thank you for the brilliant example!
I've change '@cool_face' to 0 for view "interior" (this is what I need for sure), but blue sphere inside has not exactly inside the textured sphere, how to fix it?
thank you again!
it's a little tricky.
one thing you can try is to duplicate the shape, turn front-face culling on (@cull_face 2) and turn back-face culling on on the the original shape (@cull_face 1).
then bang the front-face cull, the middle sphere, then the back-face cull.
might work
wow! it's exactly what I mean! you make my day! many thanks!
when I search today the right combination in your patch, I found that diffrent objects little bit dissapointed in space to another one
(look patch 'apple & mushrooms' I've made it before your last tip)
I think that I not exactly understand how 'planes' is works (
well, again, if you want to show an object inside another object, i think the easiest solution is to render the outer object twice, once with cull_face 1, and once with cull_face 2.
you need to turn automatic off for all 3 objects, and bang the cull_face 2 object first, then the inner object, then the cull-face 1 object.
this should work for the most part for gl objects inside other gl objects, but any other circumstances could break the effect.
My new favorite way to get around this is by using alpha-testing via jit.gl.sketch. An example of this is below. The way it works is, the object will only write into the depthbuffer if the alpha value is greater than a certain amount. This doesn't work with translucent objects, since it's really either on or off, but it works great for stencil type textures.
love it!
great! thank you guys!
I have a somewhat similar problem. In the below example, I want to be able to see both spheres entirely, rather than one being covered by the background of the other videoplane. I'm also wondering if there is a way to use the alphaglue shader in jit.gl.shader instead of the slab, since I intend to use this in a poly~ abstraction and not sure if I would get naming errors with the slab.
Thanks,
Zach
@blend_enable 1 on your two videoplanes (should probably also set @depth_enable 0)
Thanks, robtherich! I'm trying to implement this in a poly~ abstraction (I think you commented on another thread I had about that), also with a radialblur shader, and am getting some weird shading where the videoplanes overlap leading to obvious vertical lines at the edges of the planes. I'm wondering if anyone has a solution for this.
Also, the colors on my gridshape are acting weird- almost like they're using the first value as both red and alpha. Any ideas what is going on here?