Main Menu
Menu

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.

Show posts Menu

Messages - AugTech

#1
Support / Re: Object/ Polygon draw order
March 20, 2014, 07:20:25 PM
Thanks for the info Egon. I'll have a think around how to proceed...!
#2
Support / Re: Object/ Polygon draw order
March 20, 2014, 04:31:13 PM
Yep GLES2.0oin Sony Experia Z
#3
Support / Re: Object/ Polygon draw order
March 20, 2014, 03:26:26 PM
Fair comment. It doesn't appear to be making any difference, although the following lines are in logcat;


03-20 14:24:14.246: W/Adreno-EGL(7707): <qeglDrvAPI_eglChooseConfig:824>: EGL_BAD_ATTRIBUTE
03-20 14:24:14.246: I/jPCT-AE(7707): No nonlinear depth buffer config found...using default mode!
03-20 14:24:14.246: I/jPCT-AE(7707): Unable to find a matching config...using default!


#4
Support / Re: Object/ Polygon draw order
March 20, 2014, 03:17:39 PM
Okay, turns out its an Adreno GPU, but I can't see a relevant config chooser...
#5
Support / Re: Object/ Polygon draw order
March 20, 2014, 12:31:02 PM
Okay, tried that but to no avail. Even with -5f offset, still getting z-fighting.

Also tried   Config.stateOrientedSorting=false; but it didn't help.

How does one alter the accuracy of the GPU (as you mentioned)?

Ta.
#6
Support / Re: Object/ Polygon draw order
March 20, 2014, 10:16:15 AM
Thanks for the explanation Egon.
I remember the z-fighting explanation now.

I'm pretty sure I'm on Tegra, but obviously this cant be guaranteed on all devices, so it looks like the best solution is to move the objects further apart. Any suggestion on a value?
#7
Support / Object/ Polygon draw order
March 19, 2014, 06:23:47 PM
Hi.
Is there anyway to specify a drawing order for objects?

Think of a plane used for the ground with a texture on it. I'm adding a 2D object on top of the ground - for example a puddle. Currently there is a lot of 'flickering' of the two objects during rendering. I'm guessing the GPU (?) can't decide what should be on top of what.

Any suggestions would be great!

Thanks.
#8
Support / Re: Update texture coordinates on object?
February 21, 2014, 06:44:44 PM
Okay, I think I have a way forward.. ??? Thanks for the direction on PolygonManager!

Some stats if anyone is interested (all with desktop at the moment);

1.49s to create a terrain tile covering approx 3Km sq. with 26,912 polys.
Saved as compressed .ser file @ 429Kb.
Time to load from file = 0.21s
Time to clone and apply 4 new textures  = 0.317s (Not actually sure why its slower the first time?!)
Time to clone and apply 16 new textures = 0.159s

Results;
Initial terrain


1st runtime update;


2nd runtime update;


Quite a few things left to work out (like working around a sub-tile calculating that 1/2 a polygon is the correct size!), but I think this will all be quicker than trying to create every time on Android!



#9
Support / Re: Update texture coordinates on object?
February 20, 2014, 07:38:45 PM
I realised that after posting Egon, wasn't thinking about it correctly.

Anyway, making progress in testing anyway. (All on desktop at the moment)

The basic mesh takes around 7.5s to create, but 0.4-0.5 to load and manipulate the u,v coordinates, so its looking promising.



Still have to get the right tiles applied by incrementing the texture id at the correct time, but job for tomorrow now.
#10
Support / Re: Update texture coordinates on object?
February 20, 2014, 03:04:15 PM
Okay, ignore the previous post for now - just testing this and seeing if I can do it without splitting the object..
#11
Support / Re: Update texture coordinates on object?
February 20, 2014, 12:46:54 PM
Hmm, okay. As your referenced post mentions that the polygon group can't be changed after its compiled or rendered, I could in theory try;

Load my 'master' plane
Clone it (create 'split' Object)
Use Polygon Manager to re-assign uv coords
Pass the 'split' object in to the world.

Once done with the 'split' object, remove it and repeat the above process for the new size tiles?

Btw: Did you mean the plane.compile(false, false, true, false, Config.glBatchSize); method, not build(false) ?

