Rivers

Quad works fine… your mesh doesn’t. Problems with normals are still indicated. I don’t know if water uses tangents but that could be a problem too maybe. Actually, then a quad would probably fail too.

One other thing you can try is to load your model, traverse its nodes/geometry and dump the triangles in the meshes using System.out.println… be sure to include the normals. It’s the only way to know for sure what is going on at this point.

Another simpler thing you can try is testing with a Quad and trying to mess it up in a similar way. Maybe clear its normal buffer completely… remove it. See if it behaves the same way. I suspect normals are absent or normals are bad.

I checked the normals in Blender, and they were all (0,0,1).
I have dumped the triangles, and this were the results:
[java]list of triangles:
Index: 0 | Points: (23.260391, -40.56646, -4.9451485),(-9.88063, -33.581036, -4.9451485),(-16.86607, -66.72207, -4.9451485) | Center: (-1.1621027, -46.956524, -4.9451485) | normal: (0.0, 0.0, 1.0)
Index: 1 | Points: (23.260391, -40.56646, -4.9451485),(-16.86607, -66.72207, -4.9451485),(16.274965, -73.7075, -4.9451485) | Center: (7.556429, -60.332012, -4.9451485) | normal: (0.0, 0.0, 1.0)
Index: 2 | Points: (-16.86607, -66.72207, -4.9451485),(-9.88063, -33.581036, -4.9451485),(-45.043575, -28.373138, -4.9451475) | Center: (-23.930092, -42.892082, -4.9451485) | normal: (2.630052E-8, -5.5436025E-9, 1.0)
Index: 3 | Points: (-16.86607, -66.72207, -4.9451485),(-45.043575, -28.373138, -4.9451475),(-48.719837, -62.04225, -4.9451504) | Center: (-36.876495, -52.37915, -4.945149) | normal: (-7.121992E-8, -7.719835E-8, 1.0)
Index: 4 | Points: (-48.719837, -62.04225, -4.9451504),(-45.043575, -28.373138, -4.9451475),(-73.3461, -21.853897, -4.945147) | Center: (-55.70317, -37.423096, -4.9451485) | normal: (-2.6584588E-9, -8.468442E-8, 1.0)
Index: 5 | Points: (-48.719837, -62.04225, -4.9451504),(-73.3461, -21.853897, -4.945147),(-77.546326, -60.32173, -4.9451485) | Center: (-66.53742, -48.072628, -4.9451485) | normal: (6.353296E-8, -4.4124246E-8, 1.0)
Index: 6 | Points: (-77.546326, -60.32173, -4.9451485),(-73.3461, -21.853897, -4.945147),(-107.038795, -19.28492, -4.9451466) | Center: (-85.97707, -33.820183, -4.9451475) | normal: (1.1223673E-8, -3.8412697E-8, 0.99999994)
Index: 7 | Points: (-77.546326, -60.32173, -4.9451485),(-107.038795, -19.28492, -4.9451466),(-108.67308, -57.946857, -4.9451485) | Center: (-97.75273, -45.851173, -4.945148) | normal: (-3.7519308E-9, -4.917542E-8, 1.0)
Index: 8 | Points: (-108.67308, -57.946857, -4.9451485),(-107.038795, -19.28492, -4.9451466),(-146.7074, -17.42641, -4.9451485) | Center: (-120.80643, -31.55273, -4.945148) | normal: (-5.0293814E-8, -4.720804E-8, 1.0)
Index: 9 | Points: (-108.67308, -57.946857, -4.9451485),(-146.7074, -17.42641, -4.9451485),(-143.1623, -55.96014, -4.9451504) | Center: (-132.8476, -43.7778, -4.9451494) | normal: (-5.8463886E-8, -5.4876836E-8, 0.99999994)
Index: 10 | Points: (-143.1623, -55.96014, -4.9451504),(-146.7074, -17.42641, -4.9451485),(-182.96236, -22.095608, -4.9451494) | Center: (-157.61069, -31.827389, -4.9451494) | normal: (-1.9696525E-8, -5.1310238E-8, 0.99999994)
Index: 11 | Points: (-143.1623, -55.96014, -4.9451504),(-182.96236, -22.095608, -4.9451494),(-179.41724, -60.629337, -4.9451504) | Center: (-168.51396, -46.228363, -4.9451504) | normal: (3.1500578E-9, -2.4459274E-8, 1.0)
Index: 12 | Points: (-179.41724, -60.629337, -4.9451504),(-182.96236, -22.095608, -4.9451494),(-218.69406, -32.26273, -4.945153) | Center: (-193.69121, -38.329224, -4.9451513) | normal: (-9.717355E-8, -3.3689087E-8, 1.0)
Index: 13 | Points: (-179.41724, -60.629337, -4.9451504),(-218.69406, -32.26273, -4.945153),(-205.75838, -62.547195, -4.945154) | Center: (-201.2899, -51.81309, -4.9451528) | normal: (-1.3822742E-7, -9.05329E-8, 1.0)
Index: 14 | Points: (-205.75838, -62.547195, -4.945154),(-218.69406, -32.26273, -4.945153),(-251.35217, -57.66584, -4.945154) | Center: (-225.26822, -50.825256, -4.945154) | normal: (-3.5330008E-9, -3.299963E-8, 1.0)
Index: 15 | Points: (-205.75838, -62.547195, -4.945154),(-251.35217, -57.66584, -4.945154),(-228.03203, -75.59628, -4.945156) | Center: (-228.38086, -65.269775, -4.945155) | normal: (-1.3231023E-8, -1.23583E-7, 1.0)
Index: 16 | Points: (-228.03203, -75.59628, -4.945156),(-251.35217, -57.66584, -4.945154),(-262.44766, -82.57779, -4.945156) | Center: (-247.27731, -71.94664, -4.9451556) | normal: (1.7074255E-8, -8.416827E-8, 1.0)
Index: 17 | Points: (-228.03203, -75.59628, -4.945156),(-262.44766, -82.57779, -4.945156),(-235.61331, -94.62972, -4.9451523) | Center: (-242.031, -84.26794, -4.945155) | normal: (-4.4231E-8, 2.1803862E-7, 1.0)
Index: 18 | Points: (-235.61331, -94.62972, -4.9451523),(-262.44766, -82.57779, -4.945156),(-272.26715, -106.36979, -4.94516) | Center: (-256.77606, -94.52577, -4.945156) | normal: (-1.8067674E-7, -8.5765976E-8, 1.0)
Index: 19 | Points: (-235.61331, -94.62972, -4.9451523),(-272.26715, -106.36979, -4.94516),(-243.92128, -114.23378, -4.94516) | Center: (-250.60059, -105.07776, -4.9451575) | normal: (-9.660998E-8, -3.482321E-7, 1.0)
Index: 20 | Points: (23.260391, -40.56646, -4.9451485),(16.274965, -73.7075, -4.9451485),(46.21276, -79.749985, -4.9451485) | Center: (28.582706, -64.67465, -4.9451485) | normal: (0.0, 0.0, 1.0)
Index: 21 | Points: (23.260391, -40.56646, -4.9451485),(46.21276, -79.749985, -4.9451485),(53.198185, -46.608948, -4.9451485) | Center: (40.89045, -55.641796, -4.9451485) | normal: (0.0, 0.0, 1.0)
Index: 22 | Points: (53.198185, -46.608948, -4.9451485),(46.21276, -79.749985, -4.9451485),(76.15056, -86.06714, -4.9451485) | Center: (58.520504, -70.80869, -4.9451485) | normal: (0.0, 0.0, 1.0)
Index: 23 | Points: (53.198185, -46.608948, -4.9451485),(76.15056, -86.06714, -4.9451485),(82.312004, -55.947342, -4.9451485) | Center: (70.55358, -62.874477, -4.9451485) | normal: (0.0, 0.0, 1.0)
Index: 24 | Points: (82.312004, -55.947342, -4.9451485),(76.15056, -86.06714, -4.9451485),(116.80005, -103.645294, -4.9451523) | Center: (91.7542, -81.8866, -4.94515) | normal: (8.6216886E-8, -1.7636928E-8, 1.0)
Index: 25 | Points: (82.312004, -55.947342, -4.9451485),(116.80005, -103.645294, -4.9451523),(114.17239, -72.70152, -4.9451485) | Center: (104.428154, -77.43139, -4.94515) | normal: (-6.785762E-8, -1.2904064E-7, 1.0)
Index: 26 | Points: (82.312004, -55.947342, -4.9451485),(114.17239, -72.70152, -4.9451485),(142.18759, -63.36313, -4.9451504) | Center: (112.89067, -64.004, -4.9451494) | normal: (4.1669324E-8, 7.9239975E-8, 1.0)
Index: 27 | Points: (82.312004, -55.947342, -4.9451485),(142.18759, -63.36313, -4.9451504),(124.33479, -40.841118, -4.9451485) | Center: (116.27814, -53.38386, -4.9451494) | normal: (2.369231E-8, -6.590773E-8, 1.0)
Index: 28 | Points: (82.312004, -55.947342, -4.9451485),(124.33479, -40.841118, -4.9451485),(106.964554, -9.970493, -4.9451466) | Center: (104.53711, -35.58632, -4.945148) | normal: (1.8473694E-8, -5.139048E-8, 1.0)
Index: 29 | Points: (82.312004, -55.947342, -4.9451485),(106.964554, -9.970493, -4.9451466),(68.92046, -23.646473, -4.9451475) | Center: (86.065674, -29.854767, -4.9451475) | normal: (-1.257938E-8, -3.4739983E-8, 0.99999994)
Index: 30 | Points: (68.92046, -23.646473, -4.9451475),(106.964554, -9.970493, -4.9451466),(96.25286, 18.04469, -4.9451447) | Center: (90.71263, -5.190759, -4.9451466) | normal: (-5.217326E-10, -6.828217E-8, 1.0)
Index: 31 | Points: (68.92046, -23.646473, -4.9451475),(96.25286, 18.04469, -4.9451447),(58.20877, 4.3687096, -4.9451447) | Center: (74.4607, -0.41102475, -4.9451456) | normal: (3.227512E-8, -8.978352E-8, 1.0)
Index: 32 | Points: (58.20877, 4.3687096, -4.9451447),(96.25286, 18.04469, -4.9451447),(82.82478, 48.47803, -4.945137) | Center: (79.095474, 23.630478, -4.9451423) | normal: (7.778104E-8, -2.1637271E-7, 1.0)
Index: 33 | Points: (58.20877, 4.3687096, -4.9451447),(82.82478, 48.47803, -4.945137),(49.66415, 36.55755, -4.945137) | Center: (63.565903, 29.80143, -4.94514) | normal: (7.778099E-8, -2.1637268E-7, 1.0)
Index: 34 | Points: (49.66415, 36.55755, -4.945137),(82.82478, 48.47803, -4.945137),(70.219986, 81.404594, -4.945137) | Center: (67.56964, 55.480064, -4.945137) | normal: (0.0, 0.0, 1.0)
Index: 35 | Points: (49.66415, 36.55755, -4.945137),(70.219986, 81.404594, -4.945137),(40.296253, 70.647705, -4.945137) | Center: (53.393463, 62.86995, -4.945137) | normal: (0.0, -0.0, 1.0)
Index: 36 | Points: (40.296253, 70.647705, -4.945137),(70.219986, 81.404594, -4.945137),(64.06079, 105.2414, -4.9451294) | Center: (58.192345, 85.76457, -4.9451346) | normal: (1.05278176E-7, -2.9286497E-7, 0.99999994)
Index: 37 | Points: (40.296253, 70.647705, -4.945137),(64.06079, 105.2414, -4.9451294),(36.018417, 98.44672, -4.945137) | Center: (46.79182, 91.445274, -4.9451346) | normal: (-2.6228693E-7, -4.0361883E-8, 1.0)
Index: 38 | Points: (36.018417, 98.44672, -4.945137),(64.06079, 105.2414, -4.9451294),(55.360176, 136.5816, -4.9451294) | Center: (51.813133, 113.42324, -4.9451323) | normal: (-2.5491894E-7, -7.077018E-8, 0.99999994)
Index: 39 | Points: (36.018417, 98.44672, -4.945137),(55.360176, 136.5816, -4.9451294),(28.78883, 125.33416, -4.9451294) | Center: (40.05581, 120.120834, -4.9451323) | normal: (1.0783687E-7, -2.5475748E-7, 0.99999994)
Index: 40 | Points: (28.78883, 125.33416, -4.9451294),(55.360176, 136.5816, -4.9451294),(37.750793, 173.4906, -4.9451294) | Center: (40.633266, 145.13547, -4.9451294) | normal: (0.0, 0.0, 1.0)
Index: 41 | Points: (28.78883, 125.33416, -4.9451294),(37.750793, 173.4906, -4.9451294),(16.366344, 151.93524, -4.9451294) | Center: (27.635326, 150.25334, -4.9451294) | normal: (0.0, -0.0, 0.99999994)
Index: 42 | Points: (16.366344, 151.93524, -4.9451294),(37.750793, 173.4906, -4.9451294),(12.928437, 196.5893, -4.9451294) | Center: (22.348526, 174.00505, -4.9451294) | normal: (0.0, -0.0, 1.0)
Index: 43 | Points: (16.366344, 151.93524, -4.9451294),(12.928437, 196.5893, -4.9451294),(1.0971503, 168.02515, -4.9451294) | Center: (10.130644, 172.18323, -4.9451294) | normal: (0.0, 0.0, 1.0)
Index: 44 | Points: (1.0971503, 168.02515, -4.9451294),(12.928437, 196.5893, -4.9451294),(1.0807605, 205.20828, -4.9451294) | Center: (5.0354495, 189.94092, -4.9451294) | normal: (0.0, -0.0, 1.0)
Index: 45 | Points: (1.0971503, 168.02515, -4.9451294),(1.0807605, 205.20828, -4.9451294),(-12.699313, 174.57593, -4.9451294) | Center: (-3.5071342, 182.60312, -4.9451294) | normal: (0.0, 0.0, 1.0)
Index: 46 | Points: (114.17239, -72.70152, -4.9451485),(116.80005, -103.645294, -4.9451523),(142.18759, -63.36313, -4.9451504) | Center: (124.38668, -79.90332, -4.9451504) | normal: (1.0617018E-7, -1.1426269E-7, 0.99999994)
Index: 47 | Points: (142.18759, -63.36313, -4.9451504),(116.80005, -103.645294, -4.9451523),(151.61703, -126.15381, -4.9451523) | Center: (136.86823, -97.72075, -4.945152) | normal: (-2.1749191E-8, -3.3642436E-8, 1.0)
Index: 48 | Points: (142.18759, -63.36313, -4.9451504),(151.61703, -126.15381, -4.9451523),(173.76637, -91.00969, -4.9451485) | Center: (155.857, -93.50887, -4.9451504) | normal: (-1.00162126E-7, -4.5417913E-8, 1.0)
Index: 49 | Points: (173.76637, -91.00969, -4.9451485),(151.61703, -126.15381, -4.9451523),(162.50806, -136.44054, -4.9451523) | Center: (162.6305, -117.86801, -4.9451513) | normal: (-6.426593E-8, -6.804124E-8, 1.0)
Index: 50 | Points: (173.76637, -91.00969, -4.9451485),(162.50806, -136.44054, -4.9451523),(195.8344, -122.51886, -4.9451523) | Center: (177.36961, -116.656364, -4.9451513) | normal: (3.9126665E-8, -9.366318E-8, 1.0)
Index: 51 | Points: (195.8344, -122.51886, -4.9451523),(162.50806, -136.44054, -4.9451523),(167.57666, -154.11276, -4.9451523) | Center: (175.30638, -137.69073, -4.9451523) | normal: (0.0, 0.0, 1.0)
Index: 52 | Points: (195.8344, -122.51886, -4.9451523),(167.57666, -154.11276, -4.9451523),(203.66281, -152.61336, -4.9451523) | Center: (189.02463, -143.08167, -4.9451523) | normal: (0.0, 0.0, 1.0)
Index: 53 | Points: (203.66281, -152.61336, -4.9451523),(167.57666, -154.11276, -4.9451523),(169.72617, -179.42917, -4.94516) | Center: (180.32188, -162.05177, -4.945155) | normal: (1.2477768E-8, -3.0030222E-7, 0.99999994)
Index: 54 | Points: (203.66281, -152.61336, -4.9451523),(169.72617, -179.42917, -4.94516),(205.8123, -177.92972, -4.94516) | Center: (193.06711, -169.99075, -4.9451575) | normal: (1.2478177E-8, -3.0030276E-7, 1.0)
Index: 55 | Points: (205.8123, -177.92972, -4.94516),(169.72617, -179.42917, -4.94516),(171.15916, -207.37268, -4.94516) | Center: (182.23254, -188.24387, -4.94516) | normal: (0.0, 0.0, 1.0)
Index: 56 | Points: (205.8123, -177.92972, -4.94516),(171.15916, -207.37268, -4.94516),(207.24532, -205.87326, -4.94516) | Center: (194.73894, -197.05856, -4.94516) | normal: (0.0, 0.0, 1.0)[/java]
I have no idea abouth what has happened to the normals, but some of them are clearly different from the normals in Blender, while some of them were preserved.

