Though, those shadow glitches were generated because the debug normals were also affected by the shadows
there are a lot to do in voxel engine, doing one you can make it work, but making it work good, its harder to do. so if its not for just learning purposes, then i suggest use one that is already LOD/texture/etc optimized.
i belive some shadow problems, and other might be because of voxel terrain problem.
How does it look now? Now i’ll work on textures and then i’m going to make these shadows better-looking. Thanks for your all help though!
19 fps? :>
anyway something is broken, since i see black/white dots.(probably its background)
i thought its some kind of texture. but if not, then looks like you definetly do this voxel wrong way.
even now when i look at objects Amount… its scary amount.
vertices, wow. see this number.
voxel usually make it much lower to optimize.
The white dots are the debug normals. Also, i’m using a large rendering distance for these tests. The low fps rate is due to the huge shadow map I was using (8192, i decreased it to 1024 now)
im using 8192 without problem.
for example im making game character at 7k verts (that is enough or even someone might tell its too much). you have like 123 of my game characters visible.
i understand some filters / lights / something might multiple this number alike.
but you even dotn have textures/materials for this, so why so much.
im not voxel master, but that what i can say:
- voxel engine should optimize this numbers
- you have visible background(this dots) between quads
- based on 2) i assume quads are not connected trully, are in same object, but not as connected quads.
- based on 3) everything will work very slow and you will be unable to optimize it well.
ah, ok, so this was normals, sorry didnt seen previous post.
anyway i understand this quads are connected and 777 objects are Chunks of voxel or something.
anyway numbers need to be optimized after you make texture thing.
Without shadows, vertices number drops heavily
yes, like i said it can multiple it. i managed to observe it.
you should definetly make some LOD for your voxel terrain.
also 132 fps is still very low, but it might be graphic card that is not good enough. if not, then there is still something wrong.
i seen voxel engines work much faster(having textures/ shadows). it might be just LOD.
I have a 1050 Ti graphic card.
Should I read this?
LOD is general short for “Level of Detail”.
First of all, mesh of your terrain should look like:
generally see how @remy_vd was doing one.
(on videos he limited to 30 fps as i see, bit it would be much more)
About a LOD, i was unable to find video, but i seen someone doing voxel LOD presentation video.
LOD should replace far terrain with lower detail mesh to optimize.
something like(for normal terrain here - not voxel)
I tried this:
LodGenerator optimizer = new LodGenerator(geom); optimizer.bakeLods(LodGenerator.TriangleReductionMethod.PROPORTIONAL, 0.5f); LodControl optcontrol = new LodControl(); geom.addControl(optcontrol);
Before attaching geometry.
But anything changed.
My mesh is made of simple quads. Are you sure I can decrease LOD level?
anyway, you would need bake this each time you move, or make chunks bake, that anyway would be wrong imo.
voxel terrain must have own LOD and mesh reduction system.
first video i show you is important, as i see Remy did algoritm to show like 100 quads instead 10000.
you should make the same.
Additionaly LOD, that will lower detail if something is far away.
then voxel engine is optimized.
im not sure how to do first one, since it would require some texture manipulating too, but like i said, some clever people already made some of voxel engines, that you can use. or even modify if you need. or even look how they did things so you can do similar.
i found about LOD:
there is also some fantactic lib:
what im gonna say, you need do research yourself, and find some voxel engine that is best for you, and see how it was done there, or just use it.
because there are much more things to do voxel terrain work better.
Just a note: any direction vector with y=0 is parallel to the x-z plane… it lies on the unit circle transcribed onto the x-z plane, in fact.
x=-1, y=0, z=0 is parallel to the X-Z plane AND the X-Y plane… it’s the intersection of the X-Z and X-Y planes.
Exactly. I used X=-1, Y=-1 and Z=0. Since Y is not 0, it isn’t parallel to the X-Z plane. It’s 45° from the X-Z plane.
Man, I read and reread those posts and somehow still swapped y and z… even when looking for exactly that error on my part.
…I should not have been near a computer yesterday.