Recent Posts

Pages: [1] 2 3 ... 10
1
Projects / Circuits of Oort - Android game using jPCT
« Last post by alcirsaraiva on February 13, 2018, 11:17:40 am »
Hi!

I've made this full 3D Android game using jPCT and I want to share with you people.

The link is https://play.google.com/store/apps/details?id=com.awesome.circuitsofoort

I hope you like it and feel free to share and comment!

Thanks Egon for the wonderful project and thanks people for taking a look and testing!

***

Things used:
Android Studio
jPCT for the 3D engine
Autodesk Maya for 3D modelling
Pixologic ZBrush and Adobe Photoshop for 3D texturing
Audacity for editing sound effects and soundtrack
OS Linux Ubuntu 64 bits
2
Support / Re: Environment Mapping with Software
« Last post by EgonOlsen on February 13, 2018, 09:13:08 am »
...you would have to write yourself a line algorithm that not just interpolates x and y but also z (or the reciprocal of z) just like the polygon rendering routines do.
3
Support / Re: Environment Mapping with Software
« Last post by AGP on February 13, 2018, 05:26:53 am »
I'll send it to you as soon as possible, via email.

Would you as least show me how I could do Polyline so that my lines would take the depth buffer in consideration (as it stands, my little hack gets drawn over everything)?
4
Support / Re: Environment Mapping with Software
« Last post by EgonOlsen on February 12, 2018, 09:42:43 am »
I'm not sure what you mean. Do you have  a screen shot of how it looks like and how it's supposed to look like?
5
Support / Re: Crash (native)
« Last post by AeroShark333 on February 11, 2018, 05:31:40 pm »
I tested rendertarget textures with rotating screen on the following devices

Code: [Select]
My device (ZTE Axon 7 @ Android 7.1.1 Custom ROM):
-> Low VM RAM (discard what I said about 300 MB RAM usage in VM earlier... It's about 30 MB actually (I guess my eyes added a digit... derp))
-> No memoryleak when rotating screen in VM (but there is in native/video memory)
-> However, in developer options -> Active services, the RAM usage keeps rising (300+ MB+ here (could go much higher though (1,8+ GB after many many screen rotations => device will kill other processes and might even reboot here) so I suppose it's not VM but native+video+VM that is being displayed here)

Some old tablet (Difrnce DIT4350 @ Android 4.0.4)
-> Low VM RAM
-> No memory leak with rendertarget textures
-> Crashes after many screen rotations..?

Old tablet 2 (Asus TF101 @ Android 4.0.3)
-> Low VM RAM
-> Crashes after many screen rotations?

Emulator #1 (Android 4.1.1):
-> Low VM RAM
-> No memory leak with rendertarget textures in VM

Emulator #2 (Android 4.2.2):
-> Low VM RAM
-> No memory leak with rendertarget textures in VM

Emulator #3 (Android 7.1.0):
-> Low VM RAM
-> No memory leak with rendertarget textures in VM
-> I don't see the VM+Video+Native memory usage as high as on my own device here in developer options... Unloading seems to work just fine here
-> No memory leak with rendertarget textures in native+video

For the sake of clarity also a test without rendertarget textures on my main device:
Code: [Select]
-> Low VM RAM
-> No memoryleak with rotating screen
-> Memoryleak with renderers when restarted in native+video RAM (renderer restarts when a setting is changed)

How does it restart:
-> Change a setting
-> (I believe it still uses the same GL context as before)
-> Removing and unloading textures from texturemanager (but it won't go through another draw call to actually unload them I suppose...)
-> Framebuffer is disposed
-> Reference to the renderer is gone now
-> A new Framebuffer is created
Now that I think of it... I think I could re-use the framebuffer... :|
10 minutes later... -> Re-using the same FrameBuffer but the memory leak remains..?

In the end, it seems that textures aren't unloaded untill the whole wallpaper engine is killed.
(restarting doesn't kill the wallpaper engine...)

Starting to think it could be a driver issue on my device... Egh

I'll try to test it with other physical devices
6
Support / Re: Environment Mapping with Software
« Last post by AGP on February 09, 2018, 07:09:40 pm »
So I wrote prepareForSoftware() as follows. Trouble is I'm sensing that the order of the operations is wrong. It's currently going:

Code: [Select]
texInfo = new TextureInfo(tm.getTextureID("EnvironmentMap"));
texInfo.add(tm.getTextureID("Starfighter.png"), TextureInfo.MODE_ADD_SIGNED); //MODE_ADD, MODE_BLEND, MODE_MODULATE, MODE_ADD_SIGNED
in the constructor. Then, once it's been established that the renderer in use is software:

Code: [Select]
     public void prepareForSoftware() {
TextureManager.getInstance().addTexture("GreyBump", new  Texture(1024, 1024, new java.awt.Color(128, 128, 128)));
body.setBlending(true);
texInfo.add(TextureManager.getInstance().getTextureID("Starfighter.png"), TextureInfo.MODE_ADD_SIGNED);
texInfo.add(TextureManager.getInstance().getTextureID("GreyBump"), TextureInfo.MODE_ADD_SIGNED);
     }

No go. On the other hand:

Code: [Select]
     public void prepareForSoftware() {
TextureManager.getInstance().addTexture("GreyBump", new  Texture(1024, 1024, new java.awt.Color(128, 128, 128)));
body.setBlending(true);
texInfo = new TextureInfo(TextureManager.getInstance().getTextureID("Starfighter.png"));
texInfo.add(TextureManager.getInstance().getTextureID("EnvironmentMap"), TextureInfo.MODE_ADD_SIGNED);
texInfo.add(TextureManager.getInstance().getTextureID("GreyBump"), TextureInfo.MODE_ADD_SIGNED);
body.setTexture(texInfo);
     }
produces a very similar effect to my combineAmbientAndDiffuse() method (the diffuse information is not in the right place but the environment map, tinted by the diffuse color, behaves right).
7
Support / Re: Environment Mapping with Software
« Last post by AGP on February 09, 2018, 04:00:40 pm »
I'll try the setBlending thing and report back.

Why not? Academically, you have to agree that there should be no difference between what each renderer can render.
8
Support / Re: Environment Mapping with Software
« Last post by EgonOlsen on February 09, 2018, 12:15:32 pm »
About the PolyLine in software mode: I've no plans to add support for this, I'm afraid.
9
Support / Re: Crash (native)
« Last post by EgonOlsen on February 09, 2018, 12:13:06 pm »
As mentioned, unloading of texture data from the GPU's memory has to happen in the GL rendering thread with a valid context. Otherwise, there nothing to unload it from. If the OS destroys a GL context, the graphics driver should actually free the associated memory. If that doesn't happen...well, I can't do anything about it then.
Have you tried this on some other device witha different GPU? Does it behave the same?
10
Support / Re: Environment Mapping with Software
« Last post by EgonOlsen on February 09, 2018, 12:10:32 pm »
The software renderer doesn't support multiple texture layers. Or at least not in the way in which the hardware renderer does. You could use a different path for the software renderer and use setBlending(true). Then assign three textures to it (diffuse, envmap and envbump) but use a single colored texture with (128/128/128) as color value for the envbump texture. That should give you some kind of blending between diffuse and env.
Pages: [1] 2 3 ... 10