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 ... 13
1
Support / Re: Camera rotation issue
« on: July 30, 2018, 09:15:40 pm »
Doing the orthonormalization fixed the issue :)

Also I reported some SIGSEGV errors earlier at some point...
I thought that loading models/vertex data before texture data would fix the issue...
While it completely fixed the issue on the emulator (I was never able to reproduce it again), there are still SIGSEGV's happening according to the Play Store Console...
But I think the amount of reports did decrease

2
Support / Re: How to convert a texture to a bitmap?
« on: July 30, 2018, 09:09:34 pm »
I think he means a jPCT Texture instance...

I think blitting the Texture to a clear FrameBuffer and then using FrameBuffer.getPixels(..) would be one solution :)

3
Projects / Re: Art of Earthify (3D live wallpaper)
« on: July 29, 2018, 04:27:19 pm »
Thank you for your kind words! :)

I do think live wallpapers have a bad reputation among most people as it might possibly drain a lot more battery...
But personally I believe this mostly depends on how often you come back to the launcher/lockscreen.
However, a solid wallpaper of course uses less battery juice.

I did set it as live wallpaper on my own phone and I don't really notice much of a difference in battery usage (but then again, I don't play around on my homescreen/lockscreen for too long).
I also set the live wallpaper on my Android TV box, where I can put all settings on max. without having to worry about possibe extra battery usage since it works on DC...  ::) ;D

4
Support / Re: Object3D generating issue
« on: July 29, 2018, 03:39:06 pm »
No idea about the UV-mapping...about the black polygons? Are you using shaders? If so, that's most likely the problem. Different GPUs show different behaviours in some edge cases and in some cases, it might result in just a black rendering. So...are you using shaders and which devices are affected?
Yeah, I'm using shaders (I kind of found out that that's the issue most likely)

I was kind of surprised because it happens everywhere on the Object3D
As can be seen here: https://www.dropbox.com/s/yuxik4jih3dq107/Screenshot_Art_of_Earthify_20180729-151321.png?dl=0

When I use another (simple) fragment shader, the problem does not happen
Code: [Select]
void main(){
gl_FragColor = vec4(vec3(texCoord.y)*texCoord.x,1.0);
}
But it kind of does reveal why the UV mapping isn't perfect, it's just missing triangles on the border which the original code doesn't provide...
Screenshot 1: https://www.dropbox.com/s/0ko53cmwjsmakfh/Screenshot_Interactieve_achtergrondkiezer_20180729-150640.png?dl=0
Screenshot 2: https://www.dropbox.com/s/0oujxsfadihp95c/Screenshot_Interactieve_achtergrondkiezer_20180729-150703.png?dl=0
Screenshot 3: https://www.dropbox.com/s/o8vv334dm0yiua7/Screenshot_Interactieve_achtergrondkiezer_20180729-150711.png?dl=0

So yeah, around the middle all seems fine but around the top and bottom there is a zigzagging effect around the top and bottom (texCoord.y variable)...
Proper solution would be to add triangles on the center of that zigzagging line I guess
Another 'solution' would be to increase the recursionLevel (see original code in first post) so much that the zigzagging effect becomes smaller...
Final 'solution' would be to 'correct' the texCoord var at that point
I'm not sure if it can just be corrected by changing the way I assign UV coordinates to the triangles in the Java code.

My device:
ZTE Axon 7 (Adreno 530)

5
Projects / Re: Art of Earthify (3D live wallpaper)
« on: July 27, 2018, 07:38:47 am »
So now... over a year later, I pretty much finished my application. (it should look a little different than the screenshots in the first post)
I never had really much time to work on it and I could probably work on it forever... but for me, I now feel like I'm done :)
I'd like to thank the people here for some of the support and I'd like to thank the maintainer(s) of the library for their awesome work on jPCT-AE! :)

