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 ... 102
1
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.

2
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

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

4
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
************

5
Support / Re: Fog Of War Transparency With Software
« on: October 27, 2017, 06:50:39 am »
I got it working by calling recreateTextureCoords(). Is that costly? It seems like it would be.

Oh, and how could I come as close as possible to an orthographic view (in order to reduce the displacement between the fog and the gound)? Field-of-view? And would that be by increasing or decreasing it?

6
Support / Re: Fog Of War Transparency With Software
« on: October 27, 2017, 06:07:48 am »

7
Support / Re: Fog Of War Transparency With Software
« on: October 24, 2017, 07:34:53 am »
That's weird. The video is no longer up (I just signed in from a different computer and can't see it). I wonder if Google took it down. Try again in a few hours, please. As soon as I wake up I'll check this out.

8
Support / Re: Fog Of War Transparency With Software
« on: October 23, 2017, 05:32:54 pm »
The planes are created with the Extended Primitives class. So are the ones in my test case.

9
Support / Re: Fog Of War Transparency With Software
« on: October 20, 2017, 09:42:10 pm »
The solid-color ones are semi-transparent (and where they belong).

10
Support / Re: Fog Of War Transparency With Software
« on: October 20, 2017, 07:07:41 pm »
I tested both the application logic (by replacing them with solid-color textures) and the same loading line (TextureManager.getInstance().addTexture("fog-left.png", new Texture("Assets"+File.separator+"fog-left.png", true))). Could it be relative to the number of polygons, or the sheer scale of the world? Maybe force-sorting the transparency list would fix it. Because number of polygons and size of the world are the only two different things between my test and the actual game.

11
Support / Re: Fog Of War Transparency With Software
« on: October 19, 2017, 08:30:59 pm »
I wrote a simple test and transparency worked. So then I wrote the following method, and all I get are "End of printOddTransparencies()" prints. So now I'm stumped.

Code: [Select]
     public void printOddTransparencies(World theWorld) {
for (int y = 0; y < planes[0].length; y++)
     for (int x = 0; x < planes.length; x++)
if (theWorld.containsObject(planes[x][y]) && planes[x][y].getTransparency() != 0)
     System.out.println("Odd transparency at ("+x+", "+y+"): "+planes[x][y].getTransparency());
System.out.println("End of printOddTransparencies()");
     }

12
Support / Re: Fog Of War Transparency With Software
« on: October 16, 2017, 10:21:38 pm »
They are set to 0.

14
Support / Re: Fog Of War Transparency With Software
« on: October 13, 2017, 10:19:38 pm »
No, those are the edges of the fog of war. The fog is black, naturally.

Pages: [1] 2 3 ... 102