Libgdx 3D Doom style help!

Hello so, I’m trying to make a 3D engine like prelude of the Chambered, however I am having a few issues
I want to make animations on tiles however the mesh is static, now I could make the mesh dynamic and every frame rebuild it (giving it new texture coords) however I feel like there is a better way of doing this

The current way I am making the map is by going through each pixel of an image and if its black then its not a wall else is a wall, and im rendering all into one mesh.

[My current solution to my problem is]
What if i split up the mesh into parts of meshes for example a static mesh which is stuff which will always be there and the dynamic mesh which will have to change every frame… Is this correct? Am i doubting my method?


Also on another note, I’ve had trouble with implementing shaders in the 3D api while creating a custom mesh as all i wanted is FOG including everything that Libgdx provides, now would it be better to make a custom shader which will mean re-building the rendering api or what i have done which is copy the shader code from libgdx docs and just add the fog in ---- which is what you see in the image below?

So far I have this
[ATTACH=CONFIG]1495[/ATTACH]

All of this looks very confused.

Doom was using BSPs intensively. It allows to split out walls in order to render only what is visible.
Here is another link and another one.
I really advise you to have a deep look and understanding of them.

If you are going to be changing attributes for some vertices and not others, it makes sense to separate dynamic faces from static faces. Otherwise you’re faced with a choice between a single update which uploads more data than is strictly necessary, or many small updates. Neither of those are efficient. The dynamic faces should use a separate draw call so that you don’t have to modify the texture coordinates in place (which will cause a pipeline stall).

The other option is to not modify the texture coordinates, but to add additional vertex attributes which describe how the texture coordinates change with time, then calculate the texture coordinates in the vertex shader.

[QUOTE=Silence;1287668]All of this looks very confused.

Doom was using BSPs intensively. It allows to split out walls in order to render only what is visible.
Here is another link and another one.
I really advise you to have a deep look and understanding of them.[/QUOTE]

Yeah sorry Slience, I didn’t mean the whole engine bit by bit… What i meant was the same look but using modern techniques. Thanks for your reply though :slight_smile:

[QUOTE=GClements;1287671]If you are going to be changing attributes for some vertices and not others, it makes sense to separate dynamic faces from static faces. Otherwise you’re faced with a choice between a single update which uploads more data than is strictly necessary, or many small updates. Neither of those are efficient. The dynamic faces should use a separate draw call so that you don’t have to modify the texture coordinates in place (which will cause a pipeline stall).

The other option is to not modify the texture coordinates, but to add additional vertex attributes which describe how the texture coordinates change with time, then calculate the texture coordinates in the vertex shader.[/QUOTE]

Okay that makes sense, so for a smallish level/dungeon would you suggest splitting the mesh into two, one being static (Where nothing changes) and one being dynamic (Changing texture coords) and every frame recreate the dynamic mesh?

Well, there’s no need to recreate the entire mesh; you just need to change the texture coordinates. See this page for techniques for doing so efficiently.