Jump to content
XCOMUFO & Xenocide

Issue #139 Base Facilities Texturing


Vaaish

Recommended Posts

I agree about destructible walls in alien ships and above ground buildings, but in the underground bases, being able to destroy the module outer walls won't really add much since there is nothing beyond them except dirt/rock. I guess we could have dirt stream through if a chunk of outer wall goes up.
Link to comment
Share on other sites

  • Replies 226
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Yes, the props (The table for the barracks) the server and microscope for the lab etc etc are not attached. The table for instance is one piece, but we would only want half of it destroyed though if it was hit like in the game.

 

But the walls even in the alien ships were destructible with enough power.

 

2ndly If you had the game not render pieces of the model, wall etc how would that look, because there is nothing on the side of a destroyed wall

OK, if I follow you, you're saying the 3D facility models are not a single mesh. The "breakables" are included as sub meshes in the model. OK, that's a step on the way, but it leaves me with the problem of how to map the "sub meshes" to volumes in the battlescape. So I the game engine can path around them, line of sight visibility, damage them with weapons fire/explosions etc.

 

Basically, I'm trying to figure out the structure for the battlescape game rules and graphics engines.

Link to comment
Share on other sites

That still leaves the problem with the barracks; the bunkbeds are all part of the model; so the logic of rock outside pushing doesn't flow with them.... What if an explosion goes of in the rax; do the walls were the bunk beds remain unharmed?

 

I can see how if the outer wall is damaged their texture can be changed with some scortch marks or something...

 

The same goes for the Lab where the specimens are contained; the wall itself and even the door are part of the model...

Link to comment
Share on other sites

In the barrakcs there are bunk beds that are intergrated into the wall correct? I am persuming that those "Inner" "walls" could be blown up, compared to the "Outer Wall"
Link to comment
Share on other sites

In the barracks there are bunk beds that are integrated into the wall correct? I am presuming that those "Inner" "walls" could be blown up, compared to the "Outer Wall"

I'm still not sure what you're asking.

there's the 3D model, and a cell layout (that's used by the "rules engine") At the current time, the walls in the cell layout that mark the positions of the bunks are unbreakable. I haven't implemented breakable walls in the rules engine, yet, but it should not be difficult to do. (Just give each wall an "armor factor". Any explosion that does more damage than the armor factor will destroy the wall (so I would remove the wall from the cell layout.) But I' don't know what the graphic engine would need to do to the 3D model to reflect the destroyed bunk. Or even how. Simplest case might be to not draw the bunk. But then I've got the problem of how do I map cell walls X, Y and Z in the cell layout to mesh "bunk3" (or whatever it is) in the 3D model.

I hope that clarifies things

Link to comment
Share on other sites

I believe he means leave the walls surrounding the module as unbreakable and any walls that subdivide the interior of the module as breakable.
Link to comment
Share on other sites

A thought that occurs to me, goes something like this:

1. Currently the rule engine divides the battlescape up into cells.

2. Each cell has 3 faces north, west and ground.

3. The graphic engine draws a textured quad for each face. The result looks UGLY.

 