I tried to re-create the mesh with the following code:
[java]
Mesh m = new Mesh();

            float[] normals = new float[((Geometry)water).getMesh().getVertexCount()*3];
            for (int i=0;i<((Geometry)water).getMesh().getVertexCount();i++){
                normals[i*3] = 0;
                normals[i*3+1] = 1;
                normals[i*3+2] = 0;
            }
            
            int[] ind = new int[((Geometry)water).getMesh().getIndexBuffer().size()];
            for(int i=0;i<((Geometry)water).getMesh().getIndexBuffer().size();i++){
                ind[i] = ((Geometry)water).getMesh().getIndexBuffer().get(i);
            }
            
            m.setBuffer(Type.Position, 3, ((Geometry)water).getMesh().getFloatBuffer(Type.Position));
            m.setBuffer(Type.TexCoord, 2, ((Geometry)water).getMesh().getFloatBuffer(Type.TexCoord));
            m.setBuffer(Type.Index, 3, BufferUtils.createIntBuffer(ind));
            m.setBuffer(Type.Normal, 3, BufferUtils.createFloatBuffer(normals));
            m.updateBound();
            ((Geometry)water).setMesh(m);
            ((Geometry)water).updateModelBound();
            
            System.out.println("2nd list of triangles:");
            for (int i = 0; i < ((Geometry) water).getMesh().getTriangleCount(); i++) {
                Triangle t = new Triangle();
                m.getTriangle(i, t);
                System.out.println("Index: "+i+" | Points: "+t.get1()+","+t.get2()+","+t.get3()+" | Center: "+t.getCenter()+" | normal: "+t.getNormal());
            }

