Fading in/out an entire Node?

Perhaps this is a simple question, but the answer eludes me on this Saturday morning. :)  How do I fade in/out an entire Node with various objects in the node that I also want to fade at the same rate?

I'm beginning to wonder if this is even possible at all without making changes to the underlying spatials?

there may also be a way to use multitexturing to do this.  will probably need to look into this more.

Hm somehow missed this thread before. Some of the RenderPasses we currently have can force a RenderState for all object rendered, so perhaps you can take some inspiration from that code.

I'll have to look into that, thanks!


If anyone is still looking into this, I found an easy way to fade a Mesh.  Basically all you have to do is call setDefaultColor(r, g, b, a) on the mesh with the appropriate alpha value.  I'm not sure if it is expensive to keep setting the default color, but it should work. Also, one note.  If you try to setDefaultColor on a SharedMesh, make sure the backing TriMesh is not locked.  So, I guess you do sacrifice some performance, since you can't lock the meshes.

Thanks for the help,


and still, you would need to go through all spatials and set them up to make use of vertex colors…

This could be very useful.  I look forward to seeing this. :slight_smile:

Well, I'm finally done.  I have a really cool text effect system coded with a reusable Controller that translates, and a reusable Controller that fades the text.  We can add more controllers for more effects later.  Let me know if you want me to post the source or a demo.  Also, I named the Text object CoolText.  Not sure if that is a good name for it.  Perhaps it should be called EffectText or something instead.



What all does it do?

It does everything described in the previous post (ie - a text managerthat loads a .fon file, converts all the letters to Quads.,

do you have any screenshots or a demo?

I could really use something like that soon. Thanks.

I'm just cleaning up my code now.  I also need to create a few demos before it can be released.  So, hopefully this next weekend I'll post the code, and some examples (demos) for it.  Not sure where I'll post it - (I think you can only post text on this forum, and you must link to everything else).

the sample jar with beta java source, and classes can be found at this URL:


basically just include this jar with the rest of the JME jar files.  (this jar file should only be used for testing, since i am not sure if it is legal to distribute generated fonts. although you think it should be legal, otherwise it would be illegal to print a piece of paper.)

I have included 3 test classes to test the code:




notes: 1: i am not sure what the legal status is of using generated font files is in your own work (so be careful)

          2. i still have some bugs in the font spacing (some fonts do not appear to be spaced correctly).  the font spacing math is definitly wrong, but  appears to work with most fonts.

Happy Halloween