http://java.sun.com/products/java-media/jmf/2.1.1/solutions/DemoJMFJ3D.html#requirements is  a tutorial on how to "Render Live video on a 3D surface".
-----Original Message-----
From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED]]On Behalf Of SW Keum
Sent: Tuesday, April 03, 2001 9:26 PM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] [Java3D] awt object to BufferedImage

Hello.
 
I'm trying to make a video image textured on 3D object using Java3D and JMF.
 
my program works as follows, first, renderer plug-in handles video stream and returns BufferedImage to main program, then, main program will use it as a texture on 3D object.
 
The problem is, Renderer or VideoRenderer class does not return BufferedImage object. they return awt.Component object as you know. so i return the data as Component, and process it in the main program as follows
 
--------------------------------------
    Component  vc=p1.getVisualComponent();
 
    BufferedImage bimg = new BufferedImage(SS, SS, btype);
      bimg = (BufferedImage) vc.createImage(vc.getBounds().width,vc.getBounds().height);

    ImageComponent2D imgcmp = new ImageComponent2D(itype, bimg, byRef, true);
    Texture2D tex1 = new Texture2D(Texture2D.BASE_LEVEL, ttype, SS, SS);
    tex1.setImage(0, imgcmp);
    return tex1;
------------------------------------------
 
but it doesn't work. my object is not textured. I've tested with different texture, and i can see the textured object, but not with this one.
 
how can i do that?
 
- additional questions :)
 
1. any JMF tutorial on internet? i cannot find any.
2. Is there any way to return BufferedImage object?
3. I'm getting 2D image from renderer like this.. first, renderer returns component object, and i get graphic using createImage() method. is it right?
 
Thanks in adv.

Reply via email to