I'll drop some promocodes here for you to enjoy the premium version of my app 'Art of Earthify' for free (it's not free otherwise)
How to use it? => Open the application => Unlock premium => Purchase => Press the arrow => Redeem code => Paste one of the codes below into the text field => Voila
(Note: these promo codes last till end of August; there are only 33 promo codes)
F4R4WVG3Z8C6KNRMT2WQJKS
V8J8DXDT2GYUSV336JURLWZ
UDKQRHGL8Z7AM2VUJY4Q9BD
K4VEBRKZQ8U86QPDKK07AHV
V6ZWM92ZWAEME6KZQSK0QSV
UN2DQT31YGHSZYG1BW3SWF0
DLKWD8ERSBH9FD3S9T0XGH1
QS3TY9CVK24T3CU1H5T4YP9
A4KGVH9NEY1RJAZ8KWSCQ46
NYXYE2B8ALM1LVKS979YJ68
KRTRY61UK163V1BV8UX0DD8
MPB2WZTZRWHS9BQH0LVMRWK
XFXENA61UB4BV4FHM339J1A
R48J3AQWMEM8S177Q3600EP
5WHQH1473MSLY825CJ1TNBJ
65ZXHTRDYME08PVK929RZWE
74VH1NJ9NFD6DPGM86FM8JB
8M054GXH91DGDQ8CX5GKQ8W
F4X4WTXJ9PZLDHZNX5RSVDJ
9YA1P7PYZQHGKEXCQ1MSTFY
TZX51PLYJBMX3F0BDZEX1XF
HWE9WAVWDHDH8SZ72FL435E
X8FCK93366J2RBARJFZJ1E5
9B380EDX9QAC1ZUJLDM8TK9
XTU1PKU9A5T0XU8VY4F2BV5
XBVLST1FVB0HE9TCN1G3VTU
Q9FK6EX6YA8MVNGJPQT47KU
4RZUXCJX1FBRBS0LRT1UAXX
C67SQ9GUSP0MZYCEBT6MTJ8
15HRHX2DB7XL4WPWY4DBVD0
9PHDE6LVVYEMY20JBPPXVNA
BGJAVRZ8PYKSXRX2UMR0CKL
SGABEGNCF1WE40E5DJL95VB

6
Support / Re: Object3D generating issue
« on: July 27, 2018, 02:19:29 am »
Hmmm?  ???

7
Support / Re: Camera rotation issue
« on: July 23, 2018, 06:07:52 pm »
I think this would solve the problem, thanks! :)
I'll report back later if I can test it

8
Support / Object3D generating issue
« on: July 23, 2018, 06:05:48 pm »
Hello,