If this sounds correct, I think I'll need a bit of experimentation to see if there is any performance gain compared to just building new objects on Android...
#12
Support / Update texture coordinates on object?
February 17, 2014, 04:00:09 PM
Is it possible to update the texture coordinates on an existing object at runtime?

In producing a real terrain I now have an issue with sheer volume of data. After reading a few posts, it appears the way to reduce creation time and memory overhead on Android is to pre-create models, serialize them and then load on the mobile device.
The issue I have with this approach is that I want to change the texture (and texture size) on the model dynamically once it is loaded. i.e.  I have a 200x200 quad plane as a serialize'd model which, once loaded, I can assign either one 200x200 texture to it, or 4 x 100 or 16 x 50 texture's etc.

Is this possible, or do I have to stick with creating the plane dynamically at runtime as well?!

Thanks.
#13
Support / Re: Terrain grid issue..
February 10, 2014, 12:41:03 PM
Okay, thats good to know.

Lobby; Thanks for posting the code - I'll take a look through, although I'm working off of Geographic coordinates, so I'm not sure how it will port.

Once I get the texture coordinates right I'll post a screenshot.

Cheers.
#14
Support / Re: Terrain grid issue..
February 09, 2014, 07:18:35 PM
Jpct-AE  I had to get the current beta version as well to get the wireframe to work, but pretty sure it was the same before (although I cant verify!)

M
#15
Support / Terrain grid issue..
February 09, 2014, 06:28:02 PM
Hi,

Can anyone give me some clue as to what is happening with the vertex coordinates here?



I'm trying to create an irregular sized plane in order to create a terrain (this is currently shown in Wireframe mode).
Firstly, for a given bounding box I calculate the number of cells required in X and Y, along with the size of each 'cell'.

Then I loop through generating the vertex positions for each corner of each cell/ quad as so;


    Coordinate[] quads = new Coordinate[(xNum * yNum * 4)  ];
    Coordinate ll, ur;
    int cnt = 0;
   
for (int yd=0; yd < yNum; yd++) {
for (int xd=0; xd < xNum; xd++) {
ll = new Coordinate(bbox.getMinX() + (xSize*xd), bbox.getMinY() + (ySize*yd) );//lowerLeft
//ur = new Coordinate(bbox.getMinX() + (xSize*(xd+1)), bbox.getMinY() + (ySize*(yd+1)) );//upperRight
ur = new Coordinate(ll.x + xSize, ll.y+ySize);//upperRight

quads[cnt++] = new Coordinate(ll); //lowerLeft
quads[cnt++] = new Coordinate(ur);//upperRight
quads[cnt++] = new Coordinate(ll.x, ur.y); //upperLeft
quads[cnt++] = new Coordinate(ur.x, ll.y); //lowerRight

}
}


Lastly I create triangles for the coordinates and add to an Object3D;


Coordinate[] quadCS = quadGeom.getCoordinates();

    SimpleVector lowerLeft=new SimpleVector();
    SimpleVector upperRight=new SimpleVector();
    SimpleVector upperLeft=new SimpleVector();
    SimpleVector lowerRight=new SimpleVector();
plane = new Object3D(xNum * yNum * 2);

for (int c=0; c < quadCS.length-1; c+=4) {
    lowerLeft.set((float)quadCS[c].x, (float)quadCS[c].y, (float)quadCS[c].z);
    upperRight.set((float)quadCS[c+1].x, (float)quadCS[c+1].y, (float)quadCS[c+1].z);
    upperLeft.set((float)quadCS[c+2].x, (float)quadCS[c+2].y, (float)quadCS[c+2].z);
    lowerRight.set((float)quadCS[c+3].x, (float)quadCS[c+3].y, (float)quadCS[c+3].z);
    plane.addTriangle(
    upperLeft,0,0,
    lowerLeft,0,1,
    upperRight,1,0);
   plane.addTriangle(
    upperRight,1,0,
    lowerLeft,0,1,
    lowerRight,1,1);

}


I've tried this a couple different ways but don't seem to get the edge of the plane correct - Is this something happening internally with the vertex indexing, or am I not completing the 'square' correctly...?

Incidentally I would love to use the in-built getPlane(int, int) function, but this doesn't allow me to create for odd sizes, hence doing this manually.

Many thanks for any assistance...