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 ... 18
1
Projects / Re: Physics example
« on: May 29, 2021, 10:18:49 pm »
Thanks, I hope you see a cool game this year.
I need something like object.clearRotation and preferably object.clearTranslation to apply to sourceMesh.clearRotation and sourceMesh.clearTranslation.
Good luck ;)

2
Projects / Re: Physics example
« on: May 29, 2021, 09:12:28 pm »
I believe if values are repetitively added, I suppose you should do an inverse operation at the end of what you are doing..? So maybe the inverse matrix or something would help (Matrix.invert()).

What you could also do is not apply the initial rotation at first but only at the end maybe. So after your vertex controller things..?

I'm not sure if I entirely understand your problem. It's hard to understand if you don't see what's happening

3
Projects / Re: Physics example
« on: May 29, 2021, 08:28:16 pm »
When i do - aaa[f].matMul(cyl7.getRotationMatrix());   // or  aaa[f].rotate(cyl7.getRotationMatrix());         
                    X77[f] = aaa[f].x + cyl7.getTranslation().x;
                    Y77[f] = aaa[f].y + cyl7.getTranslation().y;
                    Z77[f] = aaa[f].z + cyl7.getTranslation().z; all good(coordinates,and the shape of the object) but object wrong(infinite) rotation,instead of the original turn
Then do you need the inverse matrix of the rotationmatrix? I believe there's an option... You can also manually align the sourcemesh to the object mesh I guess...
I'm not sure if it is easily possible

4
Projects / Re: Physics example
« on: May 29, 2021, 02:07:10 pm »
Maybe this would work:

aaa[f].matMul(cyl7.getRotationMatrix());
Then:
aaa[f].matMul(cyl7.getTranslationMatrix());

I'm not sure if this will work... I can't test this out right now, but it would somewhat make sense I hoped... 😅 Otherwise, maybe Egon has better ideas

5
Projects / Re: Physics example
« on: May 29, 2021, 12:20:59 pm »
I thought you only wanted to look up the coordinates of each vertex in world space rather than object space... I don't think the destination mesh should be given in world space coordinates, however...

6
Projects / Re: Physics example
« on: May 27, 2021, 09:41:18 pm »
How get global(world) coordinate of vertex from mesh?In GenerateVertexController
I guess you'd need to pass your Object3D instance to your custom implementation of GenericVertexController.
Then using Object3D.getTransfornedCenter() to find the mesh's center in world coordinates. And using the rotations applied to the Object3D and GenericVertexController.getSourceMesh() to find the individual world coordinates.
...

However, maybe multiplying the sourceMesh with object3d.getWorldTransformation() could work too... Seems to go from object space to world space..?

7
Projects / Re: Physics example
« on: May 22, 2021, 12:12:17 pm »
I believe you would want the 'joints' to appear smoothly visually?

I guess you could try this: https://github.com/raftAtGit/Bones
(see also: https://www.jpct.net/forum2/index.php/board,10.0.html)

I am not entirely sure how it works but I believe you'd need one complete mesh of the person (including arms, legs, etc.)
And somehow define the body parts using the library

8
Projects / Re: Physics example
« on: April 30, 2021, 06:27:54 am »
Well, if I understand correctly, threads do not add speed on devices, but only transfer work to the background.
I'm not entirely sure about this...
I believe you could off-load some heavy physics calculations on a seperate thread than the GL-thread.
When heavy calculations are done in the GL-thread, you might suffer from lower FPS due to reduced draw(...) call rates.
I think this might especially give speed boosts on multi-core processor devices (nearly all devices nowadays) which would handle multithreading better.
Though, making sure the threads are synced and working well together might be more complex...
jPCT(-AE)/OpenGL(ES) isn't entirely multi-thread friendly as far as I know.

Maybe @EgonOlsen knows more about this...

9
Projects / Re: Physics example
« on: April 28, 2021, 12:36:57 am »
Thanks. Is there an alternative to jbullet but not slow?
I believe there's jMonkeyEngine... (which can work without jPCT as well..)
But I'm not sure how well it works together with jPCT.

An alternative is probably to decompile jBullet and optimize it somehow... (making it multithreaded or something..?)

10
Projects / Re: Physics example
« on: April 25, 2021, 08:56:16 pm »
Sources in first post was updated. Zip contains optimized jBullet lib (thanks EgonOlsen for tips! ;)), adjusted vecmath lib and sources of PhysicsTest app. On my SGS3 physics calculations of 9 boxes take about 37ms with original libs and 29ms with optimized ones. It is almost 30% speed up, it is not much for my app, but maybe it can help to someone.
Hello Thomas,give please link of source code jpct-ae+jbullet,link in top not work.

I believe the Dropbox links have died since the post is from years ago.
I once experimented with jBullet too... but the performance was too poor for my likings I believe.
Though, I might still have the jBullet version that was originally posted here somewhere on my computer.
I can try to look for it if you're really interested...

Otherwise, maybe this will help:
https://www.jpct.net/forum2/index.php?topic=1509.0


11
As mentioned before, try to increase/decrease the specularity:
Code: [Select]
Config.specPow = 6f; (6 is default)

I believe it'd help if you could share your phone model + Android version.
Especially knowing the GPU inside your phone might be useful to know.

I'm a little puzzled too why the GLES1.x seems to do better..?
The specular lighting seems to affect the transition badly in the spheres too if I'm not mistaken..?

12
Shader example: https://www.jpct.net/wiki/index.php/Shaders
Scroll to last images/code for specular lighting implementation that might be interesting for you.
You can use this to load shader textfiles (both vertex shader and fragment shader) to String variables: https://www.jpct.net/jpct-ae/doc/com/threed/jpct/Loader.html#loadTextFile-java.io.InputStream-
You can use this to create your own GLSLShader: https://www.jpct.net/jpct-ae/doc/com/threed/jpct/GLSLShader.html#GLSLShader-java.lang.String-java.lang.String-
And finally you can use this to apply a GLSLShader to your Object3D: https://www.jpct.net/jpct-ae/doc/com/threed/jpct/Object3D.html#setShader-com.threed.jpct.GLSLShader-

About the gap in graphical output:
OpenGL implementations differ per device model.
This means that one device might have a worse compiler (for the (default) shaders) than another device.
This will lead to artifacts in the graphical/rendered output.

13
I'm not entirely sure what you mean by that it looks 'bad'.
In one of your figures the specular lighting seems missing entirely..?

I believe the default specular lightning implementation uses Gouroud shading.
If you're unhappy with the results, I'd recommend writing your own shaders to implement Phong shading.

14
OpenGL implementations differ per device model.
For myself, I have found that emulators actually produce most consistently good results (maybe this was different in the past but it seems fine for me).
I believe the specular lighting doesn't seem to work properly for you on one of both (I'm not sure which screenshot is tied to which device).
You can reduce the sun intensity values to reduce the 'mirror'-like reflections. (Specular lighting).

PS: do you have another phone/tablet you can test on?

15
News / Re: Version 1.32 has been released!
« on: March 29, 2021, 11:30:25 pm »
Amazing! :D

Thank you for the continuous support on the library!
Very stable and full of functionalities

Pages: [1] 2 3 ... 18