Jump to content

Sign in to follow this  
Allie

texture defining

Recommended Posts

Defining roughness, dust, randomly placed vegetation on textures.

First important thing is when you want to define stuff on default textures, you have to change the name of them because default these textures are defined by the game engine itself.

So in this case i used "PISEK" and "TRAVAJIH", and changed there names to "xxpisek" and "xxtravajih", this is done in the DATA folder, rename them all, dont forget to change the names in the paths in the RVMAT files too then !!!!!!!

The road part "CES" are ok to define without changing the name, it seems only needed for the terrain textures, however, i tryed to do the defining on the "SIL" road parts and they dont seem to work (tested the road on sarhani, but even there it seems these road parts are not working proper at all).

Ok then here is the code sample for the config.cpp file.

The "class clutter" will probably allready be in your cpp, but see how i changed the names of them too, i dont know if this is needed but i just did it to have a bit of clearer look on what i was doing.

I hope you map makers can do something with this.

code sample from "config.cpp"

  [b said:
Quote[/b] ]class CfgSurfaces {

class Default {};

class water {};

class zandbak : Default {

access = ReadOnly;

files = "xxpisek_*"; //all files starting with "xxpisek" will be defined

rough = 0.02; // roughness setting, the way vehicles move on these textures(higher number, more bumps)

dust = 0.3; // amount of dust vehicles will create on these textures(higher number, more dust)

soundEnviron = "sand"; // sound effect when driving or walking on these textures

character = "xxSandClutter"; // this is the clutter stuff you defined which will be placed on the textures

};

class wegisies : Default {

access = ReadOnly;

files = "ces*";

rough = 0.005;

dust = 0.01;

soundEnviron = "road";

character = "Empty";

};

class grassie : Default {

access = ReadOnly;

files = "xxtravajih_*";

rough = 0.01;

dust = 0.09;

soundEnviron = "drygrass";

character = "xxGrassClutter";

};

};

class CfgSurfaceCharacters

{

class xxGrassClutter

{

probability[] = {0.500000,0.050000,0.040000}; // how much stuff from the clutters will be placed, so in this case 3 numbers representing the 3 names on next line.

names[] = {"xxgrasslong","xxGrassSevenbeauty","xxFlowersWhite"};

};

class xxSandClutter

{

probability[] = {0.040000}; // just one number, next line just defines 1 clutter

names[] = {"xxSmallRocks"};

};

};

class clutter

{

class xxGrassGeneral: DefaultClutter

{

model=ca\plants\clutter_grass_general.p3d;

affectedByWind = 0.3;

swLighting = true; //relativeColor[]={0.8,0.8,0.8,0};

colorByGround=0.9;

scaleMin = 0.75;

scaleMax = 1.0;

};

class xxGrassLong: xxGrassGeneral

{

model=ca\plants\clutter_grass_long.p3d;

affectedByWind = 0.6;

scaleMin = 0.60;

scaleMax = 1.10;

};

class xxGrassSevenbeauty: xxGrassGeneral

{

model=ca\plants\clutter_grass_sevenbaeuty.p3d;

affectedByWind = 0.2;

scaleMin = 0.70;

scaleMax = 1.10;

};

class xxSmallRocks: xxGrassGeneral

{

model=ca\rocks\clutter_stone_small.p3d;

affectedByWind = 0;

scaleMin = 0.90;

scaleMax = 1.10;

};

class xxFlowersWhite: xxGrassGeneral

{

model=ca\plants\clutter_white_flower.p3d;

};

};

You are able to make forests this way too, only down thing making forests this way is that you have to define a ground texture which then only can be used where you want the forest.

I mean u can clutter trees too on ground textures, again it will clutter the trees on ALL the textures with that name, again its only possible if you can use 1 ground texture just specific for forest underground.

(you can even clutter buildings or other objects)

Later dudes smile_o.gif

Alphons

PS: Really sorry, i see i had allready started a post on this subject, its called TEXTURE ROUGHNESS, maybe a modarator can glue these 2 posts together.

Again sorry for this.

Share this post


Link to post
Share on other sites

Ok update on clutter forest idea, i tryed some different options of doing it like i described above, well up to now i was NOT able to do it.

So for now forget about making forest this way.

You probably need to create special models of trees to be able to clutter them randomly onto a pre defined texture.

