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 - AGP

Pages: 1 2 3 [4] 5 6 ... 108
46
Bones / Re: Parsing SkinClipSequence
« on: May 05, 2018, 09:55:14 pm »
OK, I got this far:

Code: [Select]
     private void addSequence() {
java.util.List<JointChannel> jointChannels = (java.util.List)sequence.getClip(0).iterator();
SkinClip clip = new SkinClip(sequence.getSkeleton(), jointChannels);
clip.setName("1");
java.util.ArrayList<SkinClip> clipList = new java.util.ArrayList<SkinClip>();
clipList.add(clip);
clip = new SkinClip(sequence.getSkeleton(), jointChannels);
clip.setName("2");
clipList.add(clip);
newSequence = new SkinClipSequence(clipList);
newSequence.addClip(clip);
     }

But I still haven't given the clips proper information. Is it as simple as passing each half of the JointChannels?

47
Bones / Re: Parsing SkinClipSequence
« on: May 04, 2018, 11:21:14 pm »
No, because I need to say that a single clip is actually two or three. It's not about adding, it's about parsing or splitting.

48
Bones / Parsing SkinClipSequence
« on: May 04, 2018, 10:51:28 pm »
Since EasyOgreExporter exports all clips into a single animation, I'm forced to write a parser. How, then, might I split a SkinClipSequence of one SkinClip into a SkinClipSequence of two or more?

49
Support / Re: Now this looks like a Java 10 Thing
« on: May 02, 2018, 06:00:56 am »
I'll make one but it's either Java 10 or some Windows graphics-related update. All of my AWTGLCanvas programs are now suffering from this. It's important to note that while the graphics are getting offset, the mouse events are where they belong. Also, even as the graphics are offset, the FrameBuffer colors the entire frame whatever background color I assign clear(Color).

50
Support / Re: Now this looks like a Java 10 Thing
« on: April 30, 2018, 12:03:27 am »
Update: everything that uses the canvas has that problem.

51
Support / Now this looks like a Java 10 Thing
« on: April 29, 2018, 11:45:19 pm »
I was working a while ago on this fire particle system. I don't remember the rendering getting clipped like this.

Code: [Select]
this.setSize(buffer.getOutputWidth(), buffer.getOutputHeight());
this.add(canvas, BorderLayout.CENTER);
this.setVisible(true);
...
     buffer.clear(Color.blue);
     flameManager.update(deltaTime);
     smokeManager.update(deltaTime);
     skyBox.render(theWorld, buffer);
     if (!doShadows()) {
theWorld.renderScene(buffer);
theWorld.draw(buffer);
     }
     buffer.update();
     buffer.displayGLOnly();
     canvas.repaint();

https://www.dropbox.com/s/jpkrg93a6vi03db/ClippingThing.jpg?dl=0

52
Support / Re: Java 10 Serialization
« on: April 26, 2018, 04:12:04 am »
My program was running an old jpct whereas the model had been serialized by the latest version. I thought that it was related to the Java algorithm changing. It works now, but are you using your own format? I thought you used Java's.

53
Support / Java 10 Serialization
« on: April 25, 2018, 08:42:07 pm »
I think that you have to update the serialization stuff for Java 10. Would you?

54
Support / Re: Documentation Error
« on: April 20, 2018, 11:59:31 am »
I've already solved it by re-working the format. The bones thing is getting really close (except for the mysterious weights thing).

55
Support / Re: Documentation Error
« on: March 22, 2018, 04:41:14 am »
They made more sense when I added them, though, if still not perfect.

56
Support / Documentation Error
« on: March 20, 2018, 09:40:16 pm »
The docs for Object3D state:

Quote
public Object3D(float[] coordinates,
                float[] normals,
                float[] uvs,
                int[] indices,
                int textureId)
uvs - the texture coordinates [u1,v1,u2,v2,...]

When in fact it seems to read ws too (thus being u1, v1, w1, u2, v2, w2...).

57
Support / Re: Environment Mapping with Software
« on: February 13, 2018, 05:26:53 am »
I'll send it to you as soon as possible, via email.

Would you as least show me how I could do Polyline so that my lines would take the depth buffer in consideration (as it stands, my little hack gets drawn over everything)?

58
Support / Re: Environment Mapping with Software
« on: February 09, 2018, 07:09:40 pm »
So I wrote prepareForSoftware() as follows. Trouble is I'm sensing that the order of the operations is wrong. It's currently going:

Code: [Select]
texInfo = new TextureInfo(tm.getTextureID("EnvironmentMap"));
texInfo.add(tm.getTextureID("Starfighter.png"), TextureInfo.MODE_ADD_SIGNED); //MODE_ADD, MODE_BLEND, MODE_MODULATE, MODE_ADD_SIGNED
in the constructor. Then, once it's been established that the renderer in use is software:

Code: [Select]
     public void prepareForSoftware() {
TextureManager.getInstance().addTexture("GreyBump", new  Texture(1024, 1024, new java.awt.Color(128, 128, 128)));
body.setBlending(true);
texInfo.add(TextureManager.getInstance().getTextureID("Starfighter.png"), TextureInfo.MODE_ADD_SIGNED);
texInfo.add(TextureManager.getInstance().getTextureID("GreyBump"), TextureInfo.MODE_ADD_SIGNED);
     }

No go. On the other hand:

Code: [Select]
     public void prepareForSoftware() {
TextureManager.getInstance().addTexture("GreyBump", new  Texture(1024, 1024, new java.awt.Color(128, 128, 128)));
body.setBlending(true);
texInfo = new TextureInfo(TextureManager.getInstance().getTextureID("Starfighter.png"));
texInfo.add(TextureManager.getInstance().getTextureID("EnvironmentMap"), TextureInfo.MODE_ADD_SIGNED);
texInfo.add(TextureManager.getInstance().getTextureID("GreyBump"), TextureInfo.MODE_ADD_SIGNED);
body.setTexture(texInfo);
     }
produces a very similar effect to my combineAmbientAndDiffuse() method (the diffuse information is not in the right place but the environment map, tinted by the diffuse color, behaves right).

59
Support / Re: Environment Mapping with Software
« on: February 09, 2018, 04:00:40 pm »
I'll try the setBlending thing and report back.

Why not? Academically, you have to agree that there should be no difference between what each renderer can render.

60
Support / Re: Environment Mapping with Software
« on: February 09, 2018, 01:30:59 am »
Do you have a response?

Also, I know I keep hitting the same keystrokes but, Polyline for the software renderer? It's really very important. I wrote the following class. Even if it worked all of the time, it would still be a bit of a hack...

Code: [Select]
import java.awt.*;
import com.threed.jpct.*;

public class PolylineSoft extends Polyline {
     private SimpleVector[] points;
     public PolylineSoft(SimpleVector[] points, java.awt.Color color) {
super(points, color);
this.points = points;
     }
     public void update(SimpleVector[] newPoints) {
super.update(newPoints);
this.points = newPoints;
     }
     public void draw(Graphics g, Camera cam, FrameBuffer buffer) {
Color oldColor = g.getColor();
g.setColor(super.getColor());
for (int i = 0; i < points.length-1; i++) {
     SimpleVector p1 = Interact2D.project3D2D(cam, buffer, points[i]);
     SimpleVector p2 = Interact2D.project3D2D(cam, buffer, points[i+1]);
     if (p1 == null || p2 == null)
continue;
     g.drawLine((int)p1.x, (int)p1.y, (int)p2.x, (int)p2.y);
}
g.setColor(oldColor);
     }
}

Pages: 1 2 3 [4] 5 6 ... 108