I've been trying to create some code to generate a geosphere/icosphere, I got somewhere but the results aren't exactly perfect.
Issue 1: UV mapping still does not seem perfect (especially around the top and bottom, where texCoord.y is around 0.0 or 1.0) but around the middle (0.5) all seems fine
Issue 2: I seem to get black polygons on some devices (but I don't get these black polygons on an emulator..?)

The code till now (it's not really optimized yet since I ported most of the code from some C# code: http://blog.andreaskahler.com/2009/06/creating-icosphere-mesh-in-code.html):
Code: [Select]
private class TriangleIndices {
public int v1;
public int v2;
public int v3;

public TriangleIndices(int v1, int v2, int v3) {
this.v1 = v1;
this.v2 = v2;
this.v3 = v3;
}
}

private ArrayList<SimpleVector> vertexData;
private ArrayList<Integer> vertexDataIndices;
private int index;
private Map<Long, Integer> middlePointIndexCache;

// add vertex to mesh, fix position to be on unit sphere, return index
private int addVertex(SimpleVector p) {
// 0.5 is a scale factor here...
double length = Math.sqrt(p.x * p.x + p.y * p.y + p.z * p.z) / 0.5;
vertexData.add(new SimpleVector(p.x / length, p.y / length, p.z
/ length));
return index++;
}

// return index of point in the middle of p1 and p2
private int getMiddlePoint(int p1, int p2) {
// first check if we have it already
boolean firstIsSmaller = p1 < p2;
long smallerIndex = firstIsSmaller ? p1 : p2;
long greaterIndex = firstIsSmaller ? p2 : p1;
long key = (smallerIndex << 32) + greaterIndex;

if (middlePointIndexCache.containsKey(key)) {
int ret = this.middlePointIndexCache.get(key);
return ret;
}

// not in cache, calculate it
SimpleVector point1 = this.vertexData.get(p1);
SimpleVector point2 = this.vertexData.get(p2);
SimpleVector middle = new SimpleVector((point1.x + point2.x) / 2.0,
(point1.y + point2.y) / 2.0, (point1.z + point2.z) / 2.0);

// add vertex makes sure point is on unit sphere
int i = addVertex(middle);

// store it, return index
this.middlePointIndexCache.put(key, i);
return i;
}

public Object3D create(int recursionLevel) {
this.vertexData = new ArrayList<SimpleVector>();
this.vertexDataIndices = new ArrayList<Integer>();
this.middlePointIndexCache = new HashMap<Long, Integer>();
this.index = 0;

// create 12 vertices of a icosahedron
float t = (float) ((1.0f + Math.sqrt(5.0f)) / 2.0f);

addVertex(new SimpleVector(-1, t, 0));
addVertex(new SimpleVector(1, t, 0));
addVertex(new SimpleVector(-1, -t, 0));
addVertex(new SimpleVector(1, -t, 0));

addVertex(new SimpleVector(0, -1, t));
addVertex(new SimpleVector(0, 1, t));
addVertex(new SimpleVector(0, -1, -t));
addVertex(new SimpleVector(0, 1, -t));

addVertex(new SimpleVector(t, 0, -1));
addVertex(new SimpleVector(t, 0, 1));
addVertex(new SimpleVector(-t, 0, -1));
addVertex(new SimpleVector(-t, 0, 1));

// create 20 triangles of the icosahedron
List<TriangleIndices> faces = new ArrayList<TriangleIndices>();

// 5 faces around point 0
faces.add(new TriangleIndices(0, 11, 5));
faces.add(new TriangleIndices(0, 5, 1));
faces.add(new TriangleIndices(0, 1, 7));
faces.add(new TriangleIndices(0, 7, 10));
faces.add(new TriangleIndices(0, 10, 11));

// 5 adjacent faces
faces.add(new TriangleIndices(1, 5, 9));
faces.add(new TriangleIndices(5, 11, 4));
faces.add(new TriangleIndices(11, 10, 2));
faces.add(new TriangleIndices(10, 7, 6));
faces.add(new TriangleIndices(7, 1, 8));

// 5 faces around point 3
faces.add(new TriangleIndices(3, 9, 4));
faces.add(new TriangleIndices(3, 4, 2));
faces.add(new TriangleIndices(3, 2, 6));
faces.add(new TriangleIndices(3, 6, 8));
faces.add(new TriangleIndices(3, 8, 9));

// 5 adjacent faces
faces.add(new TriangleIndices(4, 9, 5));
faces.add(new TriangleIndices(2, 4, 11));
faces.add(new TriangleIndices(6, 2, 10));
faces.add(new TriangleIndices(8, 6, 7));
faces.add(new TriangleIndices(9, 8, 1));

// refine triangles
for (int i = 0; i < recursionLevel; i++) {
List<TriangleIndices> faces2 = new ArrayList<TriangleIndices>();
for (TriangleIndices tri : faces) {
// replace triangle by 4 triangles
int a = getMiddlePoint(tri.v1, tri.v2);
int b = getMiddlePoint(tri.v2, tri.v3);
int c = getMiddlePoint(tri.v3, tri.v1);

faces2.add(new TriangleIndices(tri.v1, a, c));
faces2.add(new TriangleIndices(tri.v2, b, a));
faces2.add(new TriangleIndices(tri.v3, c, b));
faces2.add(new TriangleIndices(a, b, c));
}
faces = faces2;
}

// done, now add triangles to mesh
for (TriangleIndices tri : faces) {
this.vertexDataIndices.add(tri.v1);
this.vertexDataIndices.add(tri.v2);
this.vertexDataIndices.add(tri.v3);
}

Object3D obj = new Object3D(vertexDataIndices.size() / 3);

for (int c = 0; c < (vertexDataIndices.size() / 3); c++) {

final SimpleVector aa = vertexData
.get(vertexDataIndices.get(c * 3));
final SimpleVector aaP = cartesianToPolar(aa, true);
final SimpleVector bb = vertexData.get(vertexDataIndices
.get(c * 3 + 1));
final SimpleVector bbP = cartesianToPolar(bb, true);
final SimpleVector cc = vertexData.get(vertexDataIndices
.get(c * 3 + 2));
final SimpleVector ccP = cartesianToPolar(cc, true);

// texture corrections...
if (Math.abs(aaP.z - bbP.z) > 0.5f) {
if(aaP.z>bbP.z){
aaP.z-=1.0f;
}else{
bbP.z-=1.0f;
}
}
if (Math.abs(aaP.z - ccP.z) > 0.5f) {
if(aaP.z>ccP.z){
aaP.z-=1.0f;
}else{
ccP.z-=1.0f;
}
}
if (Math.abs(bbP.z - ccP.z) > 0.5f) {
if(ccP.z>bbP.z){
ccP.z-=1.0f;
}else{
bbP.z-=1.0f;
}
}

obj.addTriangle(aa, aaP.z, aaP.y, bb, bbP.z, bbP.y, cc, ccP.z,
ccP.y);
}

obj.getMesh().getTriangleCount();
return obj;
}

public static SimpleVector cartesianToPolar(SimpleVector cartesian,
boolean normalize) {
if (normalize) {
return new SimpleVector(
cartesian.length(),
1.0 - (Math.acos(cartesian.y / cartesian.length()) / Math.PI),
1.0 - (Math.atan2(cartesian.x, cartesian.z) + Math.PI / 2.0)
/ (Math.PI * 2.0) );
}
return new SimpleVector(cartesian.length(), Math.acos(cartesian.z
/ cartesian.length()), Math.atan2(cartesian.y, cartesian.x));

}

Any idea what I'm doing wrong here?

9
Support / Re: Camera rotation issue
« on: July 17, 2018, 02:50:48 pm »
So I have a spherical object (which position changes every draw call).
For that, I need to move the camera along with the object which is step 1 (settings the camera's position to the center of the sphere)
But the user might have some touch interaction going on (which changes the camera rotation)
Also autorotation could be enabled (which also changes camera rotation)
I basically change the rotation of the camera while the camera is in the center of the spherical object.
And only after that I apply step 3 (Camera.MOVE_OUT), this makes sure that the camera faces the center of the spherical object.
But it's not like I'm using Camera.MOVE_OUT with diffferent radia, it's fixed.

EDIT: I just noticed that I swapped step 1 and step 2 in my code... but that still shouldn't matter I believe

Only when autorotation is enabled it will start to get messy after a while. (the spherical object is no longer perfectly in the center)
When you try to change the rotation with touch(or autorotation), it will look like the spherical object is also rotating around some (really small) pivot point (which isn't really there since it should just be the object's center)
But at launch (when autorotation hasn't been active for long) the rotation using touch (or autorotation) works fine and there's no weird offsets or extra 'pivot point'.

The spherical object does actually rotate around some pivot, but this position is reset every draw call (so I don't think it's related to this).
The camera's rotation is never reset so I think the issue might lie here... (long-term rotations causing accuracy issues)

_______________________
SIMPLIFIED CODE FOR DRAW CALLS:
_______________________
object.clearRotation();
object.clearTranslation();
object.translate(blahblah1);
object.rotate(blahblah2); // I personally don't think the issue is here since the rotations aren't accumulated but reset for every draw call

camera.rotateX(touchX+autorotationX);
camera.rotateX(touchY+autorotationY);
camera.rotateZ(dualTouchZ+autorotationZ);

camera.setPosition(object.getTransformedCenter());

camera.moveCamera(Camera.CAMERA_MOVEOUT, someRadius);

10
Support / Camera rotation issue
« on: July 14, 2018, 01:34:13 pm »
Hello,

I got a small issue with camera rotations.
My camera automatically rotates around a spherical object like this:
1. Set camera position to center of sphere.
2. Apply rotations
3. Camera.MOVE_OUT
This all works fine but after a long while (let's say 8+ hours) the rotation around the sphere don't seem spherical any more (or the rotation pivot center has some offset).
But the spherical object that the camera is facing isn't in the center any more but slightly offset. The longer you wait the worse this offset gets.
I suppose it'd have to do something with floating point precision but I'm not sure.
Any solutions?

Cheers

11
Support / Re: Crash (native)
« on: April 06, 2018, 12:08:44 am »
Okay, good and bad news I guess:

Good news:
The SIGSEGV reports seemed to have stopped (on Android 7.1.2 and below at least..).
So the solution to have all vertices/Object3D's loaded to the GPU before any blit/texture data upload seemed to have worked..?

Bad news:
However, I've been getting a new SIGSEGV error now (which only seems to happen on Android 8.0..?):
Crashreport:
On OnePlus 5T and Huawei P20 Lite
Code: [Select]
backtrace:
  #00  pc 000000000030b868  /system/lib64/libskia.so (_ZN15SkScalerContext10getMetricsEP7SkGlyph+40)
  #01  pc 0000000000283b0c  /system/lib64/libskia.so (_ZN12SkGlyphCache16allocateNewGlyphE15SkPackedGlyphIDNS_11MetricsTypeE+360)
  #02  pc 000000000028396c  /system/lib64/libskia.so (_ZN12SkGlyphCache17getGlyphIDMetricsEt+16)
  #03  pc 0000000000278b20  /system/lib64/libskia.so (_ZN19SkFindAndPlaceGlyph26GlyphFindAndPlaceFullPixelIR12DrawOneGlyphLN7SkPaint5AlignE0ELNS_13SelectKerningE0EE20findAndPositionGlyphEPPKc7SkPointS2_+40)
  #04  pc 0000000000276040  /system/lib64/libskia.so (_ZN19SkFindAndPlaceGlyph14ProcessPosTextIR12DrawOneGlyphEEvN7SkPaint12TextEncodingEPKcm7SkPointRK8SkMatrixPKfiNS3_5AlignEP12SkGlyphCacheOT_+972)
  #05  pc 0000000000275bb8  /system/lib64/libskia.so (_ZNK6SkDraw11drawPosTextEPKcmPKfiRK7SkPointRK7SkPaintPK14SkSurfaceProps+400)
  #06  pc 00000000001f41d4  /system/lib64/libskia.so (_ZN14SkBitmapDevice11drawPosTextEPKvmPKfiRK7SkPointRK7SkPaint+112)
  #07  pc 000000000026ee40  /system/lib64/libskia.so (_ZN12SkBaseDevice12drawTextBlobEPK10SkTextBlobffRK7SkPaintP12SkDrawFilter+432)
  #08  pc 0000000000215068  /system/lib64/libskia.so (_ZN8SkCanvas14onDrawTextBlobEPK10SkTextBlobffRK7SkPaint+500)
  #09  pc 0000000000215a20  /system/lib64/libskia.so (_ZN8SkCanvas12drawTextBlobEPK10SkTextBlobffRK7SkPaint+236)
  #10  pc 00000000002600b4  /system/lib64/libskia.so (_ZN23SkColorSpaceXformCanvas14onDrawTextBlobEPK10SkTextBlobffRK7SkPaint+84)
  #11  pc 0000000000215a20  /system/lib64/libskia.so (_ZN8SkCanvas12drawTextBlobEPK10SkTextBlobffRK7SkPaint+236)
  #12  pc 0000000000095f78  /system/lib64/libhwui.so (_ZN7android10SkiaCanvas10drawGlyphsEPKtPKfiRK7SkPaintfffffff+300)
  #13  pc 0000000000037684  /system/lib64/libhwui.so (_ZN7android15DrawTextFunctorclEmm+368)
  #14  pc 0000000000037194  /system/lib64/libhwui.so (_ZN7android12MinikinUtils10forFontRunINS_15DrawTextFunctorEEEvRKN7minikin6LayoutEPNS_5PaintERT_+276)
  #15  pc 0000000000036f98  /system/lib64/libhwui.so (_ZN7android6Canvas8drawTextEPKtiiiffiRKNS_5PaintEPNS_8TypefaceE+356)
  #16  pc 0000000000130b18  /system/lib64/libandroid_runtime.so (_ZN7android9CanvasJNIL14drawTextStringEP7_JNIEnvP8_jobjectlP8_jstringiiffill+136)
  #17  pc 0000000000b5f6b4  /system/framework/arm64/boot-framework.oat (android.graphics.BaseCanvas.nDrawText [DEDUPED]+244)
  #18  pc 0000000000b62cd8  /system/framework/arm64/boot-framework.oat (android.graphics.BaseCanvas.drawText+216)
  #19  pc 0000000000b74924  /system/framework/arm64/boot-framework.oat (android.graphics.Canvas.drawText+52)
  #20  pc 000000000128b2e8  /system/framework/arm64/boot-framework.oat (android.text.BoringLayout.draw+136)
  #21  pc 0000000001540fb4  /system/framework/arm64/boot-framework.oat (android.widget.TextView.onDraw+3316)
  #22  pc 00000000010f6b90  /system/framework/arm64/boot-framework.oat (android.view.View.draw+256)
  #23  pc 00000000010f8360  /system/framework/arm64/boot-framework.oat (android.view.View.draw+3616)
  #24  pc 00000000013c64d4  /system/framework/arm64/boot-framework.oat (android.view.ViewGroup.drawChild+68)
  #25  pc 00000000013c1248  /system/framework/arm64/boot-framework.oat (android.view.ViewGroup.dispatchDraw+1464)
  #26  pc 00000000010f6ba8  /system/framework/arm64/boot-framework.oat (android.view.View.draw+280)
  #27  pc 0000000000509384  /system/lib64/libart.so (art_quick_invoke_stub+580)
  #28  pc 00000000000d8078  /system/lib64/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+200)
  #29  pc 00000000002821dc  /system/lib64/libart.so (_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+352)
  #30  pc 000000000027c8a4  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+672)
  #31  pc 00000000004f3d30  /system/lib64/libart.so (MterpInvokeVirtualQuick+680)
  #32  pc 00000000004fea94  /system/lib64/libart.so (ExecuteMterpImpl+29972)
  #33  pc 000000000025d620  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+444)
  #34  pc 0000000000263d20  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #35  pc 000000000027c884  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
  #36  pc 00000000004f1e78  /system/lib64/libart.so (MterpInvokeDirect+504)
  #37  pc 00000000004fae14  /system/lib64/libart.so (ExecuteMterpImpl+14484)
  #38  pc 000000000025d620  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+444)
  #39  pc 0000000000263d20  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #40  pc 000000000027c884  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
  #41  pc 00000000004f1e78  /system/lib64/libart.so (MterpInvokeDirect+504)
  #42  pc 00000000004fae14  /system/lib64/libart.so (ExecuteMterpImpl+14484)
  #43  pc 000000000025d620  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+444)
  #44  pc 0000000000263d20  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #45  pc 000000000027c884  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
  #46  pc 00000000004f3d30  /system/lib64/libart.so (MterpInvokeVirtualQuick+680)
  #47  pc 00000000004fea94  /system/lib64/libart.so (ExecuteMterpImpl+29972)
  #48  pc 000000000025d620  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+444)
  #49  pc 0000000000263d20  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #50  pc 000000000027d6f4  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb1ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+584)
  #51  pc 00000000004f3754  /system/lib64/libart.so (MterpInvokeDirectRange+424)
  #52  pc 00000000004fb114  /system/lib64/libart.so (ExecuteMterpImpl+15252)
  #53  pc 000000000025d620  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+444)
  #54  pc 0000000000263d20  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #55  pc 000000000027c884  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
  #56  pc 00000000004f1e78  /system/lib64/libart.so (MterpInvokeDirect+504)
  #57  pc 00000000004fae14  /system/lib64/libart.so (ExecuteMterpImpl+14484)
  #58  pc 000000000025d620  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+444)
  #59  pc 0000000000263d20  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #60  pc 000000000027c884  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
  #61  pc 00000000004f1e78  /system/lib64/libart.so (MterpInvokeDirect+504)
  #62  pc 00000000004fae14  /system/lib64/libart.so (ExecuteMterpImpl+14484)
  #63  pc 000000000025d620  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+444)

Galaxy S8 And Galaxy S8+
Code: [Select]
backtrace:
  #00  pc 00400e60f947a908  <unknown>
  #01  pc 0000000000330400  /system/lib64/libskia.so (_ZN15SkScalerContext10getMetricsEP7SkGlyph+48)
  #02  pc 000000000029f404  /system/lib64/libskia.so (_ZN12SkGlyphCache16allocateNewGlyphE15SkPackedGlyphIDNS_11MetricsTypeE+372)
  #03  pc 000000000029f250  /system/lib64/libskia.so (_ZN12SkGlyphCache17getGlyphIDMetricsEt+16)
  #04  pc 0000000000293b38  /system/lib64/libskia.so (_ZN19SkFindAndPlaceGlyph26GlyphFindAndPlaceFullPixelIR12DrawOneGlyphLN7SkPaint5AlignE0ELNS_13SelectKerningE0EE20findAndPositionGlyphEPPKc7SkPointS2_+40)
  #05  pc 0000000000290ecc  /system/lib64/libskia.so (_ZN19SkFindAndPlaceGlyph14ProcessPosTextIR12DrawOneGlyphEEvN7SkPaint12TextEncodingEPKcm7SkPointRK8SkMatrixPKfiNS3_5AlignEP12SkGlyphCacheOT_+940)
  #06  pc 0000000000290a60  /system/lib64/libskia.so (_ZNK6SkDraw11drawPosTextEPKcmPKfiRK7SkPointRK7SkPaintPK14SkSurfaceProps+400)
  #07  pc 000000000020ad00  /system/lib64/libskia.so (_ZN14SkBitmapDevice11drawPosTextEPKvmPKfiRK7SkPointRK7SkPaint+112)
  #08  pc 00000000002897e4  /system/lib64/libskia.so (_ZN12SkBaseDevice12drawTextBlobEPK10SkTextBlobffRK7SkPaintP12SkDrawFilter+436)
  #09  pc 000000000022e1cc  /system/lib64/libskia.so (_ZN8SkCanvas14onDrawTextBlobEPK10SkTextBlobffRK7SkPaint+524)
  #10  pc 000000000022ebbc  /system/lib64/libskia.so (_ZN8SkCanvas12drawTextBlobEPK10SkTextBlobffRK7SkPaint+236)
  #11  pc 0000000000279fc4  /system/lib64/libskia.so (_ZN23SkColorSpaceXformCanvas14onDrawTextBlobEPK10SkTextBlobffRK7SkPaint+84)
  #12  pc 000000000022ebbc  /system/lib64/libskia.so (_ZN8SkCanvas12drawTextBlobEPK10SkTextBlobffRK7SkPaint+236)
  #13  pc 000000000009d92c  /system/lib64/libhwui.so (_ZN7android10SkiaCanvas10drawGlyphsEPKtPKfiRK7SkPaintfffffff+300)
  #14  pc 0000000000039380  /system/lib64/libhwui.so (_ZN7android15DrawTextFunctorclEmm+368)
  #15  pc 0000000000038e84  /system/lib64/libhwui.so (_ZN7android12MinikinUtils10forFontRunINS_15DrawTextFunctorEEEvRKN7minikin6LayoutEPNS_5PaintERT_+276)
  #16  pc 0000000000038c84  /system/lib64/libhwui.so (_ZN7android6Canvas8drawTextEPKtiiiffiRKNS_5PaintEPNS_8TypefaceE+356)
  #17  pc 0000000000177448  /system/lib64/libandroid_runtime.so (_ZN7android9CanvasJNIL14drawTextStringEP7_JNIEnvP8_jobjectlP8_jstringiiffill+136)
  #18  pc 0000000000bb5f34  /system/framework/arm64/boot-framework.oat (android.graphics.BaseCanvas.nDrawText [DEDUPED]+244)
  #19  pc 0000000000bb95d4  /system/framework/arm64/boot-framework.oat (android.graphics.BaseCanvas.drawText+244)
  #20  pc 0000000000bcaad4  /system/framework/arm64/boot-framework.oat (android.graphics.Canvas.drawText+52)
  #21  pc 00000000013ab328  /system/framework/arm64/boot-framework.oat (android.text.BoringLayout.draw+136)
  #22  pc 000000000167c3bc  /system/framework/arm64/boot-framework.oat (android.widget.TextView.onDraw+3980)
  #23  pc 0000000001158814  /system/framework/arm64/boot-framework.oat (android.view.View.draw+308)
  #24  pc 000000000115a0f0  /system/framework/arm64/boot-framework.oat (android.view.View.draw+3616)
  #25  pc 00000000011934e0  /system/framework/arm64/boot-framework.oat (android.view.ViewGroup.drawChild+64)
  #26  pc 000000000118dd1c  /system/framework/arm64/boot-framework.oat (android.view.ViewGroup.dispatchDraw+1468)
  #27  pc 000000000115882c  /system/framework/arm64/boot-framework.oat (android.view.View.draw+332)
  #28  pc 000000000052df84  /system/lib64/libart.so (art_quick_invoke_stub+580)
  #29  pc 00000000000d86a8  /system/lib64/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+200)
  #30  pc 0000000000291720  /system/lib64/libart.so (_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+352)
  #31  pc 000000000028bd30  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+672)
  #32  pc 0000000000518898  /system/lib64/libart.so (MterpInvokeVirtualQuick+680)
  #33  pc 0000000000523714  /system/lib64/libart.so (ExecuteMterpImpl+29972)
  #34  pc 000000000026bed0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+448)
  #35  pc 0000000000272794  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #36  pc 000000000028bd10  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
  #37  pc 00000000005169b8  /system/lib64/libart.so (MterpInvokeDirect+504)
  #38  pc 000000000051fa94  /system/lib64/libart.so (ExecuteMterpImpl+14484)
  #39  pc 000000000026bed0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+448)
  #40  pc 0000000000272794  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #41  pc 000000000028bd10  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
  #42  pc 00000000005169b8  /system/lib64/libart.so (MterpInvokeDirect+504)
  #43  pc 000000000051fa94  /system/lib64/libart.so (ExecuteMterpImpl+14484)
  #44  pc 000000000026bed0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+448)
  #45  pc 0000000000272794  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #46  pc 000000000028bd10  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
  #47  pc 0000000000518898  /system/lib64/libart.so (MterpInvokeVirtualQuick+680)
  #48  pc 0000000000523714  /system/lib64/libart.so (ExecuteMterpImpl+29972)
  #49  pc 000000000026bed0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+448)
  #50  pc 0000000000272794  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #51  pc 000000000028cbec  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb1ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+684)
  #52  pc 00000000005182b8  /system/lib64/libart.so (MterpInvokeDirectRange+424)
  #53  pc 000000000051fd94  /system/lib64/libart.so (ExecuteMterpImpl+15252)
  #54  pc 000000000026bed0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+448)
  #55  pc 0000000000272794  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #56  pc 000000000028bd10  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
  #57  pc 00000000005169b8  /system/lib64/libart.so (MterpInvokeDirect+504)
  #58  pc 000000000051fa94  /system/lib64/libart.so (ExecuteMterpImpl+14484)
  #59  pc 000000000026bed0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+448)
  #60  pc 0000000000272794  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #61  pc 000000000028bd10  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
  #62  pc 00000000005169b8  /system/lib64/libart.so (MterpInvokeDirect+504)
  #63  pc 000000000051fa94  /system/lib64/libart.so (ExecuteMterpImpl+14484)

Seems to be a similar crash on all 4 devices (just different code-lines on the Samsung devices)

EDIT: I'm actually not sure if this SIGSEGV is related to jPCT... :|

12
Support / Re: Need advice in my Project.
« on: April 01, 2018, 03:32:49 pm »
I would create a variable for the renderer and a variable for the iast value from the Arduino.
Then for every draw call: rendererVariable = 0.8f* rendererVariable + 0.2f  * arduinoValue;
So it will slowly adopt to the arduinoValue.

I'm not sure if you mean something like this...

13
Support / Re: Best/Fastest way to make objects visible/invisible
« on: April 01, 2018, 03:28:42 pm »
I thought Object3D had a method to set their visibility, not quite sure though.
Object3D.setVisibility(false);

Another solution could be to place the Object3D 'behind' the camera

14
Projects / Re: Instrument Cluster for a Muscle Car
« on: March 30, 2018, 07:34:37 pm »
Looks cool! Interesting idea too, good luck! :)

I suppose it's mostly or only 2D?

15
Support / Re: Crash (native)
« on: March 18, 2018, 04:38:30 pm »
Yes, it's save and it's cheap. However, compiling the object fixes the texture stage count for it. That's why you are getting that exception with the TextureInfo. YOu could assign a TextureInfo with the same amount of stage but using some dummy textures, compile, assing the actual textures. That should actually work.
So I tried this with two TextureInfo's (one 3-layered with dummy textureID and one 3-layered with the actual textureID's) but I am still getting the Exception.

Code: [Select]
final int dummyID = textureManager.getTextureID(textureManager.getNameByTexture(textureManager.getDummyTexture()));
final TextureInfo ti = new TextureInfo(dummyID);
ti.add(dummyID, TextureInfo.MODE_ADD);
ti.add(dummyID, TextureInfo.MODE_ADD);

obj.setTexture(ti);
obj.build();
obj.compile();
obj.strip();

world.addObject(obj);
world.renderScene(frameBuffer);
world.draw(frameBuffer);

This is how I first load the Object3D with 3 (not even sure if it actually gives 3...) texturelayers.

But when I apply the real TextureInfo (after loading Textures and getting their ID's) it will crash:
Code: [Select]
03-18 11:35:18.768: E/AndroidRuntime(4487): java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
03-18 11:35:18.768: E/AndroidRuntime(4487): at com.threed.jpct.Object3D.setTexture(Object3D.java:3660)
When the real TextureInfo only holds one texture(layer) it won't crash... So it doesn't really seem to set 3 layers using the dummy textures or something..?

EDIT:
I moved the obj.strip() line to after applying the real TextureInfo, which seemed to fix it...

Pages: [1] 2 3 ... 13