Render text onto an object3d

Started by Jonas, November 03, 2007, 04:32:02 PM

Previous topic - Next topic

Jonas

Hi
I'm porting a visualisation tool from Java3d to jpct, and am currently working on a prototype.

So far everything works fine, and most functionality is alrdy ported, except one major thing which i couldn't solve yet.

1. I need to project dynamic generated text on a box(see picture). Is there a clever way of doing that in jpct?

2. The boxes need to "glow"(e.g. get brigther) once selected. Whats the proper way of doing that in software mode? Use a texture effect? Anyone did something like that befor?:)

thx

it should look like this:


Simple things should be simple, complex things should be possible - Alan Kay

EgonOlsen

For writing text into a texture, you may use an ITextureEffect that you fill with the pixels from a BufferedImage each time you write new text into that BI.
For the glow effect, i'm not sure how you want it to look like!?

hthth

#2
You could use the Object3D.setAdditionalColor(java.awt.Color) to make the surface seem brighter. Works pretty well for me, I use it for stuff like buttons that should appear to glow in a dark environment. You can see an example in the latest screenshots in this thread -- the lights and red orb in there have additional colors.

Jonas

Quote from: hthth on November 03, 2007, 07:35:25 PM
You could use the Object3D.setAdditionalColor(java.awt.Color) to make the surface seem brighter. Works pretty well for me, I use it for stuff like buttons that should appear to glow in a dark environment. You can see an example in the latest screenshots in this thread -- the lights and red orb in there have additional colors.

Thanks thats what I ment.

Simple things should be simple, complex things should be possible - Alan Kay

Jonas

Quote from: EgonOlsen on November 03, 2007, 06:45:38 PM
For writing text into a texture, you may use an ITextureEffect that you fill with the pixels from a BufferedImage each time you write new text into that BI.

That did the trick, thank you!
Simple things should be simple, complex things should be possible - Alan Kay

rodplamo

Jonas, can you publish a result image?

Thanks!