Fading 3D objects


    Nov 10 2009 | 10:17 pm
    Hi ladies and Jits,
    Sorry if its common openGL knowledge, but couldn't find how to fade any 3d object (in my case: a text3D overlayed over a videoplane). I've tried with the alpha of the color of the text, but that disn't work, sadly. Any tips?

    • Nov 11 2009 | 7:41 pm
      post your patch and we'll help you fix it.
    • Nov 11 2009 | 8:41 pm
      My patch is basically jit.gl.text3d.maxhelp, except I have more than 1 text3D and I use jit.gl.videoplane instead of a mesh and a texture. The effect wanted is to fade in and fade out the text in front of a video: to control the transparency/opacity of the 3D text, sorry if that wasn
    • Nov 11 2009 | 9:00 pm
      set @depth_enable 0 and @blend_enable 1 on your jit.text3d. adjust the alpha value of the @color attribute to fade.
    • Nov 11 2009 | 9:58 pm
      Thanks, that's almost it, I can feel its coming along:
      Setting the text to blend_enable 0 and depth_enable 0: text dissapears behind the videoplane.
      Setting the text to blend_enable 1 and depth_enable 1: text blends with the grey background and not with the videoplane.
      Setting the text to blend_enable 0 and depth_enable 1: alpha doesn't change the text opacity.
      Setting the text to blend_enable 1 and depth_enable 0: text dissapears behind the videoplane.
      Then I tried playing with the blending parameters of the videoplane itself, but cannot find the right killer combo...
    • Nov 11 2009 | 10:12 pm
      robtherich wrote on Wed, 11 November 2009 12:41post your patch and we'll help you fix it.
    • Nov 11 2009 | 10:33 pm
      Let
    • Nov 11 2009 | 11:04 pm
      the following works fine over here.
    • Nov 11 2009 | 11:10 pm
      It does work! I'm not sure why yet, but I'll meditate on your patch for awhile. Thanks a lot!
    • Dec 17 2009 | 6:38 pm
      I finally had time to go back to this project, and now the problem is slightly different: is it possible to fade 3Dtext with depth and lighting so that it really looks like 3D text?
      For now, its one or the other. I've played with blending modes, couldn't get it. here's the patch:
    • Dec 18 2009 | 7:47 pm
      if you want depth_enable and blend_enable for transparency, you have to do depth sorting manually. what this means is you must turn off @automatic mode for all gl objects in the scene. then you manually send out bangs to the objects, in the order you want them drawn, after the "erase" message, and before the gl.render draw bang.
      in your case you would bang the videoplane first, then bang the text3d.
    • Dec 19 2009 | 6:49 am
      Thanks for your advice, will try it out! Grateful Hugo.