Minie for Androids

Thank you. That gives me a clearer idea of the issue.

For debug materials, jme3-bullet uses “Unshaded.j3md” with setWireframe(true), whereas Minie uses “wireframe.j3md”, which contains

Technique {
        RenderState {
            Wireframe On
        }

I expected that to have the same visual effect, and on desktop it does, but apparently not on Android. I’ve committed a quick-and-dirty workaround for you to test. Please rebuild MInie using the latest commit:

cd Minie
git checkout -b test4 56a1ca62
./gradlew clean build

And re-run your test.

1 Like

I did this but we still have the same problem.

1 Like

I’ve committed a different workaround, using “Unshaded.j3md”. Please rebuild and retest using Minie commit f073df96.

1 Like

I am still getting this artifacts.

1 Like

Thanks for all the testing.

I’m assuming the artifacts go away if either:

  1. you build with jme3-bullet (and jme3-bullet-native-android) instead of Minie (and Heart), OR
  2. you disable physics debug visualization.

Correct?

With jME’s bullet it looks different. It kind of looks like solid unshaded surfaces.

1 Like

I’m surprised that the z-fighting only happens on Minie; I’ll think about why that might be different between Minie and jme3-bullet.

However, both behaviors point to a bug in the underlying code (jme3-core or OpenGL or …) since the default debug visualization is supposed to be wireframe, not solid. I’m running low on ideas how to work around that bug.

Does anybody know of wireframe materials that work on Android?

Could be that collision shape margin is different?

1 Like

Thanks for the suggestion.

I think that’s unlikely to explain the differences, since:

  1. The default margin in jme3-bullet v3.3 was changed to 0.04 by PR 1053, so the margins should be same for both libraries.
  2. BoxCollisionShape is a precise shape, so margin shouldn’t affect its visualization.

Edit: I think I found a workaround for the Z-fighting (see below), but the Android wireframe issue remains a mystery.

        ViewPort overlay = renderManager.createPostView("Overlay", cam);
        overlay.setClearFlags(false, true, false);
        bulletAppState.setDebugViewPorts(overlay);

Edit: We’re not the first to notice the Android wireframe issue: PhysicsDebugGeometry drawn solid

Does anybody know of wireframe materials that work on Android?

Seems OpenGL ES does not support glPolygonMode

I think there is an alternative approach explained here in case you like:

http://codeflow.org/entries/2012/aug/02/easy-wireframe-display-with-barycentric-coordinates/

1 Like

Thanks for those links @Ali_RS!

At present, I don’t have the shader skills to implement that workaround. In case someone else is willing to work on it, I’ve opened issue 1345.

I’m going to revert to using wireframe.j3md for this Minie release.

1 Like

Unless there are other, more serious issues, I plan to cut the Minie v1.6 release tonight.

Thanks again, @ndebruyn, for volunteering to be my Android tester! I’d never have got this far without your help.

5 Likes

I donot know if this topic of testing Minie 3.0.0+debug is still valid or not , but i was testing it on Emulators & it works fine , but on physical device , it works the first 2 days , but its now disabling the apk from being installed on my physical device , i have tried Minie 2.0.1+debug also on a separate non jme blank android project & it didnot work either , when removing Minie implementation , the apk is installed successfully ! my gradle version is gradle:4.0.2

2 Likes

Minie v3.0.0 is still the latest release, so I’m interested in any issues with it.

  1. I’m not sure what might make an APK “invalid”. Any ideas?
  2. Do non-debug versions of Minie exhibit the same issue on physical devices?
  3. What was the last version of Minie that worked with physical devices?
2 Likes

1-I think Using invalid package names like Minie-m or Minie m (a space) could potentiates for this

2- I have tried Minie3.0.0 & it’s debug version & the same results , they were working at the first 2 days , then I got a problem in Gradle cache called , cannot open zip file , so I have deleted Gradle/wrapper/dists & redownloaded it which fixed the **cannot open zip file problem ** but Minie stops working from that point inspite of android apps are working !!

There may be something in Gradle

Interesting. However, since package names don’t change over time, an invalid package name wouldn’t explain why the issue showed up after 2 days and not immediately.

The 2-day delay suggests to me that memory is gradually getting corrupted.

1 Like

@sgold okay , after a couple of tests & comparasions with the basic-android-template gradle & my gradle , i have found that i have changed the minSdkVersion from API LEVEL 16(Android JellyBean) to 30(ANdroid Nougat) for purposes of androidx developement , so when i switched them back , the apk is installed successfully ,the same thing implied on debug & non-debug, Do you use something that relies on Android JellyBean , EDIT & if so , it should work normally on min higher versions too?

1 Like

When the native library was compiled for Android, I specified “compileSdkVersion 28”. I imagine that might cause issues if the application were built using an older SDK version.

2 Likes

@sgold yes that might be true , Android Studio uses the same version for complieSDKVersion & targetSDKVersion & usually the targetSDKVersion must be API LEVEL 29 which is android10 or higher , in case of mine its API LEVEL 30 which is androidR since we have passed Nov2,2020 - this doesnot relate to android or jme independant developement but its for publishing on Gplay through Gplay Console for the first place , & to apply secuirty rules :slight_smile:

if you need more info :slight_smile:

https://developer.android.com/distribute/best-practices/develop/target-sdk?authuser=1

Currently testing Minie on Android this way wonot be very accurate on Emulators , due to the reason that Android Roms & Aspect Ratios differs dramatically plus you cannot fully test something on a debug apk , so its best to test that on a release on GPlay Console & google play :smile:

https://developer.android.com/distribute/best-practices/develop/test-your-app?authuser=1

I am working on Android game that’s Something like Pysonix Rocket League , i am using MinieV3 but till now i think if i finished it , i cannot release it on GPlay with min API LEVEL 16 becuase you know noOne cares about dirty JellyBean & there would be UnHandleable problems due to depracations & using high features , but anyway if you fixed the current problem , i will release the app On GPlay , i have an acc already , & follow that game analytics/errors/crashes/reports/etc on Gplay Console, & give a REAL LIVE TRY for Minie & JMe Android :slight_smile:

1 Like

Most of time android studio returns INSTALL_FAILED_INSUFFICIENT_STORAGE in case of memory issues & its something related to :
the app size or physical device memory

i have just listed that for illustration.