Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - AeroShark333

Pages: 1 2 3 [4] 5 6 ... 11
46
Support / Re: Why does jPCT-AE need to keep the texture in the VM memory?
« on: December 19, 2016, 07:07:12 pm »
Using the Virtualizer class would significantly slow down loading time, right?
Especially with big resolution textures...?

Sooo, I tried this with my live wallpaper:
Code: [Select]
gLView.setPreserveEGLContextOnPause(true);And it seems to work fine I guess; even when not keeping textures in VM.

When the context changes, it seems that the GLSurfaceView and Renderer will get disposed and will get recreated.
Textures will be reuploaded so that's fine I guess.
Context changes aren't supposed to happen anyway I think, but it seems to happen in the Live Wallpaper picker for some reason when changing the orientation...
While context changes do not seem to happen, when applied in a certain launcher and then changing the orientation.

So now I basically only load textures when the Live wallpaper is launched (and on context changes).
This loading process is a one time thing only but it does seem to take up some time...
Also I noticed that when I'm adding textures to the texturemanager, the VM copy is still kept until the texture is actually used on a visible Object3D in a World.draw() call.

Is it somehow possible to upload textures to the GPU immediately when the texture is added to the texturemanager? (except the textures that are only being blit since I guess they don't need to be uploaded to the GPU...)
So I thought this would be possible by using a world.draw() call after an Object3D with a texture is added to the world.
But then it also needs to be visible in order to get the texture uploaded to the GPU; So is there some way to make all objects in my world 'visible'?
Sooner or later all my objects are visible anyway...

So how it now works:
[add Texture to texturemanager -> apply Texture to Object3D -> add Object3D to world -> world.draw() -> rendering starts -> after a few seconds there is a hiccup because the added Object3D has become visible -> uploading texture to GPU -> continue rendering]
And what I want:
[add Texture to TextureManager (as VM copy) -> apply texture to Object3D -> add Object3D to world -> upload texture to GPU -> rendering starts]
I think I could possibly achieve this my pointing the camera at the Object3D so it becomes visible:
[add Texture to TextureManager (as VM copy) -> apply texture to Object3D -> add Object3D to world -> make Camera face the Object3D -> upload texture to GPU -> rendering starts]

And since I guess I never actually really need a VM copy of these textures anyway (but only for the initial uploading), would it be possible to upload textures to the GPU immediately from a given InputStream (of a .png file)? (I suppose this would save VM memory...)

So what I originally wanted:
[add Texture to TextureManager (as VM copy) -> apply texture to Object3D -> add Object3D to world -> upload texture to GPU -> rendering starts]
What I would want now:
[apply Texture PNG-InputStream to Object3D (no VM copy of the Texture) -> add Object3D to world -> upload texture to GPU using PNG-InputSteam -> rendering starts] (or perhaps a bitmap byte-inputstream if that works better...)
Basically what I want to achieve here is that I don't want a Texture to take up VM memory if the VM copy of the Texture gets disposed after uploading anyway...

47
Support / Re: Why does jPCT-AE need to keep the texture in the VM memory?
« on: December 08, 2016, 04:11:31 pm »
Hmmm, so I did some testing... And I wondered, why can jPCT not use the uploaded textures in the GPU when the context has changed? After all... the 2D texture images don't change, right?

48
Support / Re: Why does jPCT-AE need to keep the texture in the VM memory?
« on: December 06, 2016, 03:53:23 am »
Well I'm using high resolution textures and VM memory is pretty limited on Android devices...

49
Support / Re: Why does jPCT-AE need to keep the texture in the VM memory?
« on: December 03, 2016, 04:44:52 pm »
Does jPCT automatically 'discard' these VM copies? Or do I have to do this myself?
If so, how?

50
Support / Re: Why does jPCT-AE need to keep the texture in the VM memory?
« on: December 02, 2016, 11:36:48 pm »
I guess I understood that, but aren't there scenarios when textures don't have to be re-uploaded? (so the textures don't need to stay in VM any more, right?)
So isn't it possible to clear the texture data in VM? Setting the texture data instances to null I suppose, so the GC can pick it up...

51
Support / Re: Why does jPCT-AE need to keep the texture in the VM memory?
« on: December 01, 2016, 08:38:41 pm »
Hmmm, well (re-)uploads seem like the most time-consuming task, especially with bigger textures I suppose...?
I don't know if jPCT still re-uploads Textures that are actually still in the GPU with keepPixels enabled... (seems pretty useless to me? I don't know)
Hmhm, why wouldn't it be worth it? I don't really completely understand it I guess.

52
Support / Why does jPCT-AE need to keep the texture in the VM memory?
« on: December 01, 2016, 04:59:09 am »
Hello,

Well I guess the title explains all...
I wondered because when textures get uploaded to the GPU (even when pixeldata is kept so it should be safe for any context change) why does it still need the texture data in the VM memory?

Is it possible to not have the textures in VM memory but uploaded to the GPU only?

Cheers,
AeroShark333

53
Support / Re: Blitting in VR display happens on left eye only
« on: November 17, 2016, 02:55:54 pm »
About the not centered issue, you probably need to correct your placement with (the destination height)/2 and the same for the width I'd say.
So: fb.getWidth()/2-destinationWidth/2
(not sure whether you need to subtract or add, I guess you'll find out if you try it)
destinationWidth being the amount of pixels your blit will take in width.

fb.blit(reticleTex, 0, 0, fb.getWidth()/2+290, fb.getHeight()/2, 256, 256 ,64, 64, 2, false);
Why are your arguments "64, 64" here? And "128, 128" in the other?:
And why "+290", it might look okay on your phone but I doubt placement would look good on phones with other screen resolutions! :p

54
Projects / Re: Naroth - 3D open world RPG
« on: October 27, 2016, 07:22:25 pm »
Hmmm, well yeah I wanted to help to do something back to this community. I've learned quite a lot here and I've been using jPCT-AE for some of my apps :D
Not completely sure if it's needed, but well... not everyone in the Netherlands has amazing English skills but the English language is quite well implemented in the Dutch education system.
But the online tool sounds alright to me :)

55
Projects / Re: Naroth - 3D open world RPG
« on: October 26, 2016, 04:48:44 pm »
Uhm?  ???
(see previous post)

PS: Could you take a look at my new project thread too? :D

56
Projects / Earthify 3D
« on: October 20, 2016, 12:16:45 am »
Hello everyone,

I would like to share my live wallpaper app here which I made using some amazing 3D engine called jPCT-AE! :D



This app has been out for a while now actually but I never really published it here because it's actually still not finished...
I decided to publish it already so people can already use/enjoy the live wallpaper.
I'm really proud of my work although it's probably not nearly the best live wallpaper out there.
That's not my aim either but I guess I'm a little of a perfectionist so I will try to keep improving it.

I'm not really a programmer, it's just an hobby for me. (I have a busy life as an Applied Physics student so I don't spend that much time on programming)
This is not my first app using this library, my most popular app is Skin Viewer 3D (in my forum signature) which is more than a year old now already.
The GLSL Shader language was rather new to me when I began this project but I managed to learn it a little from examples mainly! :)
The custom shaders are based on the default shaders but they have mainly be written by myself (and with a lot of help from the internet/Google).
My biggest problem is probably to support a large range of devices since I'm not really able to test on a lot of devices myself.

What I like most about my own live wallpaper is that it is very customizable.
And it's quite funny to see how the live wallpaper changed over the passed few months.
I tried my best to optimize the wallpaper as much as possible to reduce battery usage...
(usually people say Live Wallpapers are battery consuming but in my opinion it just depends HOW you use your live wallpaper... if you're playing with it constantly on your homescreen then it sort of makes sense to me I guess)
Not all features of the app work properly yet but I'm still working on that.

Screenshots:
https://dl.dropboxusercontent.com/u/47988037/Android/Earthify%203D/v3.9.0/scrns/Screenshot_2016-10-19-21-13-53.jpg
https://dl.dropboxusercontent.com/u/47988037/Android/Earthify%203D/v3.9.0/scrns/Screenshot_2016-10-19-21-19-22.jpg
https://dl.dropboxusercontent.com/u/47988037/Android/Earthify%203D/v3.9.0/scrns/Screenshot_2016-10-19-23-11-46.jpg
https://dl.dropboxusercontent.com/u/47988037/Android/Earthify%203D/v3.9.0/scrns/Screenshot_2016-10-19-23-12-25.jpg
https://dl.dropboxusercontent.com/u/47988037/Android/Earthify%203D/v3.9.0/scrns/Screenshot_2016-10-19-23-12-57.jpg
https://dl.dropboxusercontent.com/u/47988037/Android/Earthify%203D/v3.9.0/scrns/Screenshot_2016-10-19-23-13-24.jpg
https://dl.dropboxusercontent.com/u/47988037/Android/Earthify%203D/v3.9.0/scrns/Screenshot_2016-10-19-23-13-37.jpg
https://dl.dropboxusercontent.com/u/47988037/Android/Earthify%203D/v3.9.0/scrns/Screenshot_2016-10-19-23-14-01.jpg
https://dl.dropboxusercontent.com/u/47988037/Android/Earthify%203D/v3.9.0/scrns/Screenshot_2016-10-19-23-15-53.jpg
https://dl.dropboxusercontent.com/u/47988037/Android/Earthify%203D/v3.9.0/scrns/Screenshot_2016-10-19-23-17-32.jpg

Google Play Store link:
https://play.google.com/store/apps/details?id=com.aeroshark333.earthify3d

Special thanks:
EgonOlsen - For making this amazing 3D library and for providing quick support on the forums! :)

Feel free to comment! :)

