Author Topic: Render text onto an object3d  (Read 3391 times)

Offline Jonas

  • byte
  • *
  • Posts: 41
    • View Profile
Render text onto an object3d
« 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:


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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Render text onto an object3d
« Reply #1 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!?

Offline hthth

  • byte
  • *
  • Posts: 13
    • View Profile
Re: Render text onto an object3d
« Reply #2 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.
« Last Edit: November 03, 2007, 07:40:18 pm by hthth »

Offline Jonas

  • byte
  • *
  • Posts: 41
    • View Profile
Re: Render text onto an object3d
« Reply #3 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 -- 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

Offline Jonas

  • byte
  • *
  • Posts: 41
    • View Profile
Re: Render text onto an object3d
« Reply #4 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!
Simple things should be simple, complex things should be possible - Alan Kay

Offline rodplamo

  • byte
  • *
  • Posts: 18
    • View Profile
Re: Render text onto an object3d
« Reply #5 on: April 13, 2011, 03:53:35 pm »
Jonas, can you publish a result image?

Thanks!