[/java]

And the results of that code was this:
[java]
Index: 0 | Points: (23.260391, -40.56646, -4.9451485),(-9.88063, -33.581036, -4.9451485),(-16.86607, -66.72207, -4.9451485) | Center: (-1.1621027, -46.956524, -4.9451485) | normal: (0.0, 0.0, 1.0)
Index: 1 | Points: (23.260391, -40.56646, -4.9451485),(-16.86607, -66.72207, -4.9451485),(16.274965, -73.7075, -4.9451485) | Center: (7.556429, -60.332012, -4.9451485) | normal: (0.0, 0.0, 1.0)
Index: 2 | Points: (-16.86607, -66.72207, -4.9451485),(-9.88063, -33.581036, -4.9451485),(-45.043575, -28.373138, -4.9451475) | Center: (-23.930092, -42.892082, -4.9451485) | normal: (2.630052E-8, -5.5436025E-9, 1.0)
Index: 3 | Points: (-16.86607, -66.72207, -4.9451485),(-45.043575, -28.373138, -4.9451475),(-48.719837, -62.04225, -4.9451504) | Center: (-36.876495, -52.37915, -4.945149) | normal: (-7.121992E-8, -7.719835E-8, 1.0)
Index: 4 | Points: (-48.719837, -62.04225, -4.9451504),(-45.043575, -28.373138, -4.9451475),(-73.3461, -21.853897, -4.945147) | Center: (-55.70317, -37.423096, -4.9451485) | normal: (-2.6584588E-9, -8.468442E-8, 1.0)
Index: 5 | Points: (-48.719837, -62.04225, -4.9451504),(-73.3461, -21.853897, -4.945147),(-77.546326, -60.32173, -4.9451485) | Center: (-66.53742, -48.072628, -4.9451485) | normal: (6.353296E-8, -4.4124246E-8, 1.0)
Index: 6 | Points: (-77.546326, -60.32173, -4.9451485),(-73.3461, -21.853897, -4.945147),(-107.038795, -19.28492, -4.9451466) | Center: (-85.97707, -33.820183, -4.9451475) | normal: (1.1223673E-8, -3.8412697E-8, 0.99999994)
Index: 7 | Points: (-77.546326, -60.32173, -4.9451485),(-107.038795, -19.28492, -4.9451466),(-108.67308, -57.946857, -4.9451485) | Center: (-97.75273, -45.851173, -4.945148) | normal: (-3.7519308E-9, -4.917542E-8, 1.0)
Index: 8 | Points: (-108.67308, -57.946857, -4.9451485),(-107.038795, -19.28492, -4.9451466),(-146.7074, -17.42641, -4.9451485) | Center: (-120.80643, -31.55273, -4.945148) | normal: (-5.0293814E-8, -4.720804E-8, 1.0)
Index: 9 | Points: (-108.67308, -57.946857, -4.9451485),(-146.7074, -17.42641, -4.9451485),(-143.1623, -55.96014, -4.9451504) | Center: (-132.8476, -43.7778, -4.9451494) | normal: (-5.8463886E-8, -5.4876836E-8, 0.99999994)
Index: 10 | Points: (-143.1623, -55.96014, -4.9451504),(-146.7074, -17.42641, -4.9451485),(-182.96236, -22.095608, -4.9451494) | Center: (-157.61069, -31.827389, -4.9451494) | normal: (-1.9696525E-8, -5.1310238E-8, 0.99999994)
Index: 11 | Points: (-143.1623, -55.96014, -4.9451504),(-182.96236, -22.095608, -4.9451494),(-179.41724, -60.629337, -4.9451504) | Center: (-168.51396, -46.228363, -4.9451504) | normal: (3.1500578E-9, -2.4459274E-8, 1.0)
Index: 12 | Points: (-179.41724, -60.629337, -4.9451504),(-182.96236, -22.095608, -4.9451494),(-218.69406, -32.26273, -4.945153) | Center: (-193.69121, -38.329224, -4.9451513) | normal: (-9.717355E-8, -3.3689087E-8, 1.0)
Index: 13 | Points: (-179.41724, -60.629337, -4.9451504),(-218.69406, -32.26273, -4.945153),(-205.75838, -62.547195, -4.945154) | Center: (-201.2899, -51.81309, -4.9451528) | normal: (-1.3822742E-7, -9.05329E-8, 1.0)
Index: 14 | Points: (-205.75838, -62.547195, -4.945154),(-218.69406, -32.26273, -4.945153),(-251.35217, -57.66584, -4.945154) | Center: (-225.26822, -50.825256, -4.945154) | normal: (-3.5330008E-9, -3.299963E-8, 1.0)
Index: 15 | Points: (-205.75838, -62.547195, -4.945154),(-251.35217, -57.66584, -4.945154),(-228.03203, -75.59628, -4.945156) | Center: (-228.38086, -65.269775, -4.945155) | normal: (-1.3231023E-8, -1.23583E-7, 1.0)
Index: 16 | Points: (-228.03203, -75.59628, -4.945156),(-251.35217, -57.66584, -4.945154),(-262.44766, -82.57779, -4.945156) | Center: (-247.27731, -71.94664, -4.9451556) | normal: (1.7074255E-8, -8.416827E-8, 1.0)
Index: 17 | Points: (-228.03203, -75.59628, -4.945156),(-262.44766, -82.57779, -4.945156),(-235.61331, -94.62972, -4.9451523) | Center: (-242.031, -84.26794, -4.945155) | normal: (-4.4231E-8, 2.1803862E-7, 1.0)
Index: 18 | Points: (-235.61331, -94.62972, -4.9451523),(-262.44766, -82.57779, -4.945156),(-272.26715, -106.36979, -4.94516) | Center: (-256.77606, -94.52577, -4.945156) | normal: (-1.8067674E-7, -8.5765976E-8, 1.0)
Index: 19 | Points: (-235.61331, -94.62972, -4.9451523),(-272.26715, -106.36979, -4.94516),(-243.92128, -114.23378, -4.94516) | Center: (-250.60059, -105.07776, -4.9451575) | normal: (-9.660998E-8, -3.482321E-7, 1.0)
Index: 20 | Points: (23.260391, -40.56646, -4.9451485),(16.274965, -73.7075, -4.9451485),(46.21276, -79.749985, -4.9451485) | Center: (28.582706, -64.67465, -4.9451485) | normal: (0.0, 0.0, 1.0)
Index: 21 | Points: (23.260391, -40.56646, -4.9451485),(46.21276, -79.749985, -4.9451485),(53.198185, -46.608948, -4.9451485) | Center: (40.89045, -55.641796, -4.9451485) | normal: (0.0, 0.0, 1.0)
Index: 22 | Points: (53.198185, -46.608948, -4.9451485),(46.21276, -79.749985, -4.9451485),(76.15056, -86.06714, -4.9451485) | Center: (58.520504, -70.80869, -4.9451485) | normal: (0.0, 0.0, 1.0)
Index: 23 | Points: (53.198185, -46.608948, -4.9451485),(76.15056, -86.06714, -4.9451485),(82.312004, -55.947342, -4.9451485) | Center: (70.55358, -62.874477, -4.9451485) | normal: (0.0, 0.0, 1.0)
Index: 24 | Points: (82.312004, -55.947342, -4.9451485),(76.15056, -86.06714, -4.9451485),(116.80005, -103.645294, -4.9451523) | Center: (91.7542, -81.8866, -4.94515) | normal: (8.6216886E-8, -1.7636928E-8, 1.0)
Index: 25 | Points: (82.312004, -55.947342, -4.9451485),(116.80005, -103.645294, -4.9451523),(114.17239, -72.70152, -4.9451485) | Center: (104.428154, -77.43139, -4.94515) | normal: (-6.785762E-8, -1.2904064E-7, 1.0)
Index: 26 | Points: (82.312004, -55.947342, -4.9451485),(114.17239, -72.70152, -4.9451485),(142.18759, -63.36313, -4.9451504) | Center: (112.89067, -64.004, -4.9451494) | normal: (4.1669324E-8, 7.9239975E-8, 1.0)
Index: 27 | Points: (82.312004, -55.947342, -4.9451485),(142.18759, -63.36313, -4.9451504),(124.33479, -40.841118, -4.9451485) | Center: (116.27814, -53.38386, -4.9451494) | normal: (2.369231E-8, -6.590773E-8, 1.0)
Index: 28 | Points: (82.312004, -55.947342, -4.9451485),(124.33479, -40.841118, -4.9451485),(106.964554, -9.970493, -4.9451466) | Center: (104.53711, -35.58632, -4.945148) | normal: (1.8473694E-8, -5.139048E-8, 1.0)
Index: 29 | Points: (82.312004, -55.947342, -4.9451485),(106.964554, -9.970493, -4.9451466),(68.92046, -23.646473, -4.9451475) | Center: (86.065674, -29.854767, -4.9451475) | normal: (-1.257938E-8, -3.4739983E-8, 0.99999994)
Index: 30 | Points: (68.92046, -23.646473, -4.9451475),(106.964554, -9.970493, -4.9451466),(96.25286, 18.04469, -4.9451447) | Center: (90.71263, -5.190759, -4.9451466) | normal: (-5.217326E-10, -6.828217E-8, 1.0)
Index: 31 | Points: (68.92046, -23.646473, -4.9451475),(96.25286, 18.04469, -4.9451447),(58.20877, 4.3687096, -4.9451447) | Center: (74.4607, -0.41102475, -4.9451456) | normal: (3.227512E-8, -8.978352E-8, 1.0)
Index: 32 | Points: (58.20877, 4.3687096, -4.9451447),(96.25286, 18.04469, -4.9451447),(82.82478, 48.47803, -4.945137) | Center: (79.095474, 23.630478, -4.9451423) | normal: (7.778104E-8, -2.1637271E-7, 1.0)
Index: 33 | Points: (58.20877, 4.3687096, -4.9451447),(82.82478, 48.47803, -4.945137),(49.66415, 36.55755, -4.945137) | Center: (63.565903, 29.80143, -4.94514) | normal: (7.778099E-8, -2.1637268E-7, 1.0)
Index: 34 | Points: (49.66415, 36.55755, -4.945137),(82.82478, 48.47803, -4.945137),(70.219986, 81.404594, -4.945137) | Center: (67.56964, 55.480064, -4.945137) | normal: (0.0, 0.0, 1.0)
Index: 35 | Points: (49.66415, 36.55755, -4.945137),(70.219986, 81.404594, -4.945137),(40.296253, 70.647705, -4.945137) | Center: (53.393463, 62.86995, -4.945137) | normal: (0.0, -0.0, 1.0)
Index: 36 | Points: (40.296253, 70.647705, -4.945137),(70.219986, 81.404594, -4.945137),(64.06079, 105.2414, -4.9451294) | Center: (58.192345, 85.76457, -4.9451346) | normal: (1.05278176E-7, -2.9286497E-7, 0.99999994)
Index: 37 | Points: (40.296253, 70.647705, -4.945137),(64.06079, 105.2414, -4.9451294),(36.018417, 98.44672, -4.945137) | Center: (46.79182, 91.445274, -4.9451346) | normal: (-2.6228693E-7, -4.0361883E-8, 1.0)
Index: 38 | Points: (36.018417, 98.44672, -4.945137),(64.06079, 105.2414, -4.9451294),(55.360176, 136.5816, -4.9451294) | Center: (51.813133, 113.42324, -4.9451323) | normal: (-2.5491894E-7, -7.077018E-8, 0.99999994)
Index: 39 | Points: (36.018417, 98.44672, -4.945137),(55.360176, 136.5816, -4.9451294),(28.78883, 125.33416, -4.9451294) | Center: (40.05581, 120.120834, -4.9451323) | normal: (1.0783687E-7, -2.5475748E-7, 0.99999994)
Index: 40 | Points: (28.78883, 125.33416, -4.9451294),(55.360176, 136.5816, -4.9451294),(37.750793, 173.4906, -4.9451294) | Center: (40.633266, 145.13547, -4.9451294) | normal: (0.0, 0.0, 1.0)
Index: 41 | Points: (28.78883, 125.33416, -4.9451294),(37.750793, 173.4906, -4.9451294),(16.366344, 151.93524, -4.9451294) | Center: (27.635326, 150.25334, -4.9451294) | normal: (0.0, -0.0, 0.99999994)
Index: 42 | Points: (16.366344, 151.93524, -4.9451294),(37.750793, 173.4906, -4.9451294),(12.928437, 196.5893, -4.9451294) | Center: (22.348526, 174.00505, -4.9451294) | normal: (0.0, -0.0, 1.0)
Index: 43 | Points: (16.366344, 151.93524, -4.9451294),(12.928437, 196.5893, -4.9451294),(1.0971503, 168.02515, -4.9451294) | Center: (10.130644, 172.18323, -4.9451294) | normal: (0.0, 0.0, 1.0)
Index: 44 | Points: (1.0971503, 168.02515, -4.9451294),(12.928437, 196.5893, -4.9451294),(1.0807605, 205.20828, -4.9451294) | Center: (5.0354495, 189.94092, -4.9451294) | normal: (0.0, -0.0, 1.0)
Index: 45 | Points: (1.0971503, 168.02515, -4.9451294),(1.0807605, 205.20828, -4.9451294),(-12.699313, 174.57593, -4.9451294) | Center: (-3.5071342, 182.60312, -4.9451294) | normal: (0.0, 0.0, 1.0)
Index: 46 | Points: (114.17239, -72.70152, -4.9451485),(116.80005, -103.645294, -4.9451523),(142.18759, -63.36313, -4.9451504) | Center: (124.38668, -79.90332, -4.9451504) | normal: (1.0617018E-7, -1.1426269E-7, 0.99999994)
Index: 47 | Points: (142.18759, -63.36313, -4.9451504),(116.80005, -103.645294, -4.9451523),(151.61703, -126.15381, -4.9451523) | Center: (136.86823, -97.72075, -4.945152) | normal: (-2.1749191E-8, -3.3642436E-8, 1.0)
Index: 48 | Points: (142.18759, -63.36313, -4.9451504),(151.61703, -126.15381, -4.9451523),(173.76637, -91.00969, -4.9451485) | Center: (155.857, -93.50887, -4.9451504) | normal: (-1.00162126E-7, -4.5417913E-8, 1.0)
Index: 49 | Points: (173.76637, -91.00969, -4.9451485),(151.61703, -126.15381, -4.9451523),(162.50806, -136.44054, -4.9451523) | Center: (162.6305, -117.86801, -4.9451513) | normal: (-6.426593E-8, -6.804124E-8, 1.0)
Index: 50 | Points: (173.76637, -91.00969, -4.9451485),(162.50806, -136.44054, -4.9451523),(195.8344, -122.51886, -4.9451523) | Center: (177.36961, -116.656364, -4.9451513) | normal: (3.9126665E-8, -9.366318E-8, 1.0)
Index: 51 | Points: (195.8344, -122.51886, -4.9451523),(162.50806, -136.44054, -4.9451523),(167.57666, -154.11276, -4.9451523) | Center: (175.30638, -137.69073, -4.9451523) | normal: (0.0, 0.0, 1.0)
Index: 52 | Points: (195.8344, -122.51886, -4.9451523),(167.57666, -154.11276, -4.9451523),(203.66281, -152.61336, -4.9451523) | Center: (189.02463, -143.08167, -4.9451523) | normal: (0.0, 0.0, 1.0)
Index: 53 | Points: (203.66281, -152.61336, -4.9451523),(167.57666, -154.11276, -4.9451523),(169.72617, -179.42917, -4.94516) | Center: (180.32188, -162.05177, -4.945155) | normal: (1.2477768E-8, -3.0030222E-7, 0.99999994)
Index: 54 | Points: (203.66281, -152.61336, -4.9451523),(169.72617, -179.42917, -4.94516),(205.8123, -177.92972, -4.94516) | Center: (193.06711, -169.99075, -4.9451575) | normal: (1.2478177E-8, -3.0030276E-7, 1.0)
Index: 55 | Points: (205.8123, -177.92972, -4.94516),(169.72617, -179.42917, -4.94516),(171.15916, -207.37268, -4.94516) | Center: (182.23254, -188.24387, -4.94516) | normal: (0.0, 0.0, 1.0)
Index: 56 | Points: (205.8123, -177.92972, -4.94516),(171.15916, -207.37268, -4.94516),(207.24532, -205.87326, -4.94516) | Center: (194.73894, -197.05856, -4.94516) | normal: (0.0, 0.0, 1.0)
[/java]
That’s right, it’s exactely the same. Even though the normals of the secound mesh are generated from scratch, and started as (0,1,0) rather than as (0,0,1).