Cheers,
Abiram
(AeroShark333)

57
Projects / Re: Naroth - 3D open world RPG
« on: October 19, 2016, 10:44:14 am »
Hmmm, I would like to help out with Dutch translations if that is possible...
However, how many strings are we talking about here?
I know this game has a lot of dialogs... So yeah...

58
Support / Re: Strange Fatal Error
« on: October 15, 2016, 01:53:39 pm »
Yeah the crashreport is without the 'fix', so basically the same version I sent you in PM a few days ago.
I've been using my 'fixed' version (which doesn't seem to crash).

Hmm, I see... I'm guessing it's the texture uploading... (8192x4096 textures...  ::) )

EDIT:
Would it be possible to increase the uploading speed to GPU? Maybe with a bigger buffer size or something?

59
Support / Re: Applying VertexController causes the model to dark-out
« on: October 15, 2016, 01:24:13 pm »
Looks fine to me...

Would it help to add this after this.touch() in the pulse method?
Code: [Select]
this.calcNormals();
this.calcTangentVectors();

60
Support / Re: Strange Fatal Error
« on: October 14, 2016, 04:07:35 pm »
Got it, thanks a lot for the help :D
I've been using my live wallpaper for a few days now and it hasn't crashed so far :)

There is something I'm wondering though...
So I upload textures, build the world objects and compile the world objects in a separate Thread. While doing so, the FrameBuffer will keep blitting a loadingscreen (untill the Thread dies). Then World.renderScene and World.draw will be called... But the first time when that is called, the (last blitted loading) screen seems to hang for a few seconds... As if either World.renderScene or World.draw is doing heavy blocking operations on its first call... Is it possible to move the (heavy) operations that happen in the first World.renderScene/World.draw call in the separate loading Thread I talked about earlier?