Sorry,

Allie

Share this post


Link to post
Share on other sites

Got it working but not defining the texture just changing the clutter model. But the collision dont work!!!

arma2007110817004485if3.jpg

Share this post


Link to post
Share on other sites

Cool, i just had some quick test yesterday night, maybe some letter or dot wrong, but hey that is good news, not the collision shit, but that you have actually result.

the collision probly some to do with some stuff to be defined.

Maybe later i'm trying to see if i can get some out of visitor smile_o.gif

For now i'm still experiment with the close up textures, size and stuff.

Please dont mind my english smile_o.gif

Later,

Allie

PS, the time i wrote this post, your picture still not loaded, i like big pictures, but this is not working mate, maybe better just paste link.

Share this post


Link to post
Share on other sites

Hey mate, still no succes for me, is it possible you post a quote of your config please ?

I dont understand what i'm doing wrong.

I cant find my sample defining forest for bullet penetration and such, this meight be some to do with the collision too.

I mean if i clutter rocks on texture everything is ok, even collision effects, so i want to try and figure it out, or maybe if somebody else knows way of creating forest quickly i want to know that.

I'm busy on an island with 8 different closeup ground textures :0 so i have spare textures to put forest on.

(dont try using more then 4 different textures in 1 satellite part created by visitor) but if you make sure you dont use more then 4 close to eachother everything is fine smile_o.gif

Its a bit puzzeling around, but it is possible.

Later,

Allie

Share this post


Link to post
Share on other sites
  [b said:
Quote[/b] ]#define ReadAndWrite 0

#define ReadAndCreate 1

#define ReadOnly 2

#define ReadOnlyVerified 3

class CfgPatches {

class island {

units[] = {};

worlds[] = {island};

requiredVersion = 0.1;

};

};

class DefaultLighting; // External class reference

class DefaultLighting_CA : DefaultLighting {};

