Jump to content
Sign in to follow this  
commander1985

Problem with Custom Texture

Recommended Posts

Hey folks its me again :)

And again i have some troubles, this time with custom textures :/

I used Betons Ground Texture Tutorial to create my very first custom texture.

So i made a custom Concrete Texture to put it under my roads and the main Airfield. But somehow it replaces my textures for the grass too and i have absolutly no idea why it does!

I did this things in my files:

Added this to config.cpp:

class CMRbeton : Default {

access = ReadOnly;

files = "cmrbeton_*";

rough = 0.01;

dust = 0.01;

soundEnviron = "concrete_ext";

character = "Empty";

soundHit = "concrete";

Copied a Rvmat and changed its pathes like this:

ambient[]={0.89999998,0.89999998,0.89999998,1};

diffuse[]={0.89999998,0.89999998,0.89999998,1};

forcedDiffuse[]={0.02,0.02,0.02,1};

emmisive[]={0,0,0,0};

specular[]={0,0,0,0};

specularPower=1;

PixelShaderID="NormalMapDiffuse";

VertexShaderID="NormalMapDiffuseAlpha";

class Stage1

{

texture="cmr\cmr_cicada\data\cmrbeton_detail_nohq.paa";

uvSource="tex";

class uvTransform

{

aside[]={10,0,0};

up[]={0,10,0};

dir[]={0,0,10};

pos[]={0,0,0};

};

};

class Stage2

{

texture="cmr\cmr_cicada\data\cmrbeton_detail_co.paa";

uvSource="tex";

class uvTransform

{

aside[]={10,0,0};

up[]={0,10,0};

dir[]={0,0,10};

pos[]={0,0,0};

};

};

And of course i put it in my my layers config:

class cmrbeton

{

texture = "cmr\cmr_cicada\data\cmrbeton_mco.paa";

material="cmr\cmr_cicada\data\cmrbeton.rvmat";

};

};

class Legend

{

picture="cmr\cmr_cicada\source\mapLegend.png";

class Colors

{

/// color names should correspond to surface layer names

cmmpisek[]={{255,255,0}};

cmmtrava1[]={{0,255,0}};

cmmmesto[]={{0,0,255}};

cmmhlina[]={{99,55,0}};

cmrbeton[]={{0,116,255}};

}

};

My mask_lco is using the right color for it. Double checked that.

Anybody has an idea what i made wrong? Tell me if you need pictures.

Please help :)

Share this post


Link to post
Share on other sites
cmmmesto[]={{0,0,255}};

cmmhlina[]={{99,55,0}};

cmrbeton[]={{0,116,255}};

};

};

There's a ";" missing down at the bottom of this bit in the Layers.cfg section (in red above)... wonder if that could could be causing hassles??

B

Share this post


Link to post
Share on other sites

Hmm, haven't noted that so far. I give it a try :)

Edit: Nope it was not the missing ";" ...

Might it be possible that i get that bug because i use more than 4 textures on the map??

Edited by Commander1985

Share this post


Link to post
Share on other sites
class Stage2

{

texture="cmr\cmr_cicada\data\cmrbeton_detail_co.pa a";

Not sure if this is your issue, but there is a space in .paa for your texture.

Share this post


Link to post
Share on other sites

yeah i have seen that gnome thanks :)

but somehow the space in the .paa only exists when i post it here in the board. Its not in my actual file.

Share this post


Link to post
Share on other sites

Thats just post formatting - the "code" tags stop that happening if you need to post big blocks of code accurately...

More than 4 textures in a segment WILL cause wierdnesses... often a texture will appear, but it'll look faded or blurry, or like one texture overlaid on another and neither displaying properly... could you post a quick pic of the effect you're getting? - is it definitely proper concrete texture - displaying correctly - just replacing where grass should be? or is it a sort of semi concrete, semi grass wierd texture? - which could be the more than 4 colours effect...

B

Share this post


Link to post
Share on other sites

arma2oa2010111620125240.th.jpg

There it is. I hope this screenshot is good enough. The Beton Texture should only be under the Runway and the Roads on my Island, but it is overwriting the grass on the whole Island and not just next to the Runway. For me it looks like the grasstexture is not being loaded anywhere, instead i get the custom one. So i guess its not about having more then 4 textures per segment because if it would be so i only should get this on some areas right?

Share this post


Link to post
Share on other sites

I see what you mean from the pic... to the right of the runway... the grey shading to yellow is tones on the sat_layer presumably... the "concrete" texture which should be on the grey edge only carries on right across the yellow - where presumably it should be some sort of recognisable grass texture...

Hmmm...

I can't see anything immediately obvious with the config...

