www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: Jonas on November 03, 2007, 04:32:02 pm

Title: Render text onto an object3d
Post by: Jonas on November 03, 2007, 04:32:02 pm
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:


(http://web72.pi.ibone.ch/jpctQuestion1.JPG)
Title: Re: Render text onto an object3d
Post by: 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.
For the glow effect, i'm not sure how you want it to look like!?
Title: Re: Render text onto an object3d
Post by: 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 (http://www.jpct.net/forum2/index.php/topic,964.0.html) -- the lights and red orb in there have additional colors.
Title: Re: Render text onto an object3d
Post by: Jonas on November 03, 2007, 07:49: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 (http://www.jpct.net/forum2/index.php/topic,964.0.html) -- the lights and red orb in there have additional colors.

Thanks thats what I ment.

Title: Re: Render text onto an object3d
Post by: Jonas on November 06, 2007, 04:09:12 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!
Title: Re: Render text onto an object3d
Post by: rodplamo on April 13, 2011, 03:53:35 pm
Jonas, can you publish a result image?

Thanks!