class CfgWorlds {

class DefaultClutter {

scaleMin = 0.9;

scaleMax = 1.4;

};

class DefaultWorld; // External class reference

class Intro : DefaultWorld {};

class island : Intro {

access = 3;

cutscenes[] = {"DesertIntro1"};

description = "island";

icon = "";

worldName = "\island\Source\Terrain\island.wrp";

pictureMap = "";

pictureShot = "";

plateFormat = "ML$ - #####";

plateLetters = ABCDEGHIKLMNOPRSTVXZ;

longitude = -40; // positive is east

latitude = -40; // positive is south

class Grid //OFP style Aa00 - JJ99

{

//colorGrid[]={0,0,1,1};

//colorGridMap[]={0,0,1,1};

offsetX=0;

offsetY=0;

class Zoom0

{

zoomMax=0.2;

format="XY";

formatX="Aa";

formatY="00";

stepX=256;

stepY=256;

};

class Zoom1

{

zoomMax=1.0;

format="XY";

formatX="A-";

formatY="0-";

stepX=2560;

stepY=2560;

};

}

startTime = 8:30;

startDate = 07/06/2007;

startWeather = 0.1;

startFog = 0.0;

forecastWeather = 0.3;

forecastFog = 0.0;

seagullPos[] = {1272.84, 150.0, 14035};

centerPosition[] = {2500, 2500, 300};

ilsPosition[] = {2545, 3000};

ilsDirection[] = {0, 0.08, 1};

ilsTaxiIn[] = {2495, 2725, 2495, 2850, 2508, 2860, 2508, 3000, 2520, 3010, 2545, 3000};

ilsTaxiOff[] = {2545, 2445, 2520, 2425, 2495, 2445, 2495, 2725};

drawTaxiway = 0;

class ReplaceObjects {};

class Sounds {

sounds[] = {};

};

class Animation {

vehicles[] = {};

};

class Lighting : DefaultLighting {};

clutterGrid = 1.11;

clutterDist = 55;

noDetailDist = 40;

fullDetailDist = 5;

minTreesInForestSquare = 3;

minRocksInRockSquare = 4;

class clutter {

class GrassGeneral : DefaultClutter {

model = "ca\plants\clutter_grass_general.p3d";

affectedByWind = 0.3;

swLighting = 1;

scaleMin = 0.75;

scaleMax = 1.0;

};

class GrassFlowers : GrassGeneral {

model = "ca\plants\clutter_grass_flowers.p3d";

};

class GrassLong : GrassGeneral {

model = "ca\plants\clutter_grass_long.p3d";

affectedByWind = 0.6;

scaleMin = 0.6;

scaleMax = 1.1;

};

class GrassSevenbeauty : GrassGeneral {

model = "ca\plants\clutter_grass_sevenbaeuty.p3d";

affectedByWind = 0.2;

scaleMin = 0.7;

scaleMax = 1.1;

};

class GrassYellow : GrassGeneral {

model = "ca\plants\clutter_grass_yellow.p3d";

affectedByWind = 0.2;

scaleMin = 0.7;

scaleMax = 1.1;

};

class GrassDesert : GrassGeneral {

model = "ca\plants\clutter_grass_desert.p3d";

};

class ForestFern : GrassGeneral {

model = "ca\plants\clutter_forest_fern.p3d";

affectedByWind = 0.1;

scaleMin = 0.9;

scaleMax = 1.1;

};

class SmallRocks : GrassGeneral {

model = "ca\rocks\clutter_stone_small.p3d";

affectedByWind = 0;

scaleMin = 0.9;

scaleMax = 1.1;

};

class FlowersColor : GrassGeneral {

model = "ca\plants\clutter_smetanka.p3d";

};

class FlowersWhite : GrassGeneral {

model = "ca\plants\clutter_white_flower.p3d";

};

class MushroomsHorcak : GrassGeneral {

model = "ca\plants\clutter_horcak.p3d";

affectedByWind = 0;

scaleMin = 0.85;

scaleMax = 1.25;

};

class MushroomsPrasivka : MushroomsHorcak {

model = "ca\plants\clutter_prasivky.p3d";

};

class MushroomsBabka : MushroomsHorcak {

model = "ca\plants\clutter_babka.p3d";

};

class MushroomsMuchomurka : MushroomsHorcak {

model = "ca\plants\clutter_muchomurka.p3d";

};

};

class Subdivision {

class Fractal {

rougness = 5;

maxRoad = 0.02;

maxTrack = 0.5;

maxSlopeFactor = 0.05;

};

class WhiteNoise {

rougness = 2;

maxRoad = 0.01;

maxTrack = 0.05;

maxSlopeFactor = 0.0025;

};

minY = 0.0;

minSlope = 0.02;

};

class Ambient {

class BigBirds {

radius = 300;

cost = "((1 + forest + trees) - ((2 * rain)) - houses) * (1 - night) * (1 - sea)";

class Species {

class Hawk {

probability = 0.2;

cost = 1;

};

};

};

class Birds {

radius = 170;

cost = "(1 - night) * ((1 + (3 * sea)) - (2 * rain))";

class Species {

class Seagull {

probability = 0.2;

cost = 1;

};

};

};

class BigInsects {

radius = 20;

cost = "(5 - (2 * houses)) * (1 - night) * (1 - rain) * (1 - sea) * (1 - windy)";

class Species {

class DragonFly {

probability = "0.6 - (meadow * 0.5) + (forest * 0.4)";

cost = 1;

};

class ButterFly {

probability = "0.4 + (meadow * 0.5) - (forest * 0.4)";

cost = 1;

};

};

};

class BigInsectsAquatic {

radius = 20;

cost = "(3 * sea) * (1 - night) * (1 - rain) * (1 - windy)";

class Species {

class DragonFly {

probability = 1;

cost = 1;

};

};

};

class WindClutter {

radius = 10;

cost = "((20 - 5 * rain) * (3 * (windy factor [0.2, 0.5]))) * (1 - sea)";

class Species {

class FxWindGrass1 {

probability = "0.4 - 0.2 * hills - 0.2 * trees";

cost = 1;

};

class FxWindGrass2 {

probability = "0.4 - 0.2 * hills - 0.2 * trees";

cost = 1;

};

class FxWindRock1 {

probability = "0.4 * hills";

cost = 1;

};

class FxWindLeaf1 {

probability = "0.2 * trees";

cost = 1;

};

class FxWindLeaf2 {

probability = "0.1 * trees + 0.2";

cost = 1;

};

class FxWindLeaf3 {

probability = "0.1 * trees";

cost = 1;

};

};

};

class NoWindClutter {

radius = 15;

cost = "(20 * (windy factor [0.1, 0.2])) * meadow * (1 - rain) * (1 - sea) * (1 - forest) * (1 - houses)";

class Species {

class FxWindPollen1 {

probability = 1;

cost = 1;

};

};

};

class SmallInsects {

radius = 3;

cost = "(12 - 8 * hills) * (1 - night) * (1 - rain) * (1 - sea) * (1 - windy)";

class Species {

class HouseFly {

probability = "deadBody + (1 - deadBody) * (0.5 - forest * 0.1 - meadow * 0.2)";

cost = 1;

};

class HoneyBee {

probability = "(1 - deadBody) * (0.5 - forest * 0.1 + meadow * 0.2)";

cost = 1;

};

class Mosquito {

probability = "(1 - deadBody) * (0.2 * forest)";

cost = 1;

};

};

};

class NightInsects {

radius = 3;

cost = "(9 - 8 * hills) * night * (1 - rain) * (1 - sea) * (1 - windy)";

class Species {

class Mosquito {

probability = 1;

cost = 1;

};

};

};

};

class Names {

class Veg_1 {

name = "";

position[] = {2713.62, 2140.92};

type = "VegetationPalm";

radiusA = 50;

radiusB = 50;

};

class Veg_2 {

name = "";

position[] = {2446.09, 3038.29};

type = "VegetationPalm";

radiusA = 50;

radiusB = 50;

};

class Veg_3 {

name = "";

position[] = {2940.52, 2923.19};

type = "VegetationPalm";

radiusA = 50;

radiusB = 50;

};

};

};

};

