User Tools

Site Tools


arma:modeling:glass_damage

Glass Damage Tutorial

Glass Damage Tutorial by Obmar

Introduction

The ArmA glass damage animation seems to be one of the biggest enigmas due to the limited amount of info on the subject. All of the modelers that have tried know what I am talking about. As modelers we all know that Objects used in the Geometry or Fire Geometry LOD must be closed and convex in order to work. So once we do this and then put the model in-game, we shoot at the vehicle, the glass gets damaged but does not penetrate and kill the occupants. In other words the glass seems to be bullet proof.

The correct process lies in the way the model is convexed in the Fire Geometry LOD and the correct modeling of vertices in the Hit-points LOD. The rest is just fine tuning in the config.

In this tutorial I will explain the modeling process step by step as well as the Config entries and their meaning. I am using a helicopter I modeled as a sample but the process in this tutorial is valid for all types of vehicles.

pmc.editing.wiki_images_glass_damage_tutorial-01.jpg

Step 1

Making the Textures

We first start by making the different glass damage textures to be used in the animation. You will only need 2 damage textures as the animation only consists of 2 parts

dammageHalf = glassbr1_ca.paa
dammageFull = glassbr2_ca.paa

I am only using this as a sample (texture) name, you can give your textures any name you wish.

pmc.editing.wiki_images_glass_damage_tutorial-02.jpg

Step 2

Naming the Selections

In Oxygen2 we open our model and in the Resolution LODs (A) we start naming all the glass selections (B) . We have to use the Czech names for them to work

sklo predni L (windscreen Left {abbr})
sklo predni P (windscreen Right {abbr})

pmc.editing.wiki_images_glass_damage_tutorial-03.jpg

Step 3

Modeling the Fire Geometry LOD

Create a Fire Geometry LOD in the Named Selections (A) and make the model with all the components (B) . The model should be simple, defining the basic model shape with important components named. Surfaces modeled in this LOD do STOP any bullet (any caliber).

Note: Do not model the glass component yet.

pmc.editing.wiki_images_glass_damage_tutorial-04.jpg

Step 4

Validating the Fire Geometry

Select all the components in the Fire Geometry LOD (ctrl+a) then go to (A) Structure | Convexity | Component Convex Hull and apply.

pmc.editing.wiki_images_glass_damage_tutorial-05.jpg

Step 5

Modeling the Fire Geometry Glass Component

The following steps are important and must me modeled in this order.

Hint: Glass Component must be modeled in a separate O2 LOD and not in the Fire Geometry LOD. What I normally do is place the model in LOD 0.000 and in the next LOD 1.000 I make my glass as I have a background LOD (Yellow line image) to work off.

Make the different Glass Components (A) then selecting one part of the component at a time go to (B) Structure | Convexity | Make Convex and apply.

Note: Use Make Convex and not Component Convex Hull for the Glass component.

The reason for doing one part of the glass component at a time is if you select them all and apply Make Convex it convexes the entire selection into one Convex component.

pmc.editing.wiki_images_glass_damage_tutorial-06.jpg

Step 6

Naming the Glass Selection and Applying material texture

Now we start naming the selections in the Convexed Glass Component (A) and match them to the selections we named in the Resolution LODs

sklo predni L (windscreen Left {abbr})
sklo predni P (windscreen Right {abbr})

Now we select the entire Glass Component (CTRL-A) and open the Face Properties (B1) and in the texture dialogue (B1) enter this texture ca\data\data\black.pac and apply.

Note: It is important to enter and apply this specific texture because without it the animation will not work. I have tried using other textures and the animation does not work.

Now select and copy the entire Glass Component (CTRL-A) and (CTRL-C) and go to the Fire Geometry LOD

pmc.editing.wiki_images_glass_damage_tutorial-07.jpg

Step 7

Pasting the Glass Selection in the Fire Geometry LOD

Now in the Fire Geometry LOD (A) we paste the Glass component (B) by pressing (ctrl+v).

pmc.editing.wiki_images_glass_damage_tutorial-08.jpg

Step 8

Adding Glass Selection to Components

Select the entire model in the Fire Geometry (CTRL-A) and go to (A) Structure | Topology | Find Components and apply.

pmc.editing.wiki_images_glass_damage_tutorial-09.jpg

Step 9

Adding the Pilot and Cargo proxys

You can now copy the pilot and cargo proxys from your Resolution LOD and paste them into the Fire Geometry LOD (A)