Am I generating the mesh incorrectly? Or is something else happening here?

Found something:
In your normals setting loop at the start of the code you are iterating ALL values instead of each group of 3, so effectively you are setting all normals to 0.
Try the for loop as: for (int i=0;i<((Geometry)water).getMesh().getVertexCount();i+=3)

plus on a picky note but had done odd things to me in the past is this: normals[i*3+1] = 1f; // changed to 1f to ensure 1 is float.
Its silly but has undone my code before so I now make it explicit as a habit.

Not sure if it is your issue but thought Id add it.

@radanz said: Found something: In your normals setting loop at the start of the code you are iterating ALL values instead of each group of 3, so effectively you are setting all normals to 0. Try the for loop as: for (int i=0;i<((Geometry)water).getMesh().getVertexCount();i+=3)

plus on a picky note but had done odd things to me in the past is this: normals[i*3+1] = 1f; // changed to 1f to ensure 1 is float.
Its silly but has undone my code before so I now make it explicit as a habit.

Not sure if it is your issue but thought Id add it.

a) no, his loop is right. The i * 3 part makes it so.

b) the 1f thing should never matter unless you are relying on autoboxing. Java will freely convert 1 to 1f as needed.

@beniboy said: That's right, it's exactely the same. Even though the normals of the secound mesh are generated from scratch, and started as (0,1,0) rather than as (0,0,1).

