getTransformedCenter() is in front and underneath it, instead of in the center. There's no triangle whatsoever outside of the model (I have checked), and even calcCenter() doesn't help with that.
Between you and your soccer team, Germany is in great favor with me today. : -)
I noticed that too in my test case. No idea why, it has to have something to do with the model import and/or Bones serialization. I would simple set the center to another, more fitting value after loading the model.
About soccer: :o
Which center are you using? The one of the Object3D returned by getRoot()? At least that's the one that i was using.
I tried both get(0)'s and getRoot()'s. Now, I'm getting something really strange: I added the following method. Even as the spheres visually approach each other, the distance as printed by System.out.println("Distance: "+player.model.getRoot().getTransformedCenter().distance(computer.model.getRoot().getTransformedCenter())) grows.
private void fixCenters() {
if (ironMan.getIronVersion() == IronMan.IRON_PATRIOT) {
SimpleVector newCenter = ironMan.model.getRoot().getTransformedCenter();
newCenter.x -= 100f;
newCenter.y -= 250f;//250f
ironMan.model.getRoot().setCenter(newCenter);
Object3D center = Primitives.getSphere(30f);
center.build();
center.translate(ironMan.model.getRoot().getTransformedCenter());
ironMan.model.getRoot().addChild(center);
theWorld.addObject(center);
}
SimpleVector c = superman.model.getRoot().getTransformedCenter();
c.z-= 150f;
superman.model.getRoot().setCenter(c);
Object3D superCenter = Primitives.getSphere(30f);
superCenter.build();
superCenter.translate(superman.model.getRoot().getTransformedCenter());
superman.model.getRoot().addChild(superCenter);
theWorld.addObject(superCenter);
}
Can you provide some sample output of superman.model.getRoot().getTransformedCenter() / superman.model.getRoot().getTranslation()?
After all, center is just a point in object space. It has no relevance for anything inside the engine and all that happens when calling getTransformedCenter() is that this point will be transformed by the current world transformation and the resulting point will be returned.
I see your point, but the balls are where I want them to be and they are approaching each other. The following screenshot shows Iron Patriot moving towards Superman while the distance printout grows.
(https://dl.dropboxusercontent.com/u/93826015/SupermanVsIronManDistance.jpg)
Oh, and I assume you meant getTranslation(): Superman center: (-10.0,9.6,10.0) Translation: (-5.0,4.8,80.0)
Those differences are very minor. They might as well be introduced by the rotation pivot being slightly off or similar. What happens if you move the models closer together? Do these values still increase?
The differences are very minor per frame. And yes, Iron Patriot is going right through Superman and just keeps going.
No idea how this is supposed to happen. But then again, i've no idea what getRoot() actually returns. I would like to see a complete output of
translation of both entities/transformed center of both entities/distance
for a complete run from the start to the point where the entities actually met (maybe not for every frame...but you get the idea).
I didn't want to abandon this thread, so I'll post my solution: since I knew that the spheres were approaching each other,I tested for the centers of the spheres instead of the centers of getRoot(). But I do think that it's a bug in Bones that the distances grow while visually they should be shrinking (here's a question whose answer I think that I know: would getRoot()'s object space position change at all ever?).
I've no idea what getRoot() actually returns and how it relates to transformations of the objects, so i can't answer that... :(
Quote from: EgonOlsen on July 15, 2014, 09:51:14 PM
I've no idea what getRoot() actually returns and how it relates to transformations of the objects, so i can't answer that... :(
getRoot() returns the root object that all animated objects are added as child. Root object is a dummy object, it isn't added to world. it is created by Object3D.createDummyObj(). it's intented to translate/rotate the whole AnimatedGroup easily.
That's what i expected, but i have to idea why it should show this odd distance behaviour then... ???
On two of my computers, I discovered today, I'm having a problem with the Mark 42 model in which the program crashes. I get a JVM log and all. The exact same program runs fine with either Mark 3 or Iron Patriot. It must be a very specific memory thing that only happens on that model and with certain video drivers...
Can you post the log please?
Yup:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000000a67fc74, pid=5856, tid=7068
#
# JRE version: Java(TM) SE Runtime Environment (7.0_51-b13) (build 1.7.0_51-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.51-b03 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C 0x000000000a67fc74
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
--------------- T H R E A D ---------------
Current thread (0x000000000cfc2800): JavaThread "AWT-EventQueue-0" [_thread_in_native, id=7068, stack(0x000000000eb40000,0x000000000ec40000)]
siginfo: ExceptionCode=0xc0000005, reading address 0x0000000016fb5000
Registers:
RAX=0x0000000018f61364, RBX=0x000000000a790000, RCX=0x0000000000005a0e, RDX=0x00000000000003af
RSP=0x000000000ec3cf20, RBP=0x000000003f4fe404, RSI=0x0000000016fb4ffc, RDI=0x0000000000000000
R8 =0x0000000000000000, R9 =0x0000000000005dbd, R10=0x00000000113a0080, R11=0x000000000a7dae58
R12=0x0000000018e26054, R13=0x0000000000000000, R14=0x0000000000005dbd, R15=0x0000000000000000
RIP=0x000000000a67fc74, EFLAGS=0x0000000000010216
Top of Stack: (sp=0x000000000ec3cf20)
0x000000000ec3cf20: 0000000000000000 0000000000000004
0x000000000ec3cf30: 0000000000000000 000000000a790000
0x000000000ec3cf40: 00000000113a0080 000000005b94b4d2
0x000000000ec3cf50: 000000000a790000 00000000113a0080
0x000000000ec3cf60: 0000000000148158 00000000113a0080
0x000000000ec3cf70: 000000000a790000 000000000a7dae58
0x000000000ec3cf80: 000000000cfc2800 0000000000000004
0x000000000ec3cf90: 00000000113a0080 0000000000000000
0x000000000ec3cfa0: 000000000a790000 000000005b948ef8
0x000000000ec3cfb0: 000000000a790000 0000000000005dbd
0x000000000ec3cfc0: 0000000000000000 000000009cbed248
0x000000000ec3cfd0: 0000000000000000 000000000ec3d0c8
0x000000000ec3cfe0: 000000000ec3d108 000000005b59dfb2
0x000000000ec3cff0: 000000000a790000 000000000ec3d0c8
0x000000000ec3d000: 0000000000000000 0000000000000004
0x000000000ec3d010: 0000000000000000 00000000025235c4
Instructions: (pc=0x000000000a67fc74)
0x000000000a67fc54: 89 78 18 89 68 1c 48 be 18 ba 7d 0a 00 00 00 00
0x000000000a67fc64: 48 8b 36 48 8b b6 00 02 00 00 48 8d 34 ce 8b 3e
0x000000000a67fc74: 8b 6e 04 89 78 20 89 68 24 48 be 18 ba 7d 0a 00
0x000000000a67fc84: 00 00 00 48 8b 36 48 8b b6 38 02 00 00 48 8d 34
Register to memory mapping:
RAX=0x0000000018f61364 is an unknown value
RBX=0x000000000a790000 is pointing into the stack for thread: 0x00000000094ec800
RCX=0x0000000000005a0e is an unknown value
RDX=0x00000000000003af is an unknown value
RSP=0x000000000ec3cf20 is pointing into the stack for thread: 0x000000000cfc2800
RBP=0x000000003f4fe404 is an unknown value
RSI=0x0000000016fb4ffc is an unknown value
RDI=0x0000000000000000 is an unknown value
R8 =0x0000000000000000 is an unknown value
R9 =0x0000000000005dbd is an unknown value
R10=0x00000000113a0080 is an unknown value
R11=0x000000000a7dae58 is an unknown value
R12=0x0000000018e26054 is an unknown value
R13=0x0000000000000000 is an unknown value
R14=0x0000000000005dbd is an unknown value
R15=0x0000000000000000 is an unknown value
Stack: [0x000000000eb40000,0x000000000ec40000], sp=0x000000000ec3cf20, free space=1011k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C 0x000000000a67fc74
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j org.lwjgl.opengl.GL11.nglDrawArrays(IIIJ)V+0
j org.lwjgl.opengl.GL11.glDrawArrays(III)V+20
j com.threed.jpct.CompiledInstance.render(ILcom/threed/jpct/GLBase;Ljava/nio/FloatBuffer;[FZLcom/threed/jpct/Camera;[[FZ[Ljava/lang/Object;)V+2453
j com.threed.jpct.AWTGLRenderer.drawVertexArray(Lcom/threed/jpct/AWTDisplayList;I)V+1952
j com.threed.jpct.AWTJPCTCanvas.paintGL()V+149
j org.lwjgl.opengl.AWTGLCanvas.paint(Ljava/awt/Graphics;)V+172
j org.lwjgl.opengl.AWTGLCanvas.update(Ljava/awt/Graphics;)V+2
j sun.awt.RepaintArea.updateComponent(Ljava/awt/Component;Ljava/awt/Graphics;)V+6
j sun.awt.RepaintArea.paint(Ljava/lang/Object;Z)V+263
j sun.awt.windows.WComponentPeer.handleEvent(Ljava/awt/AWTEvent;)V+155
j java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V+869
j java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V+2
j java.awt.EventQueue.dispatchEventImpl(Ljava/awt/AWTEvent;Ljava/lang/Object;)V+41
j java.awt.EventQueue.access$200(Ljava/awt/EventQueue;Ljava/awt/AWTEvent;Ljava/lang/Object;)V+3
j java.awt.EventQueue$3.run()Ljava/lang/Void;+12
j java.awt.EventQueue$3.run()Ljava/lang/Object;+1
v ~StubRoutines::call_stub
j java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;+0
j java.security.ProtectionDomain$1.doIntersectionPrivilege(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;Ljava/security/AccessControlContext;)Ljava/lang/Object;+28
j java.security.ProtectionDomain$1.doIntersectionPrivilege(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;+6
j java.awt.EventQueue$4.run()Ljava/lang/Void;+11
j java.awt.EventQueue$4.run()Ljava/lang/Object;+1
v ~StubRoutines::call_stub
j java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;+0
j java.security.ProtectionDomain$1.doIntersectionPrivilege(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;Ljava/security/AccessControlContext;)Ljava/lang/Object;+28
j java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V+73
j java.awt.EventDispatchThread.pumpOneEventForFilters(I)V+245
j java.awt.EventDispatchThread.pumpEventsForFilter(ILjava/awt/Conditional;Ljava/awt/EventFilter;)V+35
j java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+11
j java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4
j java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3
j java.awt.EventDispatchThread.run()V+9
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x000000000b5dc800 JavaThread "Thread-3" daemon [_thread_in_native, id=6428, stack(0x000000000f0e0000,0x000000000f1e0000)]
=>0x000000000cfc2800 JavaThread "AWT-EventQueue-0" [_thread_in_native, id=7068, stack(0x000000000eb40000,0x000000000ec40000)]
0x000000000b6ed000 JavaThread "AWT-Shutdown" [_thread_blocked, id=3276, stack(0x000000000beb0000,0x000000000bfb0000)]
0x000000000b748800 JavaThread "Image Fetcher 1" daemon [_thread_blocked, id=7416, stack(0x000000000d7d0000,0x000000000d8d0000)]
0x000000000b4c0800 JavaThread "Image Fetcher 0" daemon [_thread_blocked, id=8664, stack(0x000000000b9e0000,0x000000000bae0000)]
0x000000000b4b8000 JavaThread "AWT-Windows" daemon [_thread_in_native, id=8824, stack(0x000000000bb10000,0x000000000bc10000)]
0x000000000b3fc800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=4344, stack(0x000000000af80000,0x000000000b080000)]
0x0000000009561800 JavaThread "Service Thread" daemon [_thread_blocked, id=8584, stack(0x000000000ad60000,0x000000000ae60000)]
0x0000000009558000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=7516, stack(0x000000000b0a0000,0x000000000b1a0000)]
0x0000000009553000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=7556, stack(0x000000000ae70000,0x000000000af70000)]
0x000000000954d800 JavaThread "Attach Listener" daemon [_thread_blocked, id=2928, stack(0x000000000abd0000,0x000000000acd0000)]
0x0000000009546800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=6744, stack(0x000000000aa00000,0x000000000ab00000)]
0x00000000094f3800 JavaThread "Finalizer" daemon [_thread_blocked, id=8440, stack(0x000000000a830000,0x000000000a930000)]
0x00000000094ec800 JavaThread "Reference Handler" daemon [_thread_blocked, id=7160, stack(0x000000000a690000,0x000000000a790000)]
0x00000000021ad800 JavaThread "main" [_thread_blocked, id=7920, stack(0x0000000002410000,0x0000000002510000)]
Other Threads:
0x00000000094e7000 VMThread [stack: 0x000000000a560000,0x000000000a660000] [id=1100]
0x000000000956b800 WatcherThread [stack: 0x000000000b290000,0x000000000b390000] [id=2296]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
PSYoungGen total 262656K, used 191950K [0x00000000e0680000, 0x00000000f6000000, 0x0000000100000000)
eden space 173568K, 87% used [0x00000000e0680000,0x00000000e9b68c40,0x00000000eb000000)
from space 89088K, 44% used [0x00000000f0900000,0x00000000f2f8af28,0x00000000f6000000)
to space 90112K, 0% used [0x00000000eb000000,0x00000000eb000000,0x00000000f0800000)
ParOldGen total 421376K, used 286895K [0x00000000a1400000, 0x00000000baf80000, 0x00000000e0680000)
object space 421376K, 68% used [0x00000000a1400000,0x00000000b2c2bd08,0x00000000baf80000)
PSPermGen total 21504K, used 10725K [0x000000009c200000, 0x000000009d700000, 0x00000000a1400000)
object space 21504K, 49% used [0x000000009c200000,0x000000009cc79658,0x000000009d700000)
Card table byte_map: [0x0000000005510000,0x0000000005830000] byte_map_base: 0x000000000502f000
Polling page: 0x0000000000440000
Code Cache [0x0000000002510000, 0x0000000002780000, 0x0000000005510000)
total_blobs=925 nmethods=368 adapters=509 free_code_cache=47524Kb largest_free_block=48529216
Compilation events (10 events):
Event: 7.873 Thread 0x0000000009553000 nmethod 386% 0x00000000026b66d0 code [0x00000000026b6c80, 0x00000000026bb330]
Event: 7.873 Thread 0x0000000009553000 396 com.threed.jpct.GenericVertexController::updateMesh (614 bytes)
Event: 7.897 Thread 0x0000000009553000 nmethod 396 0x0000000002682290 code [0x0000000002682400, 0x0000000002682938]
Event: 7.897 Thread 0x0000000009553000 397 raft.jpct.bones.Animated3D::applySkeletonPose (468 bytes)
Event: 7.935 Thread 0x0000000009553000 nmethod 397 0x000000000262e890 code [0x000000000262ea20, 0x000000000262f7d8]
Event: 7.935 Thread 0x0000000009553000 398 java.nio.Buffer::nextGetIndex (31 bytes)
Event: 7.935 Thread 0x0000000009553000 nmethod 398 0x00000000026a2a50 code [0x00000000026a2b80, 0x00000000026a2bf8]
Event: 7.935 Thread 0x0000000009553000 399 ! com.threed.jpct.GLBase::convertTexture (1002 bytes)
Event: 8.066 Thread 0x0000000009558000 nmethod 395% 0x00000000026c0e90 code [0x00000000026c12e0, 0x00000000026c4918]
Event: 8.075 Thread 0x0000000009553000 nmethod 399 0x0000000002606d90 code [0x0000000002607220, 0x00000000026091c8]
GC Heap History (10 events):
Event: 5.386 GC heap before
{Heap before GC invocations=12 (full 4):
PSYoungGen total 129024K, used 76800K [0x00000000e0680000, 0x00000000f5580000, 0x0000000100000000)
eden space 76800K, 100% used [0x00000000e0680000,0x00000000e5180000,0x00000000e5180000)
from space 52224K, 0% used [0x00000000e5180000,0x00000000e5180000,0x00000000e8480000)
to space 114688K, 0% used [0x00000000ee580000,0x00000000ee580000,0x00000000f5580000)
ParOldGen total 421376K, used 286887K [0x00000000a1400000, 0x00000000baf80000, 0x00000000e0680000)
object space 421376K, 68% used [0x00000000a1400000,0x00000000b2c29d08,0x00000000baf80000)
PSPermGen total 21504K, used 10545K [0x000000009c200000, 0x000000009d700000, 0x00000000a1400000)
object space 21504K, 49% used [0x000000009c200000,0x000000009cc4c4b8,0x000000009d700000)
Event: 5.405 GC heap after
Heap after GC invocations=12 (full 4):
PSYoungGen total 216064K, used 29452K [0x00000000e0680000, 0x00000000f4a00000, 0x0000000100000000)
eden space 113152K, 0% used [0x00000000e0680000,0x00000000e0680000,0x00000000e7500000)
from space 102912K, 28% used [0x00000000ee580000,0x00000000f0243258,0x00000000f4a00000)
to space 109056K, 0% used [0x00000000e7500000,0x00000000e7500000,0x00000000edf80000)
ParOldGen total 421376K, used 286895K [0x00000000a1400000, 0x00000000baf80000, 0x00000000e0680000)
object space 421376K, 68% used [0x00000000a1400000,0x00000000b2c2bd08,0x00000000baf80000)
PSPermGen total 21504K, used 10545K [0x000000009c200000, 0x000000009d700000, 0x00000000a1400000)
object space 21504K, 49% used [0x000000009c200000,0x000000009cc4c4b8,0x000000009d700000)
}
Event: 6.043 GC heap before
{Heap before GC invocations=13 (full 4):
PSYoungGen total 216064K, used 142604K [0x00000000e0680000, 0x00000000f4a00000, 0x0000000100000000)
eden space 113152K, 100% used [0x00000000e0680000,0x00000000e7500000,0x00000000e7500000)
from space 102912K, 28% used [0x00000000ee580000,0x00000000f0243258,0x00000000f4a00000)
to space 109056K, 0% used [0x00000000e7500000,0x00000000e7500000,0x00000000edf80000)
ParOldGen total 421376K, used 286895K [0x00000000a1400000, 0x00000000baf80000, 0x00000000e0680000)
object space 421376K, 68% used [0x00000000a1400000,0x00000000b2c2bd08,0x00000000baf80000)
PSPermGen total 21504K, used 10569K [0x000000009c200000, 0x000000009d700000, 0x00000000a1400000)
object space 21504K, 49% used [0x000000009c200000,0x000000009cc526f8,0x000000009d700000)
Event: 6.051 GC heap after
Heap after GC invocations=13 (full 4):
PSYoungGen total 222208K, used 29356K [0x00000000e0680000, 0x00000000f5c80000, 0x0000000100000000)
eden space 113152K, 0% used [0x00000000e0680000,0x00000000e0680000,0x00000000e7500000)
from space 109056K, 26% used [0x00000000e7500000,0x00000000e91ab258,0x00000000edf80000)
to space 104448K, 0% used [0x00000000ef680000,0x00000000ef680000,0x00000000f5c80000)
ParOldGen total 421376K, used 286895K [0x00000000a1400000, 0x00000000baf80000, 0x00000000e0680000)
object space 421376K, 68% used [0x00000000a1400000,0x00000000b2c2bd08,0x00000000baf80000)
PSPermGen total 21504K, used 10569K [0x000000009c200000, 0x000000009d700000, 0x00000000a1400000)
object space 21504K, 49% used [0x000000009c200000,0x000000009cc526f8,0x000000009d700000)
}
Event: 6.410 GC heap before
{Heap before GC invocations=14 (full 4):
PSYoungGen total 222208K, used 138779K [0x00000000e0680000, 0x00000000f5c80000, 0x0000000100000000)
eden space 113152K, 96% used [0x00000000e0680000,0x00000000e715bbb8,0x00000000e7500000)
from space 109056K, 26% used [0x00000000e7500000,0x00000000e91ab258,0x00000000edf80000)
to space 104448K, 0% used [0x00000000ef680000,0x00000000ef680000,0x00000000f5c80000)
ParOldGen total 421376K, used 286895K [0x00000000a1400000, 0x00000000baf80000, 0x00000000e0680000)
object space 421376K, 68% used [0x00000000a1400000,0x00000000b2c2bd08,0x00000000baf80000)
PSPermGen total 21504K, used 10569K [0x000000009c200000, 0x000000009d700000, 0x00000000a1400000)
object space 21504K, 49% used [0x000000009c200000,0x000000009cc527f8,0x000000009d700000)
Event: 6.422 GC heap after
Heap after GC invocations=14 (full 4):
PSYoungGen total 233472K, used 29356K [0x00000000e0680000, 0x00000000f5200000, 0x0000000100000000)
eden space 139776K, 0% used [0x00000000e0680000,0x00000000e0680000,0x00000000e8f00000)
from space 93696K, 31% used [0x00000000ef680000,0x00000000f132b258,0x00000000f5200000)
to space 99840K, 0% used [0x00000000e8f00000,0x00000000e8f00000,0x00000000ef080000)
ParOldGen total 421376K, used 286895K [0x00000000a1400000, 0x00000000baf80000, 0x00000000e0680000)
object space 421376K, 68% used [0x00000000a1400000,0x00000000b2c2bd08,0x00000000baf80000)
PSPermGen total 21504K, used 10569K [0x000000009c200000, 0x000000009d700000, 0x00000000a1400000)
object space 21504K, 49% used [0x000000009c200000,0x000000009cc527f8,0x000000009d700000)
}
Event: 6.934 GC heap before
{Heap before GC invocations=15 (full 4):
PSYoungGen total 233472K, used 169132K [0x00000000e0680000, 0x00000000f5200000, 0x0000000100000000)
eden space 139776K, 100% used [0x00000000e0680000,0x00000000e8f00000,0x00000000e8f00000)
from space 93696K, 31% used [0x00000000ef680000,0x00000000f132b258,0x00000000f5200000)
to space 99840K, 0% used [0x00000000e8f00000,0x00000000e8f00000,0x00000000ef080000)
ParOldGen total 421376K, used 286895K [0x00000000a1400000, 0x00000000baf80000, 0x00000000e0680000)
object space 421376K, 68% used [0x00000000a1400000,0x00000000b2c2bd08,0x00000000baf80000)
PSPermGen total 21504K, used 10569K [0x000000009c200000, 0x000000009d700000, 0x00000000a1400000)
object space 21504K, 49% used [0x000000009c200000,0x000000009cc527f8,0x000000009d700000)
Event: 6.942 GC heap after
Heap after GC invocations=15 (full 4):
PSYoungGen total 239616K, used 29420K [0x00000000e0680000, 0x00000000f6680000, 0x0000000100000000)
eden space 139776K, 0% used [0x00000000e0680000,0x00000000e0680000,0x00000000e8f00000)
from space 99840K, 29% used [0x00000000e8f00000,0x00000000eabbb258,0x00000000ef080000)
to space 95744K, 0% used [0x00000000f0900000,0x00000000f0900000,0x00000000f6680000)
ParOldGen total 421376K, used 286895K [0x00000000a1400000, 0x00000000baf80000, 0x00000000e0680000)
object space 421376K, 68% used [0x00000000a1400000,0x00000000b2c2bd08,0x00000000baf80000)
PSPermGen total 21504K, used 10569K [0x000000009c200000, 0x000000009d700000, 0x00000000a1400000)
object space 21504K, 49% used [0x000000009c200000,0x000000009cc527f8,0x000000009d700000)
}
Event: 7.675 GC heap before
{Heap before GC invocations=16 (full 4):
PSYoungGen total 239616K, used 169196K [0x00000000e0680000, 0x00000000f6680000, 0x0000000100000000)
eden space 139776K, 100% used [0x00000000e0680000,0x00000000e8f00000,0x00000000e8f00000)
from space 99840K, 29% used [0x00000000e8f00000,0x00000000eabbb258,0x00000000ef080000)
to space 95744K, 0% used [0x00000000f0900000,0x00000000f0900000,0x00000000f6680000)
ParOldGen total 421376K, used 286895K [0x00000000a1400000, 0x00000000baf80000, 0x00000000e0680000)
object space 421376K, 68% used [0x00000000a1400000,0x00000000b2c2bd08,0x00000000baf80000)
PSPermGen total 21504K, used 10683K [0x000000009c200000, 0x000000009d700000, 0x00000000a1400000)
object space 21504K, 49% used [0x000000009c200000,0x000000009cc6ed68,0x000000009d700000)
Event: 7.744 GC heap after
Heap after GC invocations=16 (full 4):
PSYoungGen total 262656K, used 39467K [0x00000000e0680000, 0x00000000f6000000, 0x0000000100000000)
eden space 173568K, 0% used [0x00000000e0680000,0x00000000e0680000,0x00000000eb000000)
from space 89088K, 44% used [0x00000000f0900000,0x00000000f2f8af28,0x00000000f6000000)
to space 90112K, 0% used [0x00000000eb000000,0x00000000eb000000,0x00000000f0800000)
ParOldGen total 421376K, used 286895K [0x00000000a1400000, 0x00000000baf80000, 0x00000000e0680000)
object space 421376K, 68% used [0x00000000a1400000,0x00000000b2c2bd08,0x00000000baf80000)
PSPermGen total 21504K, used 10683K [0x000000009c200000, 0x000000009d700000, 0x00000000a1400000)
object space 21504K, 49% used [0x000000009c200000,0x000000009cc6ed68,0x000000009d700000)
}
Deoptimization events (10 events):
Event: 7.325 Thread 0x00000000021ad800 Uncommon trap: reason=unreached action=reinterpret pc=0x0000000002681314 method=com.threed.jpct.FrameBuffer.clearHardware(Ljava/awt/Color;)V @ 3
Event: 7.339 Thread 0x00000000021ad800 Uncommon trap: reason=bimorphic action=maybe_recompile pc=0x000000000258c728 method=java.util.HashMap.getEntry(Ljava/lang/Object;)Ljava/util/HashMap$Entry; @ 68
Event: 7.339 Thread 0x00000000021ad800 Uncommon trap: reason=bimorphic action=maybe_recompile pc=0x000000000258c728 method=java.util.HashMap.getEntry(Ljava/lang/Object;)Ljava/util/HashMap$Entry; @ 68
Event: 7.339 Thread 0x00000000021ad800 Uncommon trap: reason=bimorphic action=maybe_recompile pc=0x000000000258c728 method=java.util.HashMap.getEntry(Ljava/lang/Object;)Ljava/util/HashMap$Entry; @ 68
Event: 7.340 Thread 0x00000000021ad800 Uncommon trap: reason=bimorphic action=maybe_recompile pc=0x000000000258c728 method=java.util.HashMap.getEntry(Ljava/lang/Object;)Ljava/util/HashMap$Entry; @ 68
Event: 7.340 Thread 0x00000000021ad800 Uncommon trap: reason=bimorphic action=maybe_recompile pc=0x000000000267a610 method=java.util.HashMap.getEntry(Ljava/lang/Object;)Ljava/util/HashMap$Entry; @ 68
Event: 7.761 Thread 0x00000000021ad800 Uncommon trap: reason=unreached action=reinterpret pc=0x00000000026ac22c method=com.threed.jpct.Object3DCompiler.compile(Lcom/threed/jpct/Object3D;Lcom/threed/jpct/IRenderer;)V @ 456
Event: 7.823 Thread 0x00000000021ad800 Uncommon trap: reason=unreached action=reinterpret pc=0x00000000026758e0 method=com.threed.jpct.AWTDisplayList.switchBuffers()V @ 16
Event: 7.834 Thread 0x000000000cfc2800 Uncommon trap: reason=predicate action=maybe_recompile pc=0x0000000002697c38 method=com.threed.jpct.GLBase.convertTexture(Lcom/threed/jpct/Texture;)V @ 383
Event: 7.836 Thread 0x00000000021ad800 Uncommon trap: reason=unreached action=reinterpret pc=0x0000000002681694 method=com.threed.jpct.FrameBuffer.clearHardware(Ljava/awt/Color;)V @ 3
Internal exceptions (10 events):
Event: 7.326 Thread 0x00000000021ad800 Threw 0x00000000e64480c8 at C:\re\jdk7u51\527\hotspot\src\share\vm\prims\jvm.cpp:1244
Event: 7.327 Thread 0x00000000021ad800 Threw 0x00000000e644d8e8 at C:\re\jdk7u51\527\hotspot\src\share\vm\prims\jvm.cpp:1244
Event: 7.328 Thread 0x00000000021ad800 Threw 0x00000000e64525d8 at C:\re\jdk7u51\527\hotspot\src\share\vm\prims\jvm.cpp:1244
Event: 7.330 Thread 0x00000000021ad800 Threw 0x00000000e6454288 at C:\re\jdk7u51\527\hotspot\src\share\vm\prims\jvm.cpp:1244
Event: 7.342 Thread 0x00000000021ad800 Threw 0x00000000e6470bf0 at C:\re\jdk7u51\527\hotspot\src\share\vm\prims\jvm.cpp:1244
Event: 7.347 Thread 0x00000000021ad800 Threw 0x00000000e6b956a0 at C:\re\jdk7u51\527\hotspot\src\share\vm\prims\jvm.cpp:1244
Event: 7.823 Thread 0x00000000021ad800 Threw 0x00000000e2cf8be8 at C:\re\jdk7u51\527\hotspot\src\share\vm\interpreter\linkResolver.cpp:969
Event: 7.826 Thread 0x000000000cfc2800 Threw 0x00000000e2debac0 at C:\re\jdk7u51\527\hotspot\src\share\vm\prims\jvm.cpp:1244
Event: 7.834 Thread 0x000000000cfc2800 Implicit null exception at 0x0000000002697487 to 0x0000000002697c19
Event: 8.068 Thread 0x000000000cfc2800 Threw 0x00000000e58a23e0 at C:\re\jdk7u51\527\hotspot\src\share\vm\prims\jvm.cpp:1244
Events (10 events):
Event: 7.834 Thread 0x000000000cfc2800 DEOPT UNPACKING pc=0x00000000025475a4 sp=0x000000000ec3d108 mode 2
Event: 7.836 Thread 0x00000000021ad800 Uncommon trap: trap_request=0xffffffad fr.pc=0x0000000002681694
Event: 7.836 Thread 0x00000000021ad800 DEOPT PACKING pc=0x0000000002681694 sp=0x000000000250f0b0
Event: 7.836 Thread 0x00000000021ad800 DEOPT UNPACKING pc=0x00000000025475a4 sp=0x000000000250f050 mode 2
Event: 7.873 Thread 0x0000000009553000 flushing nmethod 0x0000000002625990
Event: 7.873 Thread 0x0000000009553000 flushing nmethod 0x00000000026280d0
Event: 7.873 Thread 0x0000000009553000 flushing nmethod 0x000000000262e310
Event: 7.897 Thread 0x0000000009553000 flushing nmethod 0x0000000002632ed0
Event: 8.068 loading class 0x000000000cfb8ae0
Event: 8.068 loading class 0x000000000cfb8ae0 done
Dynamic libraries:
0x000000013ff10000 - 0x000000013ff43000 C:\windows\system32\java.exe
0x00000000779f0000 - 0x0000000077b99000 C:\windows\SYSTEM32\ntdll.dll
0x00000000778d0000 - 0x00000000779ef000 C:\windows\system32\kernel32.dll
0x000007fefd8d0000 - 0x000007fefd93c000 C:\windows\system32\KERNELBASE.dll
0x000007fefe7b0000 - 0x000007fefe88b000 C:\windows\system32\ADVAPI32.dll
0x000007fefeac0000 - 0x000007fefeb5f000 C:\windows\system32\msvcrt.dll
0x000007fefede0000 - 0x000007fefedff000 C:\windows\SYSTEM32\sechost.dll
0x000007fefebe0000 - 0x000007fefed0d000 C:\windows\system32\RPCRT4.dll
0x00000000777d0000 - 0x00000000778ca000 C:\windows\system32\USER32.dll
0x000007feffb90000 - 0x000007feffbf7000 C:\windows\system32\GDI32.dll
0x000007fefe5f0000 - 0x000007fefe5fe000 C:\windows\system32\LPK.dll
0x000007fefed10000 - 0x000007fefedd9000 C:\windows\system32\USP10.dll
0x000007fefc380000 - 0x000007fefc574000 C:\windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_fa396087175ac9ac\COMCTL32.dll
0x000007fefeb60000 - 0x000007fefebd1000 C:\windows\system32\SHLWAPI.dll
0x000007fefe070000 - 0x000007fefe09e000 C:\windows\system32\IMM32.DLL
0x000007fefe600000 - 0x000007fefe709000 C:\windows\system32\MSCTF.dll
0x000007fefd760000 - 0x000007fefd78f000 C:\windows\system32\nvinitx.dll
0x000000000f000000 - 0x000000000f006000 C:\Program Files\NVIDIA Corporation\CoProcManager\_etoured.dll
0x000007fef7e30000 - 0x000007fef7e8f000 C:\Program Files\NVIDIA Corporation\CoProcManager\nvd3d9wrapx.dll
0x000007fefde90000 - 0x000007fefe067000 C:\windows\system32\SETUPAPI.dll
0x000007fefd870000 - 0x000007fefd8a6000 C:\windows\system32\CFGMGR32.dll
0x000007feffc00000 - 0x000007feffcd7000 C:\windows\system32\OLEAUT32.dll
0x000007fefe3e0000 - 0x000007fefe5e3000 C:\windows\system32\ole32.dll
0x000007fefdbb0000 - 0x000007fefdbca000 C:\windows\system32\DEVOBJ.dll
0x000007fef7de0000 - 0x000007fef7e26000 C:\Program Files\NVIDIA Corporation\CoProcManager\nvdxgiwrapx.dll
0x000000005cc90000 - 0x000000005cd62000 C:\Program Files\Java\jre7\bin\msvcr100.dll
0x0000000060270000 - 0x0000000060a39000 C:\Program Files\Java\jre7\bin\server\jvm.dll
0x000007fef94f0000 - 0x000007fef94f9000 C:\windows\system32\WSOCK32.dll
0x000007fefe390000 - 0x000007fefe3dd000 C:\windows\system32\WS2_32.dll
0x000007fefe0a0000 - 0x000007fefe0a8000 C:\windows\system32\NSI.dll
0x000007fef7e90000 - 0x000007fef7ecb000 C:\windows\system32\WINMM.dll
0x0000000077bb0000 - 0x0000000077bb7000 C:\windows\system32\PSAPI.DLL
0x000000006d9c0000 - 0x000000006d9cf000 C:\Program Files\Java\jre7\bin\verify.dll
0x0000000066700000 - 0x0000000066728000 C:\Program Files\Java\jre7\bin\java.dll
0x0000000069470000 - 0x0000000069485000 C:\Program Files\Java\jre7\bin\zip.dll
0x000000005ca20000 - 0x000000005cbb5000 C:\Program Files\Java\jre7\bin\awt.dll
0x000007fefb700000 - 0x000007fefb718000 C:\windows\system32\DWMAPI.DLL
0x000007fefc1a0000 - 0x000007fefc1f6000 C:\windows\system32\uxtheme.dll
0x000007fefd650000 - 0x000007fefd65f000 C:\windows\system32\CRYPTBASE.dll
0x0000000066c40000 - 0x0000000066c4c000 C:\Program Files\Java\jre7\bin\jsound.dll
0x0000000066c50000 - 0x0000000066c5b000 C:\Program Files\Java\jre7\bin\jsoundds.dll
0x000007fef4e40000 - 0x000007fef4ec8000 C:\windows\system32\DSOUND.dll
0x000007fefbd00000 - 0x000007fefbd2c000 C:\windows\system32\POWRPROF.dll
0x000007fefbcb0000 - 0x000007fefbcfb000 C:\windows\system32\MMDevAPI.DLL
0x000007fefc200000 - 0x000007fefc32c000 C:\windows\system32\PROPSYS.dll
0x000007fef3b60000 - 0x000007fef3b9b000 C:\windows\system32\wdmaud.drv
0x0000000070e30000 - 0x0000000070e36000 C:\windows\system32\ksuser.dll
0x000007fefbca0000 - 0x000007fefbca9000 C:\windows\system32\AVRT.dll
0x000007fef4960000 - 0x000007fef49af000 C:\windows\system32\AUDIOSES.DLL
0x000007fef3b50000 - 0x000007fef3b5a000 C:\windows\system32\msacm32.drv
0x000007fef3b30000 - 0x000007fef3b48000 C:\windows\system32\MSACM32.dll
0x000007fef3b20000 - 0x000007fef3b29000 C:\windows\system32\midimap.dll
0x000007fefe130000 - 0x000007fefe1c9000 C:\windows\system32\CLBCatQ.DLL
0x0000000066be0000 - 0x0000000066c10000 C:\Program Files\Java\jre7\bin\jpeg.dll
0x000000006b210000 - 0x000000006b229000 C:\Program Files\Java\jre7\bin\net.dll
0x000007fefcf90000 - 0x000007fefcfe5000 C:\windows\system32\mswsock.dll
0x000007fefcf80000 - 0x000007fefcf87000 C:\windows\System32\wship6.dll
0x0000000067e50000 - 0x0000000067e61000 C:\Program Files\Java\jre7\bin\nio.dll
0x0000000180000000 - 0x0000000180051000 C:\Windows\System32\lwjgl64.dll
0x000007fef4b80000 - 0x000007fef4c9d000 C:\windows\system32\OPENGL32.dll
0x000007fef4b50000 - 0x000007fef4b7d000 C:\windows\system32\GLU32.dll
0x000007fef4a50000 - 0x000007fef4b41000 C:\windows\system32\DDRAW.dll
0x000007fef5b90000 - 0x000007fef5b98000 C:\windows\system32\DCIMAN32.dll
0x000007fefc870000 - 0x000007fefc87c000 C:\windows\system32\VERSION.dll
0x0000000066c30000 - 0x0000000066c37000 C:\Program Files\Java\jre7\bin\jawt.dll
0x0000000005b30000 - 0x0000000005b46000 C:\Windows\System32\jinput-dx8_64.dll
0x000007fef0150000 - 0x000007fef018c000 C:\windows\system32\DINPUT8.dll
0x000007fefb720000 - 0x000007fefb72b000 C:\windows\system32\HID.DLL
0x000007fefdb60000 - 0x000007fefdb9a000 C:\windows\system32\WINTRUST.dll
0x000007fefd9f0000 - 0x000007fefdb5c000 C:\windows\system32\CRYPT32.dll
0x000007fefd830000 - 0x000007fefd83f000 C:\windows\system32\MSASN1.dll
0x0000000005b60000 - 0x0000000005b74000 C:\Windows\System32\jinput-raw_64.dll
0x0000000066b90000 - 0x0000000066bd7000 C:\Program Files\Java\jre7\bin\fontmanager.dll
0x0000000010000000 - 0x0000000010065000 C:\Program Files\WIDCOMM\Bluetooth Software\btmmhook.dll
0x000007fefee00000 - 0x000007feffb88000 C:\windows\system32\SHELL32.dll
0x000000005acf0000 - 0x000000005ca1d000 C:\windows\system32\nvoglv64.DLL
0x000007fefbb20000 - 0x000007fefbb4d000 C:\windows\system32\ntmarta.dll
0x000007fefe330000 - 0x000007fefe382000 C:\windows\system32\WLDAP32.dll
0x000007fef5e50000 - 0x000007fef67c4000 C:\windows\system32\igd10umd64.dll
0x000007fef5dc0000 - 0x000007fef5e42000 C:\windows\system32\D3Dx10_40.dll
0x000007fefb590000 - 0x000007fefb6b5000 C:\windows\system32\dbghelp.dll
VM Arguments:
java_command: SupermanVsIronMan
Launcher Type: SUN_STANDARD
Environment Variables:
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_51
PATH=C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter\Driver;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files\Java\jdk1.7.0_51\bin;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files (x86)\Autodesk\Backburner\;C:\jet8.0-alpha5-x64;C:\Program Files\swigwin-2.0.9;C:\Program Files (x86)\ant\bin;C:\Program Files\apache-ant\bin;C:\Program Files (x86)\Nmap
USERNAME=-
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 42 Stepping 7, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows 7 , 64 bit Build 7601 Service Pack 1
CPU:total 4 (2 cores per cpu, 2 threads per core) family 6 model 42 stepping 7, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, aes, ht, tsc, tscinvbit
Memory: 4k page, physical 6201640k(2148872k free), swap 12401416k(6148280k free)
vm_info: Java HotSpot(TM) 64-Bit Server VM (24.51-b03) for windows-amd64 JRE (1.7.0_51-b13), built on Dec 18 2013 18:40:56 by "java_re" with unknown MS VC++:1600
time: Fri Jul 18 06:24:20 2014
elapsed time: 8 seconds
That's an issue that some nvidia drivers seem to have. Try to increase Config.nativeBufferSize at application startup (try to double or tripple it). If that doesn't help, try to decrease Config.glBatchSize, maybe in combination with an increased native buffer size.
That worked for one of them, thanks a lot. I expect it will work for the other as well. I'll test later and report back.
It worked on both. On both cases, it was 3x (2x didn't work). Thanks.
I expect that this has some cost, though. Otherwise, why wouldn't it be set by default? The docs mention the risk of memory leak. Could you please elaborate?
A memory might happen if you are constanstly creating and destroying smaller objects with some larger ones inbetween that won't be destroyed. If you don't do that, all should be fine. You will end up with some additional memory overhead, but that won't be noticable in most cases. I choosed the current default, because it was the lowest value that seemed to fix the issue. Obviously, it doesn't do this in all cases.
Quote from: EgonOlsen on July 08, 2014, 11:34:05 PM
I noticed that too in my test case. No idea why, it has to have something to do with the model import and/or Bones serialization. I would simple set the center to another, more fitting value after loading the model.
I also have no idea. Tried with ninja demo and
getRoot().getTranslation() and
getRoot().getTransformedCenter() return the same value as expected. root object is not serialized, it's just recreated when AnimatedGroup is loaded. indeed AnimatedGroup and Animated3D's arent serialized, only mesh and skin data is serialized and during reloading object is reconstructed via Object3D's constructor Object3D(float[], float[], int[], int)
Egon can I have the code of
getTransformedCenter()? Maybe that gives a clue..
Quote from: raft on August 01, 2014, 10:08:10 AM
Egon can I have the code of getTransformedCenter()? Maybe that gives a clue..
I just takes the center vector and applies the result of getWorldTransformation() to it....
...but it does this in an optimized way...maybe something is wrong there...i'll check it out and report back.
Seems to work fine. At least this test case creates the exact same results for both ways. Maybe you can check that in your test case too.
Object3D obj = new Object3D(10);
obj.build();
obj.setCenter(new SimpleVector(10, 10, 10));
obj.rotateX(1);
obj.rotateZ(4);
obj.translate(23, 24, 25);
// Doing the calculation by hand...
Matrix m = obj.getWorldTransformation();
SimpleVector c = obj.getCenter();
c.matMul(m);
System.out.println(obj.getTransformedCenter());
System.out.println(c);
i'm out of ideas then ???