Very Important: Do not convex or add the proxys to the components, All proxys must just be pasted (CTRL-V) into the Fire Geometry LOD.

pmc.editing.wiki_images_glass_damage_tutorial-10.jpg

Step 10

Adding Glass Selection to Hit-points LOD

Create a Hit-points LOD (A) if you already have this LOD in the model just add vertices to all the openings where glass is present on your Resolution LODs (B) and Name the different vertices to match the appropriate selection .

sklo predni L (windscreen Left {abbr})
sklo predni P (windscreen Right {abbr})

Hint: Try and keep the vertices as close to the Glass surface on the Resolution LOD using the BackGround LOD (Yellow Lines) as a guide and cover all openings where there is a glass texture with 1 vertice in each. Larger openings with 2 or 3 vertices.

That's it for the Modeling part of the Glass Damage Animation. Save your work and open your config.cpp file.

Step 11

Config and explanations

You must add the following code to the different config classes. I am using config samples add the highlighted (in RED) sections to your config.cpp

class CfgModels
{
	class Default
	{
		sectionsInherit = "";
		sections[] = {};
		skeletonName = "";
	};
	class my_addon
	{
		sectionsInherit = "";
		sections[] = {	"num1", "num2", "roundel", "velka vrtule", 
				"velka vrtule staticka", "velka vrtule Blur",
				"malavrtule","mala vrtule staticka",
				"mala vrtule blur","otocvez","otochlaven",
				"zasleh","podsvitpristroju","poskozeni",
				"L svetlo","ammo_belt","sklo predni P",
				"sklo predni L","trup","motor",
				"clan","clan_sign"
		};
		skeletonName = "my_addon_skeleton";
 
class CfgVehicles
	class HitLGlass
	{
		armor = 0.7;
		material = -1;
		name = "sklo predni L";
		visual = "sklo predni L";
		passThrough = 0;
	};
	class HitRGlass
	{
		armor = 0.7;
		material = -1;
		name = "sklo predni P";
		visual = "sklo predni P";
		passThrough = 0;
	};
	dammageHalf[] = {"\my_addon\data\glass_ca.paa","\ my_addon\data\glassbr1_ca.paa"};
	dammageFull[] = {"\my_addon\data\glass_ca.paa","\ my_addon\data\glassbr2_ca.paa"};

Note:

armor = has nothing to do with glass armour value but with how much damage is requires before changing the damage texture. The higher the value the more damage is needed to change the damage texture. Value ranges from 0.1 to 1.0. I have used the 0,7 value as it is a nice balance between damage for first shot (damageHalf) and damage for second and third shot (damageFull).

material = here you can assign a material value to link animation to texture in the resolution LODs. Its not necessary if you have named the glass selections in the Resolution LODs.

name = “sklo predni L”/“sklo predni P” refers to the damage animation name.

visual = “sklo predni L”/“sklo predni P” refers to the named vertices /selections in the hit-points LOD.

passThrough = has nothing to do with the penetration value of the glass component. It's a value given to the component to determine how vital it is to the whole model. Value = 0 means it's not vital. Value = 1 means that if the component takes max damage it will cause model to blow up in game.

dammageHalf[] / dammageFull[] = is the path to the glass damage textures used for the Glass Damage Animation. Note spelling of damage…

That's it for this tutorial, save your config and your model, binarize and go to game and test your animation.

pmc.editing.wiki_images_glass_damage_tutorial-11.jpg

Step 12

In-game test

(A) Glass Damage Animation not triggered.

(B) First shot fired, occupant killed and damageHalf animation is triggered.

(C) Second shot fired, occupant is killed and damageFull animation is triggered.

Note:

armor = you can increase the damage required to trigger the damageFull texture by increasing this value.

Notes

Tutorial by Obmar 12 February 2008. And Glass_damage_tutorial.rar is the original tutorial PDF file for download from OFP-ArmA.Tutorial.Include.Files.2024-03-19/ Torrent Magnet:

magnet:?xt=urn:btih:3f74bfb31d795d124ff0a3b2d5c98c7b7c7da3c6&xt=urn:btmh:1220322d34f3fe96c02e4baa798c17198f84aa1bd98e544214e18ce4ab9d4f39457c&dn=OFP-ArmA.Tutorial.Include.Files.2024-03-19&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a6969%2fannounce
arma/modeling/glass_damage.txt · Last modified: 2024-03-19 07:11 by snakeman