Am I generating the mesh incorrectly? Or is something else happening here?

Try setting your normals to something bizarre like 2, 3,4. It seems like they aren’t even being set since as you say you are setting them to 0,1,0 and they come out 0,0,1. So just confirm that is the case by setting them to something strange.

Since you are replacing the mesh completely, you could also just try leaving them out and seeing what happens. Something about the mesh construction seems wrong but I can’t spot it. Perhaps the triangle stuff is manufacturing its own normals or something. I guess it must be or you’d have three of them… so this is not a valid way to check the normals.

I assume the manually created mesh still fails, though?

Setting the normals to something bizzare like 2,3,4, or leaving the normals buffer out completely, gives exactely the same normals in the printed list, and it also behaves exactely like the mesh created in Blender.

If the triangle stuff isn’t a valid way to check the normals, then what is a valid way?

@beniboy said: Setting the normals to something bizzare like 2,3,4, or leaving the normals buffer out completely, gives exactely the same normals in the printed list, and it also behaves exactely like the mesh created in Blender.

If the triangle stuff isn’t a valid way to check the normals, then what is a valid way?

You’d have to dump the normals buffer and look at the contents. They should all point in the same direction so you don’t necessarily have to tie them to a specific vertex. Just print every three values as a single normal.

Note: if your vertex positions are in x,y space (like Quad) then your normals should be 0,0,1.