since adding this concrete texture brings you to 5 colours, and also since if its a "road underlay" texture it's gonna be occurring all over your map - to doublecheck it isn't the 4 colour limit problem you'd need to find out your segment size (tools/project parameters/"calculator" button) - grid off your mask to that size (bearing in mind overlap), and look for an area that definitely only has 4 colours in it, no roads or concrete at all - then go to that area in Visitor and see if grass is showing correctly...

Other than that, and maybe a reimport of Mask 'n Sat - (just in case there was a glitch last time), I'm starting to run out of ideas...

B

Share this post


Link to post
Share on other sites

Okay i check that later this evening. I already reimported mask and sat textures (cleared the layers folder before that). That did not solved it.

Btw. can someone tell me how to create a grid in photoshop? ^^

---------- Post added at 11:17 PM ---------- Previous post was at 10:28 PM ----------

Okay i made this grid stuff in photoshop, no more than 4 textures per segment. Anymore ideas?

Share this post


Link to post
Share on other sites

... grasping at straws now... at a wild guess, the effect in your pic could come about if your "grass" was using your "concrete" nohq and mco textures... maybe...

You say you copied and repathed an RVMAT? was it the grass one you copied? Did you accidentally maybe repath it then copy it or something?

Doublecheck the grass rvmat to make sure it's OK... wild guess but worth a check I suppose...

B

Share this post


Link to post
Share on other sites

Double checked all .Rvmats they are all right. Might be that i copied the grass one. But it was suggested to do so in the tutorial and since i repathed all it shouldnt happen i think :/

However it did not use that material editor to edit the rvmats. Just use the good old notepad but i dont think that could make a difference... i mean its just about some paths right?

Share this post


Link to post
Share on other sites

Hey folks instead of opening a new thread i write here since its corresponding somehow.

Because those Custom texture thingy seems not to work for me i removed the color from my mask, also deleted the files in my data folder and everything about it in my layers.cfg.

Now i wanted to reimport my satmask etc. and i noted something very .. erm lets call it bad. You may have noted that i had my beton all over the island instead of where i wanted it. Now i have the same with my woods texture! I dont know why this happens now. Also loaded backups of my mask files (from before customtexture versions). and tried to reimport multiple times now, always with the same result! My Mask is totaly messed up in someway. And i only use 4 colors over the whole island. No idea why the backup wont work :/ I also noticed that when i open the mask files in the layers folder it only has 2 colors! I really could cry guys... Any idea what the heck is causing this?!?

Share this post


Link to post
Share on other sites

*BUMP*

Im giving it up! After a lot of try and fail i ask for everybodys help !

I have made new masks, projects, tried different paint tools etc. but i always end up with the same stupid error!

So instead of making a new Thread i ask here:

Could somebody please look into my Project and do the Mask for me?!? Well try to fix the Problem , import the mask or whatever! I will upload all stuff wherever you like but please somebody help. This project took months to do as you could easily imagine and would be a shame to collect dust somewhere on my HD...

Looking forward for Answer.

Share this post


Link to post
Share on other sites

Hey Commander, sorry to hear you're still running into a wall with this. I'd be happy to see if I can help you out. If you have the time to upload things somewhere, I'll make some time to look at them. Unfortunately nothing really jumps out at me while reading, but I'm sure we can get it sorted.

.

Share this post


Link to post
Share on other sites

I have already encountered such effect on my own maps.

Having some concrete texture "in lieu" of forest ground.

I have done 2 moves

-Erase BIN_TEMP content by hand, the "clear temp folder" is not really working on my side.

- "Posterise" [that's the word used in my GIMP French version] the _Mask picture in order to have only 4 or 5 colours without any "color shading".

I had just this on the Vostok map I am working on ATM, it was a _Mask green brownish tint [76,100,0] interpreted as blue in Buldozer :confused:

Having reduced the number of colours to 5, all is OK now.

Share this post


Link to post
Share on other sites

Old Bear i think that you are right.

I started another project some days ago and had the same issue...

Looks like doing a mask with photoshop and then painting the color in is not as easy as it seems. I noted that there are a lot of other colors appearing Oo.

I tried it the easy way with "Indizierte Farben" (dont know the english word here) to reduce colors to 4. Since "Indizierte Farben" is not RGB i switched it back to it. I still had just the 4 Colors but the Mask didnt work then.

I have to manually paint it and stay in RGB Code :/

Will be a lot of work to get that mask file working again by painting with hand.

Maybe i try Gimp out for that. On the opposite i started to make a "Mask-Climate for L3DT" Maybe that will speed thinks up a little :)

Share this post


Link to post
Share on other sites

Okay forget my last post,

the answer to error is very easy! (and the cause kinda stupid)

The Maplegend.png was wrong!!!! (wrong filesize)

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  

×