### 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.

### Topics - AGP

Pages: 1 2 [3] 4 5 ... 15
31
##### Support / Rotation Towards 3D Point
« on: March 07, 2017, 09:10:49 pm »
The following isn't working. How come?

Code: [Select]
`     public void rotateTowards(SimpleVector towards) { SimpleVector directionVector = new SimpleVector(towards.x -model.getTransformedCenter().x, towards.y -model.getTransformedCenter().y, towards.z -model.getTransformedCenter().z).normalize();//WON'T WORK WITH OR WITHOUT NORMALIZE() Matrix rotationMatrix = directionVector.getRotationMatrix(); if (this instanceof Worker)      ((Worker)this).setRotationMatrix(rotationMatrix); else model.setRotationMatrix(rotationMatrix);     }`

32
##### Support / PolygonManager.getTransformedVertex is Unreliable
« on: February 24, 2017, 05:02:18 pm »
The following is supposed to test if a character is over a particular square in a 2d array of planes (as created from the ExtendedPrimitives class). It doesn't work. The previous version of this method compared the centers of all planes and it worked (but looked terrible). I should note that I'm using the software renderer.

Code: [Select]
`     public java.awt.Point boardSpaceFromWorld(SimpleVector ws) { for (int y = 0; y < planes[0].length; y++) {      for (int x = 0; x < planes.length; x++) { Object3D plane = planes[x][y]; PolygonManager polyMan = plane.getPolygonManager(); SimpleVector[] vertices = new SimpleVector[6]; vertices[0] = polyMan.getTransformedVertex(0, 0);//, plane.getInverseWorldTransformation(), new SimpleVector()); vertices[1] = polyMan.getTransformedVertex(0, 1);//, plane.getInverseWorldTransformation(), new SimpleVector()); vertices[2] = polyMan.getTransformedVertex(0, 2);//, plane.getInverseWorldTransformation(), new SimpleVector()); vertices[3] = polyMan.getTransformedVertex(1, 0);//, plane.getInverseWorldTransformation(), new SimpleVector()); vertices[4] = polyMan.getTransformedVertex(1, 1);//, plane.getInverseWorldTransformation(), new SimpleVector()); vertices[5] = polyMan.getTransformedVertex(1, 2);//, plane.getInverseWorldTransformation(), new SimpleVector()); float minX = Float.MAX_VALUE, maxX = Float.MIN_VALUE, minZ = Float.MAX_VALUE, maxZ = Float.MIN_VALUE; for (int i = 0; i < 6; i++) {      if (minX > vertices[i].x) minX = vertices[i].x;      if (maxX < vertices[i].x) maxX = vertices[i].x;      if (minZ > vertices[i].z) minZ = vertices[i].z;      if (maxZ < vertices[i].z) maxZ = vertices[i].z; } if (ws.x > minX && ws.x <= maxX && ws.z > minZ && ws.z <= maxZ)      return new java.awt.Point(x, y);      } } return new java.awt.Point();     }`

33
##### Bugs / Tiny Doc Correction
« on: February 10, 2017, 06:43:07 pm »
You know I'm neurotic with language, so here goes a tiny one: Object3D(int maxTriangles) should read, "...also create dummy objects, that are just "lending" THEIR..." ; )

34
##### Support / Painting a Mouse Cursor-Selected Polygon
« on: February 07, 2017, 06:52:55 am »
I'm trying to paint an area of my 3d plane as a cursor is moved (think area selection for building in a strategy game). The furthest (farthest?) I got was:
Code: [Select]
`VisList visList = theWorld.getVisibilityList();int polyID = Interact2D.getPolygonID(Interact2D.pickPolygon(visList, Interact2D.reproject2D3D(theCamera, buffer, x, y)));`I assume that camera-space is all I need here, since the docs suggest reproject2D3D and not reproject2D3DWS. Even if this is right, how can I now get something useful out of it (like, say, the vertices of the returned polygon)?

