www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: EgonOlsen on June 24, 2010, 11:21:56 pm

Title: jPCT-AE wiki
Post by: EgonOlsen on June 24, 2010, 11:21:56 pm
I started to write some stuff about AE in a section of the wiki. Until now, it contains some blah about the differences (not very detailed) and some performance tips. Contributions are always welcome: http://www.jpct.net/wiki/index.php/Main_Page#jPCT-AE_-_a_port_of_jPCT_to_Android (http://www.jpct.net/wiki/index.php/Main_Page#jPCT-AE_-_a_port_of_jPCT_to_Android)

Edit: Fixed link.
Title: Re: jPCT-AE wiki
Post by: EgonOlsen on June 25, 2010, 11:33:19 pm
Added a HelloWorld for Android to the wiki. It's still lacking documentation though...
Title: Re: jPCT-AE wiki
Post by: raft on August 06, 2010, 05:08:44 pm
added a page for profiling an Android app within and without Eclipse.
Title: Re: jPCT-AE wiki
Post by: EgonOlsen on August 06, 2010, 09:20:39 pm
Too bad that this doesn't work on 1.5 and/or my phone. The result when trying this on the command line is this:

Code: [Select]
08-06 21:15:37.474: ERROR/AndroidRuntime(12036): Uncaught handler: thread main exiting due to uncaught exception
08-06 21:15:37.474: ERROR/AndroidRuntime(12036): *** EXCEPTION IN SYSTEM PROCESS.  System will crash.
08-06 21:15:37.494: ERROR/AndroidRuntime(12036): java.lang.SecurityException: Process not debuggable: ProcessRecord{43734168 11894:com.threed.jpct.games.alienrunner/10092}
08-06 21:15:37.494: ERROR/AndroidRuntime(12036):     at android.os.Parcel.readException(Parcel.java:1234)
08-06 21:15:37.494: ERROR/AndroidRuntime(12036):     at android.os.Parcel.readException(Parcel.java:1222)
08-06 21:15:37.494: ERROR/AndroidRuntime(12036):     at android.app.ActivityManagerProxy.profileControl(ActivityManagerNative.java:2156)
08-06 21:15:37.494: ERROR/AndroidRuntime(12036):     at com.android.commands.am.Am.runProfile(Am.java:455)
08-06 21:15:37.494: ERROR/AndroidRuntime(12036):     at com.android.commands.am.Am.run(Am.java:79)
08-06 21:15:37.494: ERROR/AndroidRuntime(12036):     at com.android.commands.am.Am.main(Am.java:51)
08-06 21:15:37.494: ERROR/AndroidRuntime(12036):     at com.android.internal.os.RuntimeInit.finishInit(Native Method)
08-06 21:15:37.494: ERROR/AndroidRuntime(12036):     at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:186)
08-06 21:15:37.494: ERROR/AndroidRuntime(12036):     at dalvik.system.NativeStart.main(Native Method)

All i find when searching for this exception is the source code of Donut, i.e. Android 1.6...obviously, nobody else has this problem... ???
Title: Re: jPCT-AE wiki
Post by: raft on August 06, 2010, 09:23:40 pm
seems as you havent set debuggable flag on manifest file.

Code: [Select]
<application .. android:debuggable="true">
   ...
</application>
Title: Re: jPCT-AE wiki
Post by: EgonOlsen on August 06, 2010, 09:51:32 pm
Yes, that works better... ;D

The game runs like sh*t when enabling the tracing though...hardly playable at 6 fps...  :(
Title: Re: jPCT-AE wiki
Post by: raft on August 06, 2010, 09:55:05 pm
Cool. I've also updated the wiki page.

Yes, profiling slows down the application but hardly noticable on N1. But debugging makes it crawl ::)
Title: Re: jPCT-AE wiki
Post by: EgonOlsen on November 24, 2010, 11:28:14 pm
Reworked the HelloWorld example in the wiki to make it handle pause/resume better.
Title: Re: jPCT-AE wiki
Post by: Sushil on December 15, 2010, 06:45:31 am
Reworked the HelloWorld example in the wiki to make it handle pause/resume better.

Hi,

Can you please post the Android version of Advanced example posted in Wiki. I was trying to port the advanced example to android but not able to import Projector, ShadowHelper and few other things. Can you suggest me what should I do? Currently I am just using jpect_ae.jar in my build. I have just started to use JPECT engine two days back.

Thank you for posting the HelloWorld example for android.
Title: Re: jPCT-AE wiki
Post by: EgonOlsen on December 15, 2010, 10:09:13 am
You can't port them, because they simply don't exist on Android. At least OpenGL 1.1 doesn't support these features.
Title: Re: jPCT-AE wiki
Post by: redfalcon on November 16, 2011, 12:53:41 pm
I thought I share my simple implementation of the serializer (for *.obj and *.mtl files) for the Android version, might be useful for others. If you don't mind, you can add it to the wiki.
I expected worse when I read that "It's a bit painful to use right now"  ;) It has no special error checking etc., but its usable and should be quickly adaptable for other filetypes.

Code: [Select]
import java.io.FileOutputStream;
import com.threed.jpct.DeSerializer;
import com.threed.jpct.Loader;
import com.threed.jpct.Object3D;

public class Serializer {