class CfgWorldList {

class island {};

};

Ok what i did was change "model = "ca\plants\clutter_grass_general.p3d";" to somthing like "model = "ca\plants\palm_01.p3d";"

and all the others as im not quite sure ( or didnt test it enough ) to find which one actualy changed the grass to trees!

Another thing also is that the trees render like the grass so i recon playing around with the view settings of the grass to view over longer distance.

ATM i think its just using the mesh and texture and not the collision and res settings in the actual p3d. So we need to find away of telling arma to use the model as grass but with all collision and res settings! ( not sure if its possible but worth a try )

Ive also noticed that in sara.pbo the CfgWorlds.hpp defines a desert clutter class which is grass so it may work like the SATMASK were you define a colour and it applies the texture.

Share this post


Link to post
Share on other sites

Yay!

I figured out how to add custom clutters using custom ground textures with custom names (not the BI one)! biggrin_o.gif

First, you don't have to define both the class CfgSurfaces and the CfgSurfaceCharacters within the cfgWorlds.

Then add in the cfgWorlds class the class clutter.

That's all!

a config should be:

class DefaultLighting;

class DefaultLighting_CA : DefaultLighting {};

class CfgSurfaces

{

//your own classes

};

class CfgSurfaceCharacters

{

//your own classes

};

class CfgWorlds

{

//ALL THE MAP DEFINITIONS

class clutter

{

/your clutters defined in CfgSurfaces and CfgSurfaceCharacters

};

};

class CfgWorldList

{

class yourmap {};

};

Linker Split

smile_o.gif

Images showing my grass:

img1nf3.th.jpg

img2yy0.th.jpg

Share this post


Link to post
Share on other sites

Sweet gj man! I dont suppose youve tried it with trees have you? As ide like to get the collisions working.

Share this post


Link to post
Share on other sites
  (hedcrusha @ Nov. 10 2007,16:53) said:
Sweet gj man! I dont suppose youve tried it with trees have you? As ide like to get the collisions working.

no I didn't try with trees.. but i got some collision problems with rocks I placed randomly with this method.. .:(

Share this post


Link to post
Share on other sites
  (hedcrusha @ Nov. 10 2007,17:30) said:
Aye same here! Got the same prob! Maybe its just an engine limitation!

dunno... but I'll try with custom models! wink_o.gif

Share this post


Link to post
Share on other sites

Don't be too surprised if clutter can't have a collision geometry, it is only meant to be eye candy, not normal objects. Also think how much trouble it would cause the AI if they saw it as a solid object! They also have no shadows.

Share this post


Link to post
Share on other sites

well, fo shadow, (i.e. grass model) I simply added a flag called Alphainstancing to the material RVMAT that should have the shadow not to be casted on terrain...

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×