Is there any 3D engine library available for b4a?

alhowiriny

Member
Licensed User
Longtime User
hello..

I was searching google for "free 3d android engine library", and i came across this library:

jPCT-AE - a mobile 3D engine for Google's Android

jPCT supports Android 1.5 and higher and can be used with OpenGL ES 1.x as well as with OpenGL ES 2.0.
It offers shader support for ES 2.0 and uses a set of default shaders that mimic the behaviour of 1.x in a 2.0 context. So you can use 2.0 without being forced to write your own shaders.

The features
- optimized for the Android mobile platform
- supports OpenGL ES 1.x and 2.0 on Android 1.5 or higher
- loads 3DS, OBJ, MD2, ASC and serialized files
- keyframe animations (from a MD2-file or self defined)
- skeletal animations via raft's Bones API
- shader support via GLSL for OpenGL ES 2.0
- offers a set of default shaders to ease ES 2.0 usage
- supports anti-aliasing
- supports advanced depth buffer settings on NVidia Tegra devices
- vertex, ambient, diffuse and specular lighting
- build-in primitives like cones, cubes, spheres...
- render to texture
- texture compression
- in memory compression
- supports swapping texture and vertex data to SD
- collision detection (ray-polygon, sphere-polygon and ellipsoid-polygon)
- generates vertex normals, face normals and tangent vectors automatically
- pixel perfect, geometry based picking
- transparency and fog effects
- billboarding
- lens flares
- single pass multi texturing using up to 4 texture stages
- support for VBOs, FBOs and vertex arrays
- support for octrees for rendering and/or collision detection


Is there any similar 3d engine available for b4a?
its a single jar file, can it be ported to b4a?
 

alhowiriny

Member
Licensed User
Longtime User
Thank you, but AGraham's library is a raw Opengl layer, if i have to use it i will need to create the whole engine from scratch, ie. Primitives, Object loader, Animation, Lighting, Texturing, Rendering, Collision, Shaders.. And many other features..

The engine i've mentioned will actually need AGraham's library to function.
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
No, it wouldn't need my library to function. It is a precompiled jar that interacts directly with the Android OpenGL API.

However to be used in Basic4android it would need its own wrapper library which would be quite a large task to produce needing a good understanding of how the library works..
 
Upvote 0

alhowiriny

Member
Licensed User
Longtime User
I was looking at one of the examples and it was importing android.opengl.GLSurfaceView. that's why i thought it would need your lib.

I agree with you, making wrapper would be a huge challenge and a time-consuming project.. anyway thank you for taking the time to reply and explain.
 
Upvote 0

Informatix

Expert
Licensed User
Longtime User
I was looking at one of the examples and it was importing android.opengl.GLSurfaceView. that's why i thought it would need your lib.

I agree with you, making wrapper would be a huge challenge and a time-consuming project.. anyway thank you for taking the time to reply and explain.

I looked a little bit the code of many game engines lately (AndEngine, libgdx, Angle, orx, jPCT-AE, etc.) and I've given up to wrap one of them for at least two reasons:
(1) it would take too much time to wrap it and there are a few technical problems to solve (calling a native activity for example);
(2) despite what is said here and there, the provided tools are not easy to use and therefore do not correspond to my needs. Having to type several lines of code to display a simple sprite or 3D cube does not interest me. The only game engine that I saw where the guy really simplified the things and completely masked the OpenGL stuff is EMO (for 2D only). But since all the code have to be written in a script language (to be run also on iOS), there's no reason to wrap it for B4A.

I'm afraid that the only solution now to do a game in 3D is to build your own tools with the excellent libraries made for OpenGL.
 
Upvote 0

alhowiriny

Member
Licensed User
Longtime User
True, but only if I were to create 2D stuff I would go with OpenGL libs, 3D isn't really my expertise and trying to create functional tools would be quite an advanture for the inexperienced.

If I were to choose a 3D engine for mobile I would go with minimal features, the basic ones are enough to get started with.

3D isn't necessarily a game thing, for example i'm interested in making an app that resemble (clone) the wii's news channel, where you get a globe and major cities placed over it and next to every city a stack of newspapers(based on the amounts of news articles); the user then will be able to rotate, zoom in-out, pan and select a city which will show a table with a list of the current available news articles for that particular location! The same thing will apply for a weather forecasts.

I guess the same reasons for the existing of 2D libs would apply to 3D ones. Nevertheless, there's always time for learning and experimenting.
 
Upvote 0

alhowiriny

Member
Licensed User
Longtime User
????
OpenGL is mainly for 3D, not 2D (but is used also for 2D). And if you know nothing to 3D, I hardly understand your request.

Creating 2D tools/functions in OpenGL would be easier than 3D.

Knowing nothing is different than knowing little, with OpenGL alone you need to create everything yourself, but with 3d engine you already have the necessary classes for various functions, i.e loading objects, collisions, lighting, texturing..etc are already available in a basic 3d engine. creating these from scratch need solid understanding of both OpenGL and 3D concept in general.
 
Upvote 0

Informatix

Expert
Licensed User
Longtime User
Creating 2D tools/functions in OpenGL would be easier than 3D.

Not really. You should try.
A 2D object is a 3D object in a flattened matrix. Look at how a sprite is built with OpenGL and you will change your mind about the easiness of using 2D with OpenGL.

And you should try also one of the 3D game engines. You'll see that the layer above OpenGL is thin, very thin in some cases. They are convenient because they glue together many things (audio, graphics, physics, collision detector, gesture detector, ...)

It seems that Renderscript is the API to do 3D views on Android, but it is reserved to advanced developpers since it's mainly a native API.

In other words, I don't know if there's an easy tool to create 3D things. I didn't see one.
 
Upvote 0

alhowiriny

Member
Licensed User
Longtime User
I did try 2d in opengl long time ago, using C# and SharpGL.. I did also try to load/texture an ASC object. 2d was easier than 3d..

I also tried the above 3d engine (jPCT-AE), with eclipse, its definitely simpler and easier than using OpenGL API alone.
 
Upvote 0

Informatix

Expert
Licensed User
Longtime User
I did try 2d in opengl long time ago, using C# and SharpGL.. I did also try to load/texture an ASC object. 2d was easier than 3d..

I don't know SharpGL. I just tried the engines I mentioned. And my opinion is just an opinion. Personnaly, I don't really see the difference between a 2D object and a 3D object. The latter has more vertices and more textures because of the added dimension, that's all.

I also tried the above 3d engine (jPCT-AE), with eclipse, its definitely simpler and easier than using OpenGL API alone.

Of course, and fortunately! But the added layer is, for me, too thin to say "it's an easy tool to make 2D or 3D things". That could be a lot easier. Some paid engines have done this simplification (probably because most of them have to run on different platforms).
 
Upvote 0
Top