EDIT:
Coincidentally just got a user report on the Google Play Store with the following crash report:

_________________________________________________

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'Xiaomi/land/land:6.0.1/MMB29M/V7.5.9.0.MALMIDE:user/release-keys'
Revision: '0'
ABI: 'arm64'
pid: 18979, tid: 18993, name: GLThread 9008  >>> com.aeroshark333.earthify3d <<<
signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x75245000
    x0   00000007fe9ac5f0  x1   0000000075244fd0  x2   0000000000008f38  x3   0000000000000000
    x4   0000000000000000  x5   0000005579243b94  x6   00000007fe9afa60  x7   0000000000000000
    x8   0000000000000000  x9   0000000000000000  x10  0000000000000000  x11  0000000000000000
    x12  0000000000000000  x13  0000000000000000  x14  0000000000000000  x15  0000000000000001
    x16  0000007f9a7915e8  x17  0000007fa82f3c08  x18  000000000000000c  x19  0000000000000000
    x20  000000000000c438  x21  00000055791fa45c  x22  00000055791fa3fc  x23  00000007fe9ac5f0
    x24  0000000000000000  x25  0000000000000000  x26  000000557921ac18  x27  000000557918f040
    x28  0000000000000000  x29  0000007fa3d454f0  x30  0000007f9a278044
    sp   0000007fa3d454f0  pc   0000007fa82f3d68  pstate 0000000020000000

backtrace:
    #00 pc 0000000000019d68  /system/lib64/libc.so (memcpy+352)
    #01 pc 000000000017d040  /system/vendor/lib64/egl/libESXGLESv2_adreno.so (_ZN20EsxVertexArrayObject18UpdateInternalVbosEPK17EsxDrawDescriptorjPK16EsxAttributeDesc+1504)
    #02 pc 0000000000271518  /system/vendor/lib64/egl/libESXGLESv2_adreno.so (_ZN20A5xVertexArrayObject11CalcVfdRegsEPK17EsxDrawDescriptorP10A5xVfdRegsi+152)
    #03 pc 0000000000279190  /system/vendor/lib64/egl/libESXGLESv2_adreno.so (_ZN10A5xContext16ValidateVfdStateEPK17EsxDrawDescriptori+48)
    #04 pc 000000000028b700  /system/vendor/lib64/egl/libESXGLESv2_adreno.so (_ZN10A5xContext13ValidateStateEPK17EsxDrawDescriptor+2528)
    #05 pc 000000000028bbd0  /system/vendor/lib64/egl/libESXGLESv2_adreno.so (_ZN10A5xContext18HwValidateGfxStateEPK17EsxDrawDescriptor+16)
    #06 pc 0000000000114e5c  /system/vendor/lib64/egl/libESXGLESv2_adreno.so (_ZN10EsxContext16ValidateGfxStateEPK17EsxDrawDescriptor+636)
    #07 pc 0000000000107618  /system/vendor/lib64/egl/libESXGLESv2_adreno.so (_ZN10EsxContext21DrawElementsInstancedE11EsxPrimTypej10EsxPixTypePKvji+440)
    #08 pc 00000000000db3c4  /system/vendor/lib64/egl/libESXGLESv2_adreno.so (glDrawElements+68)
    #09 pc 00000000000067b4  /system/vendor/lib64/egl/libGLESv2_adreno.so (glDrawElements+28)
    #10 pc 0000000072ed0088  /data/dalvik-cache/arm64/system@framework@boot.oat (offset 0x2406000)

_______________________________--
Device: Redmi 3S
Android: 6.0

Pages: 1 2 3 [4] 5 6 ... 11