Libove Blog

Personal Blog about anything - mostly programming, cooking and random thoughts

Tag: 3d

#

After some time doing Advent of Code I've returned to my "game" project. The grid based approach to create maps was too restrictive and didn't take full advantage of the free geometry generation.

I've reworked this to allow arbitrarily shaped rooms in the future. Rooms are added to the layout one by one. Each new room is connected to the existing ones with a corridor defined by a cubic Bézier curve. Each "wall edge" of a room is treated a potential exit.

Next steps will be refining the corridor generation. At the moment I connect the two closest edge of new and existing rooms with control points placed at a fixed distance along the walls normals. This leads to misshaped corridors if the room are too close or at a bad angle.

2D room layout with 3 rooms connected by curved corridors

#gamedev #3d #geometry


#

UV coordinates on pillars and floor working. I've tinkered with UVs for the ceiling surfaces but have not found a solution yet. There are always discontinuities. The ceiling is created with quadratic Bezier triangles.

Any tips would be appreciated.

#3d #graphics #gamedev #geometry #uv

3D rendering of a room with UV debug texture. The ceiling surfaces are still gray.