              //Adjust the paths as necessary
private static final String INPUT_MODEL = "c:/myobj.obj";
private static final String INPUT_MATERIAL = "c:/mymtl.mtl";
private static final String OUTPUT_FILE = "c:/serialized.obj";

public static void main(String[] args) {

Object3D[] objs = null;
objs = Loader.loadOBJ(INPUT_MODEL, INPUT_MATERIAL, 1);

for (Object3D o : objs)
o.build();

DeSerializer ds = new DeSerializer();

try {

FileOutputStream baos = new FileOutputStream(OUTPUT_FILE);
ds.serializeArray(objs, baos, true);

} catch (Exception e) {

e.printStackTrace();
}

}

}

Load in jpct-ae with:

Code: [Select]
/...
Object3D[] serializedObject = null;
serializedObject = Loader.loadSerializedObjectArray(res.openRawResource(R.raw.INSERT_FILE_NAME));
/...
Title: Re: jPCT-AE wiki
Post by: yindroid on January 05, 2012, 05:58:28 pm
I noticed that there is no such class as DeSerializer in jPCT-AE (1.24)...
Title: Re: jPCT-AE wiki
Post by: EgonOlsen on January 05, 2012, 08:22:33 pm
No, it hasn't. That's because it makes no sense to serialize objects on Android directly. The idea is to serialize them using the desktop version and then load them via http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Loader.html#loadSerializedObject(java.io.InputStream) (http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Loader.html#loadSerializedObject(java.io.InputStream))
Title: Re: jPCT-AE wiki
Post by: OneManSitting on September 14, 2012, 07:47:26 pm
Thanks for making such a great wiki, and i would love to take part in it.
Title: Re: jPCT-AE wiki
Post by: EgonOlsen on September 15, 2012, 09:26:37 am
I'll create an account for you when i'm back home...in a week or so.
Title: Re: jPCT-AE wiki
Post by: EgonOlsen on September 22, 2012, 05:33:03 pm
You should have received an email with the login data for the wiki.
Title: Re: jPCT-AE wiki
Post by: OneManSitting on September 23, 2012, 11:48:59 pm
yes i got it, thank you.  ;D
Title: Re: jPCT-AE wiki
Post by: yrahmo on December 10, 2012, 12:43:31 am
hello
could you please add more comments on the hello-shader sample project.
i couldn't modify it by apply the same shader(in the sample) on any geometry, it keeps rendering weird artifacts. 
Title: Re: jPCT-AE wiki
Post by: EgonOlsen on December 10, 2012, 07:28:36 am
You need proper normal and height maps for this. Do you have those?
Title: Re: jPCT-AE wiki
Post by: yrahmo on December 10, 2012, 06:40:05 pm
I just replaced the Primitive.getPlane(a,b);  by Primitive.getSphete(a,b); in the helloShader project .
result weird artefact.

in other tests I used a 3ds  file including a simple geometry (just the geometry no light no camera...)with proper uv mapping  ( exported from blender) + texture map , normal map, height map. +provided the shader code .

result : the maps are correctly applied thinks to the texcord but no shader effect , the colors of the textured geometry seem to be a little different( it s like if the light was green)
 :o
Title: Re: jPCT-AE wiki
Post by: EgonOlsen on December 10, 2012, 08:16:32 pm
You can't use a sphere from Primitives for this, because (as the docs say), objects created by the Primitives class have no proper texture coordinates. Load some sphere model that has proper coordinates and it will work.

About the second issue...if everything is green, something is fishy with your textures. It might very well be that the normal or the height map are not in the format that the shader expects. Have a look at the example files to see how they are supposed to look. You can post links to them, if you want to so that we can have a look too.
Title: Re: jPCT-AE wiki
Post by: yrahmo on December 20, 2012, 09:31:53 pm
really sorry to make you wait di long. my DDMS is freezing, it's the same problem no matter what I try. i couldn't take any screenshot.  :'(
Title: Re: jPCT-AE wiki
Post by: BABABLACK_911 on December 28, 2012, 06:24:47 am
Hello Egon, I'd also like to contribute to the wiki, if you dont mind. :)
Title: Re: jPCT-AE wiki
Post by: EgonOlsen on December 28, 2012, 10:02:30 pm
Hello Egon, I'd also like to contribute to the wiki, if you dont mind. :)
You should have received an email from the wiki system....
Title: Re: jPCT-AE wiki
Post by: BABABLACK_911 on December 29, 2012, 04:31:35 pm
Thanks a lot Egon, I've activated my account. Also thanks for the prototype projects you sent to me.
I sure will post anything related to jPCT-AE in the wiki.
Title: Re: jPCT-AE wiki
Post by: aeroxr1 on October 29, 2014, 12:34:13 am
I have gone in the wiki page and it is empty... is normal ?  :'(
Title: Re: jPCT-AE wiki
Post by: EgonOlsen on October 29, 2014, 10:51:02 am
No, it's not. But it should actually be fixed more or less by now. See also http://www.jpct.net/forum2/index.php/topic,4191.0.html (http://www.jpct.net/forum2/index.php/topic,4191.0.html)
Title: Re: jPCT-AE wiki
Post by: EgonOlsen on October 29, 2014, 10:56:23 am
If it still happens for some pages, you are seeing a cached page. In that case, click on version history and replace the action=history parameter by action=purge. Yes, it's cumbersome, but what should i tell you...it's MediaWiki...