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 ... 13 14 [15] 16 17 ... 22
211
Support / Re: Why does jPCT-AE need to keep the texture in the VM memory?
« on: December 25, 2016, 04:16:16 am »
I see, thanks for answering :)
And eh, nevermind the 16k resolution textures...
I guess I just got curious there

I have a small request however...
May I have the source code of the LensFlare class, learn from it, modify it and use it? (I'll probably end up writing my own class then)
So why?...
Well there's a few things I want to change/add I guess:
-> I want to use 5 textures in total
-> I don't want the burst texture to be repeated in the lens flare (that's where the 5th texture comes in)
-> I want to give the burst it's own scaling which isn't done with the global scaling
-> I don't really know how to get the 2D coordinates for blitting from this 3D world
-> I want to use 1/4th part of a 'complete texture'

My lens flare images are all spherical so...
I basically could just use 1/4th of this texture and blit it 4 times (by flipping the blit). (relying on the assumption that the LensFlare class uses blits and not it's own Object3D's)

And Merry Christmas by the way :D

212
Support / Re: Why does jPCT-AE need to keep the texture in the VM memory?
« on: December 22, 2016, 04:55:23 am »
What will preWarm() do if a Texture has already been uploaded to the GPU? Nothing I suppose?
And what about Textures that will only be blit? Those don't need to be uploaded, do they? :|
Is there some way to not make them get uploaded in case they do?

_________________________

I wondered about something else as well:
Code: [Select]
// Test zone
IntBuffer max = IntBuffer.allocate(1);
GLES20.glGetIntegerv(GLES20.GL_MAX_TEXTURE_IMAGE_UNITS, max);
Log.d("e3d-tag","Texture units (shader): " + max.get());

max = IntBuffer.allocate(1);
GLES20.glGetIntegerv(GLES20.GL_MAX_TEXTURE_SIZE, max);
Log.d("e3d-tag","Texture size: " + max.get());

max = IntBuffer.allocate(1);
GLES20.glGetIntegerv(GLES20.GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, max);
Log.d("e3d-tag","Texture units (shaders): " + max.get());

Output:
D/e3d-tag(31156): Texture units (shader): 16
D/e3d-tag(31156): Texture size: 16384
D/e3d-tag(31156): Texture units (shaders): 96

So I read somewhere that jPCT-AE supports up to 8192x8192 pixels textures; what happens if I try 16384x16383 since my device seems to support it...?
And I don't understand these texture units values...
The first output line is for the texture units available to the fragment shader I thought...
And the third line for the texture units available for the fragment shader AND vertex shader combined, right?
So does this apply for one Object3D or for all?
And how does it work when a Texture is shared between Object3D's, is there something I need to keep in mind?

_________________________

And another side question: Will there be support for OpenGLES 3.0 someday maybe?

213
Support / Re: Why does jPCT-AE need to keep the texture in the VM memory?
« on: December 21, 2016, 12:19:00 pm »
Euh, so instantly uploading textures to the GPU wouldn't be possible? With a Bytebuffer InputSteam from a Bitmap image then maybe?

I tried TextureManager.preWarm(fB); but it didn't seem to upload all Textures that I needed... Some were uploaded only when the first World.draw(fB); call was made

214
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...

215
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?

216
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...

217
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?

218
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...

219
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.

220
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

221
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

222
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 :)

223
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

224
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)

225
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...

Pages: 1 ... 13 14 [15] 16 17 ... 22