OFPEC Forum

Addons & Mods Depot => Arma2 - Configs & Scripting => Topic started by: Archaine on 20 Feb 2010, 08:17:57

Title: Projectile splash effect and swimming for a custom Lake object.
Post by: Archaine on 20 Feb 2010, 08:17:57
I am working on an island with a large lake.

I have a nice custom p3d that fits my terrain and the texture looks good.

There is no splash when I shoot it, and you do not go swimming though.

I could not find anything anywhere about where to add these effects. Is this a property of the object in O2, is it tied to the material surface property file (.bisurf), or is it to be somehow designated in the config.cpp?

It is large enough to span several grids, so when your are at one end looking away with a small bit of the lake in front of you it disappears (it thinks the model is no longer in view).  Also I would like to have it visible beyond the range set in graphic settings.

Please any help would be appreciated, have been pulling my hair out for hours on this issue.

Also is there a list somewhere of possible parameters for things like sounds in the bisurf file, ie. hit = "concrete" etc..  I just took one and renamed concrete to water, just hoping it would work    :( it didnt.

Archaine
Title: Re: Projectile splash effect and swimming for a custom Lake object.
Post by: DeanosBeano on 20 Feb 2010, 11:06:27
 Normally the effects will be determined by the Firegeometry  having a rvmat applied , this will then link to the appropiate sound environment and or impact effects.

 However water is a little different and this is done via the roadway LOD, because  i am not aware of what you have at the moment  and whether you have used the two normal textures for calmwater , i suggest you apply to your roadway LOD (if you have one) this texture  "ca\structures\pond\data\watersurface_ca.paa", applying this to roadway may also give you the swim animation  >>



the BIS water for ponds and i guess lakes would normally be  :

in the detail lods
ca\structures\pond\data\normalmap1_dxt5.paa  

and material file

ca\structures\pond\data\calmwater01.rvmat


 The dissapearence will probably because you have gone past the limit of 50 meters in size , after this problems are caused and BIS engines dont like to draw it or it flickers. beter you reduce the tile size and use  a few of the tiles to cover your lake then  use the setabsolutehieght feature in V3 to get a nice smooth surface.
Title: Re: Projectile splash effect and swimming for a custom Lake object.
Post by: Gnat on 20 Feb 2010, 12:15:23
Do you have the full "CA" directory de-PBO'ed into your P drive and all the config.bin file unraped to config.cpp's?
i.e. can you see
ca\structures\pond\  
and all the files in P drive?

One dead give away, do ladders work on any buildings you placed in visitor?

I'm suspecting the pond object has not inherited all its "default" parameters when you binarized the terrain.

...... you did BinPBO / Binarize the terrain .... right !?

EDIT: Sorry just re-read and see its a custom pond.
Suspect you need to inherit the standard pond config into your pond
Title: Re: Projectile splash effect and swimming for a custom Lake object.
Post by: Planck on 20 Feb 2010, 14:12:52
Hmmm, pond.p3d in ArmA has no config, but in ArmA2 it has:

Code: [Select]
class CfgPatches
{
 class pond_test
 {
  units[] = {};
  weapons[] = {};
  requiredVersion = 0.1;
  requiredAddons[] = {"CAData"};
 };
};
class CfgSurfaces
{
 class Default;
 class Freshwater: Default
 {
  access = 2;
  files = "watersurface*";
  rough = 0;
  dust = 0;
  soundEnviron = "water";
  friction = 0.9;
  restitution = 0;
  isWater = 1;
  character = "Empty";
  impact = "default_Mat";
 };
};

And that is it, nothing else in the configs for pond.p3d.

The model file itself uses blackalpha.paa and water.rvmat in the 3 resolution lods.
The roadway lod uses more_anim.01.pac, and by association I suppose ... more_anim.02 - more_anim.07 as well.

All lods have LODNoShadow = 1 set.

This is from the ArmA pond.p3d and I am presuming the ArmA2 version is the same.



Planck
Title: Re: Projectile splash effect and swimming for a custom Lake object.
Post by: DeanosBeano on 20 Feb 2010, 14:21:20
Quote
I'm suspecting the pond object has not inherited all its "default" parameters when you binarized the terrain.

 Ponds dont need a class inheritance  , much like roads there all defined in there Model , as i have wrote above its the textures added that the engine will determine the anims and environment.

   as you have said though , when binarising the island all the relevent files in the releveant place are required so this info is proppely binarides into the WRP .

Quote
This is from the ArmA pond.p3d and I am presuming the ArmA2 version is the same.

 whilst you can create an arma 1 pond in arma2  using textures from arma1 (not sure if the blackaplha is still a viable texture  though). Arma2 clearwater ponds are Very different.


 to further explain how it works  for future refference .

 if we look in the config data relating to the pond  

Code: [Select]
class CfgSurfaces
{
 class Default;
 class Freshwater: Default
 {
  access = 2;
  files = "watersurface*";
  rough = 0;
  dust = 0;
  soundEnviron = "water";
  friction = 0.9;
  restitution = 0;
  isWater = 1;
  character = "Empty";
  impact = "default_Mat";
 };
};


 this line here  

  files = "watersurface*";

 corolates  with the texture we placed on the roadwaylod  I.E "ca\structures\pond\data\watersurface_ca.paa"

 notice watersurface  is the key element here and now tells the engine wwe have a water environment .

 if you want other kind of water  which maybe even better for a large lake then as Plank says  a texture with

 more_anim*  maybe more suitable .

 
Code: [Select]
  class Water
    {
      access = 2;
      files = "more_anim*";
      rough = 0;
      dust = 0;
      soundEnviron = "water";
      friction = 0.9;
      restitution = 0;
      isWater = 1;
      character = "Empty";
      impact = "default_Mat";
    };

 however i have never tried these and you may end up with a Sea like environment , lookforward to any feedback from anyone.

Title: Re: Projectile splash effect and swimming for a custom Lake object.
Post by: Archaine on 21 Feb 2010, 02:58:12
Thank you all.

The road Lod and associated textured fixed most of my issues.

I now have the ability to swim, and limited splash effect.

The projectile splash is only visible on the terrain below the water surface, so in shallow areas it is visible and in deep areas it is hidden. I looked at the ponds in Chernarus and noticed they had the same problem, if they were deep, there was no splash visible on the surface(as the effect was occurring on the terrain below).

I will try to play with creating a fire geo lod that has a texture associated to a bisurf file, though I only have a surface file with parameters for concrete, and have to guess at what to replace the parameters with for water effects.

My lake is about 800m so I have to make a lot of smaller ones, each grid where it meets the terrain will have to be a custom one, is there a way to combine these into 1 file so it will not be a nightmare to place them, using proxies or something similar? I could resort to ones that snap, I saw some sample objects where they used the memory Lod and assigned snap verticies, not sure of the details behind this process but learning that is my next task.

Also any input on making the object visible beyond the range limit set in graphics options?


Thanks again to all for your helpful comments

Archaine
Title: Re: Projectile splash effect and swimming for a custom Lake object.
Post by: Planck on 21 Feb 2010, 05:47:02
Here is water:

Code: [Select]
class CfgSurfaces
{
 class Default
 {
  access = 2;
  files = "default";
  rough = 0.075;
  dust = 0.1;
  isWater = 0;
  friction = 0.9;
  restitution = 0;
  soundEnviron = "normalExt";
  character = "Empty";
  impact = "default_Mat";
 };
 class Water
 {
  access = 2;
  files = "more_anim*";
  rough = 0;
  dust = 0;
  soundEnviron = "water";
  friction = 0.9;
  restitution = 0;
  isWater = 1;
  character = "Empty";
  impact = "default_Mat";
 };
};


Planck
Title: Re: Projectile splash effect and swimming for a custom Lake object.
Post by: Archaine on 21 Feb 2010, 11:24:31
I have several versions of that water code, they however vary in the name of the water class. Is it's name important or referenced to anything outside of the cfgsurfaces or is it just for organizational purposed for the data contained below it and the files section being the only thing connecting it to the game data?

I was going to try the more_anim suggestions however I cannot find any files of the type.
Does "more_anim*" query a set of files with that prefix, or something else embedded in the system?

I extracted every single pbo in my addons directory and yet nothing with that naming convention, how do I assign it to a surface if I cannot find it's location. Is this perhaps Arma1 only and not Arma2?

impact is always "default_Mat" what are the other possibilities usable here?

FYI for everyone's clarification: I found that content in the cpp, model.cfg, .bisurf, and cfgsurfaces files is not necessary to get the water swimming, and projectile splash(at least on the terrain below). It is only the roadway Lod having the water material assigned to it as was suggested earlier.

Though i'm still stuck with splashes at the terrain level, which is what the roadway assignment seems to be doing.

To separate the issue, if I modeled say... a large water jug, and wanted to have the projectile strike resemble a water hit, how would I do that? I tried setting up a firegeometry lod and assigning the faces to a rvmat that was pointing to a bisurf file that had the parameters listed below, but it did not do anything, its still the smokey brown cloud when the bullet hits.

Density = 1000; rough = 0.100000;
dust = 0; bulletPenetrability = 10;
soundEnviron = "water";     used to say concrete_ext            I made up the "water" hoping
isWater = "true";
friction = 0.800000;
restitution = 0;                                                               Anyone know what this is for?
impact = "water";      used to say Hit_Concrete                    I made up the "water" and "Hit_water" hoping
soundHit = "water";    used to say concrete                         I made up the "water" hoping


Also any ideas on forcing the view distance to be custom, so my lake shows from the other side of my island?


Thanks again, I hope this is helping others as well.

Archangel
Title: Re: Projectile splash effect and swimming for a custom Lake object.
Post by: Planck on 21 Feb 2010, 13:00:57
The "more_anim*" means all files that begin with that text.

As you found out, ArmA2 does not have any more_anim files, OFP and ArmA1 do however.

The class Water example quoted above is in fact from ArmA2 however.  :dunno:


Planck
Title: Re: Projectile splash effect and swimming for a custom Lake object.
Post by: DeanosBeano on 21 Feb 2010, 13:17:07

  I dont recall any problems with bis ponds and water impact before patch 1.05 , so maybe BIS fooked it who knows.
 However make sure that your roadway lod has the same properties in the vertex and thus when the pond/lake model is placed in the editor all lods are  lying where they should , you can test this by selecting all points in each lod and selecting the properties of the points , in the menue that pops up you will see there are a few options , Norma ,onsurface,above surface etc.

 your aiming to have your roadway lod act as your fire geometry so it should be only just below the surface in order to get the impact effect.

 as for your jug then you can possibly see that  the option is in most of the configs iswater  = _x and thats about it.

 what you should try for your jug is repeat the process i described for your lake and apply the the watersurfacetexture to your firegeometry lod.

 Again the most important thing here is that when your Binarising all this you need to ensure  your working on the P drive and that you have all the relevevant CA files in the correct place , this way when binarising your addon inherits propperly any properties it needs. (if you are making a config that is).

 personally i have done this 1000`s of times and have never made a config for a water object , i think the main problem for you at the moment is your objects are so big the lods arent working as they should ?

 
Title: Re: Projectile splash effect and swimming for a custom Lake object.
Post by: Archaine on 21 Feb 2010, 13:26:46
Wonder if the patch has anything to do with it, do I need to alter my editing tools or data on P: drive after installing the patch?  Because the water does not work right in game either, the Chernarus ponds have splash at terrain level instead of at water level. When roadway Lod acts as fire geo I get a similar result as in standard game.  Went to my backup directory of Arma2 before the patch and ran the game from the exe, no splash on pond surface in the deep parts there either.

Could someone load Chernarus and shoot the pond near the dam(in a deep part) let me know if it splashes on top of the water.  I would hate for hours of frustration to be due to patch or other program issues.

Dean,

I tried iswater = _X but it did not work.  I assume you meant exactly that and not "_x" as a variable for something else.

Density = 2000;
rough = 0.100000;
dust = 0; bulletPenetrability = 20;
soundEnviron = "concrete_ext";
isWater = "_x";
friction = 0.900000;
restitution = 0;
impact = "Hit_Concrete";
soundHit = "concrete";

I also deleted all the other parameters and tried just the isWater part, that did not work either.
I searched for bisurf files, and found a ton, but not one for water. I tried the glass bisurf file, and the water had the glass hit effect, so the system appears to be working, I just no working water params.

All of my LOD's line up, the resolution lod, the firegeo lod cube, and the roadway lod are all in the same plane. and everything seems to bin up fine. I assume nothing needs to be in config.cpp or model.cfg for this to work.

I have been working on a reduced size lake for testing, it is 60x60 and I read the max is 64x64.
Everything works but the splash level, and with the Bissurf file and material it works with the concrete parameters at least.

I have settled on a water object that has a firegeometry with the face material set and pointing to the concrete bisurf parameters, it is at least a white puff effect instead of brown, and it occurs on top of the water so this will have to do until I find out what the correct water parameters in the bisurf file are or if a patch problem is causing the issue.

Any pros and cons to having only a geometry lod with the material set and no mass, or a firegeometry lod with material set, or both, it works the same all three ways I noticed.  I assume both would to be a waste of verts, but assuming with this stuff is getting me into trouble :).


Thanks again

Archangel


Ok Dean, I made a simple water jug:

It's a 4x4x4 box with sharp edges on the 0000 lod, material is default.rvmat

It has a firegeo lod with the same 4x4x4 box, texture set to P:\CA\structures\Pond\data\watersurface_ca.paa
firegeo has 1 component listed.

It has a shadowvolume lod with the same box, sharp edges and triangulated.

I load it up and I get the default brown dust cloud for the projectile strike effect.
Title: Re: Projectile splash effect and swimming for a custom Lake object.
Post by: DeanosBeano on 21 Feb 2010, 14:58:02
 lol sorry _x was my way of saying   can be 0 or 1  or true or false ;).

 i will make you a couple of examples later today , its only because i have spent the last month making a river that i am confident in what i am relaying in regards to your lake , 64x64  is too big mate , try not to go past 50 and where possible  ( you will see bis use a maximum 40x40 for land cell size too) try 40x40 .

 i will edit this later with a couple of examples, the jug thing is a first but i will give it a try , you may find that the rvmat also defines the angle at which the surface material is affected, sounds like a fun exercise so i will try it. if your configging then maybe you simply need CAdata as a required addon , i will check.

  EDIT
                           I see same problem with the deeper ponds on chernarus mate  no surface effect :(.
     I will see if its the engine limit or can be altered in an addon . same ole BIS  one > =  two << .

      

  
Title: Re: Projectile splash effect and swimming for a custom Lake object.
Post by: Archaine on 22 Feb 2010, 03:41:52
Thanks DeanosBeano

How does the rvmat define angle, sound interesting?

A quick clarification: From what I gather there are no parameters for water available in a bisurf file, is this true?

Can one make custom effects for projectile impacts, are they tied to a set of data files somewhere or are they embedded in the engine?

There is a splash on the terrain, and on the sea, should be a way to use this effect elsewhere, but I cannot find any data files referencing such effects.

I will just use the concrete one for now, it looks close enough, but I will check back in case you or someone else has a solution for this.


Archaine

Title: Re: Projectile splash effect and swimming for a custom Lake object.
Post by: DeanosBeano on 22 Feb 2010, 16:57:11

Rvmats have xyz for specular and i believer others , i was thinking out loud as to whether this could also define the penetration value, i.e at what angles the HIT/Impact effect is Read .

 I have come to the conclusion that a mixture of BIS penetration values and the fact that roadway lod always is at 0 no matter how high in the model ,is the contributing factor to the effect showing on the floor rather than the surface , my tests show that ffresh/calm water has a maximum height to look good ,regarding water splash of about 1.2 meters. ( about the height of the effect lol). i will try and create the more_anim set up , i assume arma2 sea uses this .


 
Title: Re: Projectile splash effect and swimming for a custom Lake object.
Post by: Archaine on 25 Feb 2010, 03:52:02
Anyone know exactly what effect the parameters of the bisurf file have?

Density = 200;                                  modifier for penetration?
rough = 0.1;                                     not sure, perhaps has to do with the bullet deflection?
dust = 0;                                          don't know?
bulletPenetrability = 800;                     how well bullets penetrate, small a little, big alot.
soundEnviron = "concrete_ext";            not sure, perhaps the sound you hear when standing next to it?
isWater = "1";                                    what exactly does this affect? (seen as true false and numbers?)
friction = 0.1;                                    not sure, perhaps has to do with the bullet deflection?
restitution = 0.1;                                what the heck does this do?
impact = "Hit_Concrete";                      graphic effect of impact. (is there one for water?)
soundHit = "concrete";                         what sound occurs on impact. (is there one for water?)

DeanosBeano,
(could not find any more_anim files anywhere, not sure what arma2 sea uses.)

Archaine
Title: Re: Projectile splash effect and swimming for a custom Lake object.
Post by: DeanosBeano on 25 Feb 2010, 10:06:13

 if they exist at all you should be able to locate them in a folder on your p drive (materials ?) in here the path to more anim should be found , there is a folder with the material rvmats , cant quite remember the name of the folder ,if you cant find it i will take a look tonight.
Title: Re: Projectile splash effect and swimming for a custom Lake object.
Post by: Archaine on 25 Feb 2010, 18:21:04
I un-pbo'ed everything in Arma2, and searched both P drive and Arma2 directory for any file with more_anim* and nothing was found. Think it may only be Arma1

Archangel
Title: Re: Projectile splash effect and swimming for a custom Lake object.
Post by: DeanosBeano on 25 Feb 2010, 18:52:07

 well i know that the CA/data/default.p3d  has almost all textures applied to it including the More_anim01.pac  which is pathed CA\data\data\more_anim.01.pac , problem is the texture dont exist hmm.

 try that path on your tile and see if you get texture not present error.