How do you read values from the buffer? I’ve spent the last 2 hours searching the internet for it, but I couldn’t find anything.

http://hub.jmonkeyengine.org/javadoc/com/jme3/scene/VertexBuffer.html#getData()
Check its type… if it’s a Bytebuffer cast it to ByteBuffer. If it’s a FloatBuffer cast it to FloatBuffer (not sure in this case).

If it’s a ByteBuffer then:
http://docs.oracle.com/javase/6/docs/api/java/nio/ByteBuffer.html#asFloatBuffer()

Then:
http://docs.oracle.com/javase/6/docs/api/java/nio/FloatBuffer.html#get()
http://docs.oracle.com/javase/6/docs/api/java/nio/FloatBuffer.html#get()
http://docs.oracle.com/javase/6/docs/api/java/nio/FloatBuffer.html#get()

for each normal.

Thank you. I managed to read the normals. And not all of them were perfectly 0,0,1, but they were all very simular to that (for example -6.7857606E-8,-1.2904061E-7,0.99999994). I tried setting them to exactely 0,0,1, and read the buffer again to confirm that it had changed (which it did), but the water still looked exactly the same (fully reflective in most places, transparent around one fixed point)

Hmmm… randomly, you could try also running the TangentBinormalGenerator on it… but I’m not sure it would help.

