www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: loongy on March 14, 2011, 12:48:50 am

Title: 2D Images in 3D Space
Post by: loongy on March 14, 2011, 12:48:50 am
I'm a designer in a new 3d project for android and i need to create a 2d image and be able to move it around in 3d space.
is this possible with jpct-ae?
i have had a look at the frame buffer's blit method but it doesn't seem to be able to accomplish this.
i saw something that looked like what i wanted to acheive in the 3dbenchmark video on jpct-ae website.
Title: Re: 2D Images in 3D Space
Post by: icarusfactor on March 14, 2011, 08:45:32 am
 Not an expert on this use of it... yet, but thought I would throw in my 2 cents.
The answer would be "YES". You just have to use an Object3D plane primitive and place your 2D image( create a Texture object ) on it. The blit method is for 2D overlay use only on your 3D world. With the plane primitive you can use alpha image on the plane object and scale them rotate and translate all axis including the objects own vertices matrix i.e local and world coordinates.
Title: Re: 2D Images in 3D Space
Post by: Kaiidyn on March 14, 2011, 10:20:59 am
as icarusfactor already said, you need to use a plane and apply your texture on it, also to have the plane always face the camera you need to enable billboarding..
Title: Re: 2D Images in 3D Space
Post by: loongy on March 15, 2011, 03:45:53 pm
Thanks guys. all good now