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 ... 103
1
Support / Re: Does TextureManager Operate on a Parallel Thread?
« on: January 13, 2018, 06:41:15 am »
It did because the loader and the texture weren't in the same directory. I fixed it by getting the absolute path. Would it be possible to add a line identifying the fact that the problem is coming from trying to load the texture, rather than when loading the model?

2
Support / Re: Does TextureManager Operate on a Parallel Thread?
« on: January 12, 2018, 06:17:19 pm »
It's not the model loader that's failing, it's the TextureManager. Any chance you could improve the error message here, to indicate that it's the TextureManager that's failing to add the texture?

3
Support / Re: Does TextureManager Operate on a Parallel Thread?
« on: January 12, 2018, 05:57:40 pm »
I have loadModels() method whose first line is loadTextures(). But the loader fails at finding the texture even before loadTextures prints its name. What gives?

4
Support / Does TextureManager Operate on a Parallel Thread?
« on: January 12, 2018, 05:45:37 pm »
If so, how do I wait for it? My app is failing to find a texture after it's been added to the TextureManager.

5
Support / Re: rotateMesh Bug
« on: January 12, 2018, 03:45:29 am »
What about some logic to hide the fact that the matrix has not been cleared? Is that too convoluted? Even just a better message when throwing the exception would help. But in this particular example, you select your ship from inside a hangar. The whole thing is already short of 400k triangles, so I need all the optimization I can get inside the hangar. The game itself, naturally, has a different orientation to the hangar (since the ships have to be positioned aesthetically relative to the player). Thus my little hack.

6
Support / Re: rotateMesh Bug
« on: January 11, 2018, 04:30:28 pm »
Still... I made a hack, just compiling (then decompiling before rotation) for that one specific ship. Wouldn't it be better to just make rotateMesh() work in some form or another, though?

7
Support / Re: rotateMesh Bug
« on: January 10, 2018, 06:12:16 pm »
But then it's going to cost me performance, right?

8
Support / Re: rotateMesh Bug
« on: January 10, 2018, 04:20:12 pm »
So is there no way for me to rotate and clear the object's matrix at that point?

9
Support / rotateMesh Bug
« on: January 10, 2018, 03:16:28 pm »
The following code doesn't crash with Object3D.rotateY(...) but crashes with a NullPointerException on Object3D.rotateMesh().

Code: [Select]
if (ship instanceof Blah) {
     ship.body.rotateY((float)Math.PI*.5f);
     ship.body.rotateMesh();
     ship.body.clearRotation();
}

10
Support / Re: Too Bright With Software Renderer
« on: December 20, 2017, 07:37:09 pm »
Thank you. You should make that more explicit in the docs, or otherwise just hide the Lights class and move that setting to World. I had looked for it everywhere last night. Thought maybe the method had been removed.

11
Support / Too Bright With Software Renderer
« on: December 20, 2017, 06:52:49 am »
I even wrote the following (where "amount" refers to color intensity for all three colors):

Code: [Select]
int amount = 15;
float attenuation = 3.6f, dist = 1f;
theWorld.setAmbientLight(25, 25, 25);//-20
if (b.usesRenderer(IRenderer.RENDERER_OPENGL)) {
theWorld.setAmbientLight(125, 125, 125);//-20
     amount = 55;
     attenuation = 3600f;
     dist = 10f;
}
else Config.lightMul = 1;

12
Support / Re: Loader.loadOBJ Problem
« on: November 28, 2017, 05:06:22 pm »
As soon as you posted this, I re-exported for the hundredth time and, for reasons passing understanding, it worked. Just to let you know.

13
Support / Re: Loader.loadOBJ Problem
« on: November 22, 2017, 07:10:49 pm »
Sorry for taking this long but this baffling bug discouraged me. The file exists.
This:
Code: [Select]
System.out.println("\n\n\nWarcraft.loadObject: "+fileName +" Is the mtl null? "+(mtlFile==null) +" Does the file exist? "+new File(fileName).exists());

Prints:
Quote
Warcraft.loadObject: buildings\castle_construction1.obj Is the mtl null? false Does the file exist? true

14
Support / Loader.loadOBJ Problem
« on: October 31, 2017, 08:33:08 pm »
Code: [Select]
System.out.println("\n\n\nWarcraft.loadObject: "+fileName +" Is the mtl null? "+(mtlFile==null));
System.out.println("Is loadOBJ(fileName, mtlFile) null? "+(Loader.loadOBJ(fileName, mtlFile, .5f)==null));

Produces:
Quote
Warcraft.loadObject: buildings\castle_construction0.obj Is the mtl null? false
Exception in thread "main" java.lang.NullPointerException
        at java.util.Hashtable.put(Unknown Source)
        at com.threed.jpct.Loader.loadOBJ(Loader.java:819)
        at com.threed.jpct.Loader.loadOBJ(Loader.java:508)
        at Warcraft.loadObject(Warcraft.java:250)
        at Worker.moveTowardsDest(Character.java:393)
        at Warcraft.loop(Warcraft.java:320)
        at Warcraft.<init>(Warcraft.java:163)
        at Warcraft.main(Warcraft.java:1058)

I've opened the file in Blender and it loads just fine.

15
Support / Re: Fog Of War Transparency With Software
« on: October 27, 2017, 07:13:43 pm »
Is this too big a scale for a Warcraft level, in your opinion?

Quote
************
World bounds:
X: -1133.6974, 318.40582
Y: -279.86633, 0.25386608
Z: -925.57733, 135.38232
************

Pages: [1] 2 3 ... 103