At this point, I don’t know enough about the water processor to day what is wrong. If a quad works and your “otherwise similar geometry swapped out with no other things different” doesn’t work then I have no idea what the issue could be.

If you can put together a simple test case then maybe someone with more knowledge can look at it and either spot the issue or fix the problem. @nehon is really good at pouncing on issues when they exist.

Here’s a test case:
[java]
package mygame;

import com.jme3.app.SimpleApplication;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.math.FastMath;
import com.jme3.math.Plane;
import com.jme3.math.Quaternion;
import com.jme3.math.Vector3f;
import com.jme3.renderer.RenderManager;
import com.jme3.renderer.queue.RenderQueue.Bucket;
import com.jme3.renderer.queue.RenderQueue.ShadowMode;
import com.jme3.scene.Geometry;
import com.jme3.scene.Node;
import com.jme3.scene.Spatial;
import com.jme3.scene.shape.Box;
import com.jme3.water.SimpleWaterProcessor;

/**

  • test
    */
    public class Main extends SimpleApplication {

    public static void main(String[] args) {
    Main app = new Main();
    app.start();
    }

    @Override
    public void simpleInitApp() {
    Spatial spat = assetManager.loadModel(“Models/Krijt.j3o”);
    Spatial water = ((Node) spat).getChild(“Rivier”);
    ((Node) spat).detachChild(water);
    Material mat = new Material( assetManager, “Common/MatDefs/Misc/ShowNormals.j3md”);
    spat.setMaterial(mat);
    rootNode.attachChild(spat);
    // we create a water processor
    SimpleWaterProcessor waterProcessor = new SimpleWaterProcessor(assetManager);
    waterProcessor.setReflectionScene(spat);

     // we set the water plane
     Vector3f waterLocation = new Vector3f(0, -0.021226883f, 0);
     waterLocation = new Vector3f(0, 0.56830215f, 0);
     //waterProcessor.setPlane(new Plane(Vector3f.UNIT_Y, waterLocation.dot(Vector3f.UNIT_Y)));
     Plane p = new Plane();
     p.setOriginNormal(waterLocation, Vector3f.UNIT_Y);
     waterProcessor.setPlane(p);
     viewPort.addProcessor(waterProcessor);
    
     // we set wave properties
    

// waterProcessor.setWaterDepth(400); // transparency of water
waterProcessor.setDistortionScale(0.1f); // strength of waves
waterProcessor.setWaveSpeed(-0.1f); // speed of waves
waterProcessor.setWaterTransparency(0.5f);
waterProcessor.setWaterColor(ColorRGBA.Blue);
// waterProcessor.setDebug(true);
water.setMaterial(waterProcessor.getMaterial());
water.setQueueBucket(Bucket.Opaque);
water.setShadowMode(ShadowMode.Receive);
water.setLocalRotation(new Quaternion().fromAngleAxis(-FastMath.HALF_PI, Vector3f.UNIT_X));
flyCam.setMoveSpeed(50);
rootNode.attachChild(water);
}

@Override
public void simpleUpdate(float tpf) {
    //TODO: add update code
}

@Override
public void simpleRender(RenderManager rm) {
    //TODO: add render code
}

}

[/java]

If you go to the point (-0.5818262, 5.8763433, -237.47014), you’ll see that the water is transparent there, and fully reflective everywhere else.

nessicary asset: https://dl.dropboxusercontent.com/u/11215358/Krijt.j3o

[bump]
Does nobody have any idea abouth what might be the cause of this?