Kekouan

Q2Model, Part 8

2023-04-01

To the Walls!

After I had figured out a solution for getting some way of displaying things, I combined them together to great effect:

Dragon Ogre model, not displaying correctly

"RUN000" being the specific frame it is displaying, and "DRAGON_OGRE" is the name of the skin.

Dragon Ogre model rendering properly

I managed to get the model displaying correctly but I broke the display of the text. It's cutting things in half, it's still attempting to display "RUN000" but the last part got cut off.

Okay so it turns out when I turned my text from 2D into 3D I didn’t update everything I needed to update. I was allocating space for N things that had 2 positions, then I came along and filled in N things with 3 positions.

So the animation text worked because it was actually something like RUN00, so 5×2 = 10, and 3×3=9 so it had enough space to work.

Easy fix, in retrospect but it took me some time to track it down.

From my notes at the time.

Dragon Green model rendering, with proper text support

I was still browsing through models at the time:

Marvin the Martian model

Timeless.

Walls, and how to hit them

My original plan for this was to use this to create game similar to Wolfenstein 3D, and that definitely had walls. So that was my next ambitious goal, with a bit of misadventuring.

A model being rendered, and something like walls and a floor are visible

My first implementation was to attempt to just generate some flat planes and hook them together. One corner of a cube, and everything attached, essentially. This was not a plan that was going to work.

Skybox

I decided to do what everyone else does and just make a large cube and stick everything inside of that.

Outdoor scene in a Quake 2 level, showing the Skybox

In Quake 2 for example, you've got the level geometry and then the reddish-orange sky that depicts what it would look on Stroggos. That is effectively the inside of a large cube.

A skybox image, unwrapped

That's one representation of a skybox texture, with the sides labelled. Saves it from looking like things are taking place inside of a black void.

I also started with a Skybox texture, as there are numerous versions floating in the aether.

Dragon model rendered inside of a cube with a skybox texture

cube with skybox texture, with edges that do not match

Depending on how your directions are defined, you find that you have to rotate certain images to fit properly.

Dragon model rendered inside of a cube with a skybox texture