35
##### Support / LwJGL 3.1?
« on: January 08, 2017, 08:58:02 pm »
I'm concerned that the old lwjgl dlls might stop working soon (and certainly will at some point). I'm actually only downloading it right now. I haven't even had a look at it, but I gather it's something much fatter and redundant than the 2s. I don't even know if AWTGLCanvas was kept. Have you tested jpct with version 3.1?

36
##### Support / Special Vertices
« on: December 23, 2016, 01:40:26 pm »
I'm taking the opportunity, as I finish my JSON-serialized format, to make special vertices (I'm thinking of three types at the moment, "regular," "hair," and "cloth" from which I might hang a runtime-generated cape). Where do you recommend I store this information (what might I subclass? Object3D? PolygonManager? SimpleVector?).

37
##### Feedback / Feature Request: Cube-Mapping
« on: December 13, 2016, 09:49:25 am »
It would sure make life easier and more satisfying with shaders.

Also, a little love for the software renderer (simple things like Polylines to make its behavior identical to the hardware renderer).

38
##### Bones / Jaw Bone
« on: November 30, 2016, 06:21:26 am »
Is it possible that bones could ignore special bones, like jaws and eyes? I'm fairly sure that the jaw bone animation on my model is getting exported but, alas, the jaw isn't opening.

39
##### Bones / How to Fill SkinData
« on: June 16, 2016, 06:44:26 am »
I've exported into a JSON-serialized format of my creation all the weights of all the joints in each vertex. How, now, do I fill the 2-dimensional arrays that are weights and jointIndices? Thanks in advance.

40
##### Support / Texture Coordinates
« on: June 16, 2016, 06:38:44 am »
I'm creating my very own JSON-serialized 3d format, for use with Bones. It will come straight out of 3ds max via a MaxScript I'm developing (Python script for Blender to follow). In point of fact, it's almost ready, save for the fact that I don't yet understand how to create a SkinData object (question to be posted on the Bones board and I do already have a SkeletonPose object filled) and the little texture issue that I'm having. I'm creating the Object3D's (non-skinned objects will also be supported in my format) texture coordinates with the following line. And the result is visible in the image that follows (mostly correct save for minor issues). I suspect it's a rounding issue. What do you think, Egon?

Code: [Select]
`anObject.addTriangle(vector1, uv1.get(0), -(uv1.get(1)-1f), vector2, uv2.get(0), -(uv2.get(1)-1f), vector3, uv3.get(0), -(uv3.get(1)-1f));`

41
##### Support / Texture Mapping
« on: April 06, 2016, 09:14:00 am »
This isn't a jpct-specific question. I can understand if you don't want to answer it, Egon. But here it goes, anyway: how do I texture map a triangle? Put differently, let's say that I have a sphere and a texture map. How do I figure out which part of the texture map goes with each triangle?

42
##### Feedback / What happened to the Bones Board?
« on: February 16, 2016, 06:02:51 pm »
That's all, folks.

43
##### Support / I think that you broke the Overlay Class Again
« on: December 20, 2015, 08:57:19 pm »
A while ago, I had a little trouble with the Overlay class. Whenever I spun my ship, the Overlay would struggle to keep up. In this latest version of jpct, my Overlay is on occasion getting covered by Object3Ds:

44
##### Bones / No OgreMax Means No "Don't Export Bones With No Influence"
« on: December 11, 2015, 07:47:52 pm »
Which, in turn, means that a lot of models won't work. I just spent an hour trying to export a character via EasyOgreExporter and OgreXMLTools. The model got exported, but it's extremely screwy. No way to use it without "Don't Export Bones With No Influence."

Is there no way we could get a MaxScript for Max>Bones? :- )

45
##### Support / Bug in compileAndStrip
« on: December 07, 2015, 04:29:53 am »
I'll elaborate tomorrow, probably, but the short version is that a part of my very large city model disappears altogether when I call compileAndStrip().

Pages: 1 2 [3] 4 5 ... 15