So, what happens if we get rid of the faces. Instead each cell holds a 3D model. e.g. Instead of having a cell having a north wall, the cell would have a 3D model of a wall segment, running east/west. Then drawing the battlescape would be a case of looking up all the models and drawing them. (Note, because the screen would be made of hundreds of 3D models, I'd probably need to use model instancing to draw, so individual models can't be too complicated.

60 fps and 20 x 20 cells per layer, and 4 layers = aprox 100,000 models per second. So, poly count of maybe 100 per model? Note, most models would be floor tiles, so just a simple quad. (2 triangles)

Link to comment
Share on other sites

I believe he means leave the walls surrounding the module as unbreakable and any walls that subdivide the interior of the module as breakable.

I'm not following where you're going with this.

As I said, at moment no walls are breakable.

Also I have no problem, in theory, with some objects being not breakable.

Where I have the problem is handling breakables.

Link to comment
Share on other sites

We aren't saying that any walls currently are, we are simply saying which ones we don't think SHOULD be breakable. I'm attaching an image to try to explain better.

walls.jpg

Link to comment
Share on other sites

Depending on what was destroyed the engine might go and look into "Doodade" sub models; which contain things like gibs, and pre modeled broken stuff; and all the engine does is replace the said wall with a broken one... By wall I mean cell
Link to comment
Share on other sites

I think the main problem - correct me if I'm wrong - is "what should the gfx engine display after destroying a destroyable wall? There is nothing to be displayed. No floor, no wall...

Er, not exactly, it's more a case of how do the gfx engine handle breakables? And how do the rules engine communicate breakable information to the gfx engine?

Note, discussion here is somewhat difficult due to my limited knowledge of models. (I just use XNA to drag the model in and render it.)

Let me try and explain some of the issues.

  • Lets start by assuming we have a destroyable wall (Say the internal walls in the Lab facility)
  • So, is this wall one model, or multiple models?
  • Assume the wall is made up of several 3D models, one model per cell.
  • How do I associate cells to models? How do I say which whole group of cells are drawn using a single unbreakable model, and other cells have their own model?

Edited by dteviot
Link to comment
Share on other sites

  • 2 weeks later...
Can the graphics engine dynamically add an alpha map to a model where the wall has been destroyed and if appropriate place premade rubble cells in the transparent area?
Link to comment
Share on other sites

Can the graphics engine dynamically add an alpha map to a model where the wall has been destroyed and if appropriate place premade rubble cells in the transparent area?

That's a totally different way of thinking and actually very interesting!!

 

Another (almost identical approach) is to check which wall cells where affected, and then overlay a texture (probably with an alpha map, but it isn't vital). You don't have to add/remove models or part of the wall mesh. In addition, you can either add tiny rubble models (which can collide with neighbouring models) or even generate particle effects (debris and smoke)

Edited by kafros
Link to comment
Share on other sites

Can the graphics engine dynamically add an alpha map to a model where the wall has been destroyed and if appropriate place premade rubble cells in the transparent area?

I think you mean, "could the graphics engine I'm going to write do this." :)

And the answer is. I think so, but I don't think it would help any.

  • Firstly, It doesn't do anything to help with how to go from the cell geometry in the "rules engine" to the UV co-ordinates in the texture. In fact, it's probably harder to do that with the texture than it is with the 3D vertexes.
  • Second, and I'm not sure, but I suspect trying to modify a texture more work than dropping vertexes out of mesh.
  • Thirdly, if the mesh is a 3D volume, and I make parts of the surface transparent, then you're going to see the inside of the mesh. e.g. If its a wall, and we slice a hole through it, you're not going to see brick inside the hole, you'll see nothing.

Edited by dteviot
Link to comment
Share on other sites

on your third point, that is what the rubble cell does. It prevents you from seeing the inside of the mesh since it now occupies the location you can see through. in this way we only need to worry about having rubble models that can be reused instead of having to have every model broken into chunks and worry about things like how the texture wraps around the new break. Edited by Vaaish
Link to comment
Share on other sites

Something compleatly unrelated:

 

Does the baseview need its own skybox? I would think so...

Link to comment
Share on other sites

Something compleatly unrelated:

 

Does the baseview need its own skybox? I would think so...

Assuming by baseview you mean the screen where you layout facilities in an outpost.

Then, no, it doesn't need a skybox, because the view never moves. However, a background image might be nice. (Not sure thought.)

Link to comment
Share on other sites

In that case is it possible to genearte a diffrent image (From a pool of images) depending on where the base is located?

 

Ex:

 

Mountains - Lots of big rocks; huge granite formations and such

Costal - sedement mostly, no big rocks

"Normal" - normal "Dirt"

Proximity to city - possible pipes and such

Link to comment
Share on other sites

So after this talk about destructables; should I continue working on theese as if they are meant to be part of the base invasion mission; or strictly just part of the baseview?
Link to comment
Share on other sites

I would say continue. as mentioned, at the least they can be used for baseview and at best for battleview as well.
Link to comment
Share on other sites


×
×
  • Create New...