Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Transparency in trees/bushes models

  1. #1
    Gunnery Sergeant
    Join Date
    Sep 27 2010
    Location
    Santiago de Chile
    Posts
    454

    Transparency in trees/bushes models

    Hello everyone,

    How can I get rid of these borders? I'm using a *_ca.paa file and I have changed size of alpha mask with no success...



    EDIT: Sorry, I did post in A1 forums befor by mistake... I guess that A2 has introduced some improvements regarding precisely trees/bushes models



  2. #2
    what is the rvmat you are using , this also affect it , look on BIS tree and you will find it

    also sometimes Bulldozer may not reflect whats in game of course.

    If you really struggle MikeBart is the man or Berghoff the tree man , look them up i think Mikebart recently posted here about tree

  3. #3
    never judge transparency in Buldozer, always in full game.
    IceBreakr, C/O [SBP] - Slovenian Black Panthers (www.vojak.si)

  4. #4
    Gunnery Sergeant
    Join Date
    Sep 27 2010
    Location
    Santiago de Chile
    Posts
    454
    Author of the Thread
    This still looks like sh*t



    And those files inside plants2 folder are truly scary... mc, non and stuff... anyways, I can't read RVMATs as plain text since they are binarized...

    S.O.S.

    EDIT: I am not using any RVMAT... is there any I should be using for these purposes? probably, but which one? I do not know how to do an *_mc.paa or an *_non.paa file ? Will I have to buy LINDA ????
    Last edited by Robster; Apr 6 2012 at 01:43.

  5. #5
    RVMATs files can be unbined using eliteness.
    Have a look over BIS trees.
    You don't have to buy LINDA
    I would say the issue is still caused by a very tight Alpha chnl

    Spoiler:

  6. #6
    You dont need to Unbinarise to test it

    simply point in o2 to it and it will be ok to see if its good , not sure if improvements are made between A2 and OA but iwould try oa or Plants_e first , maybe something like b_amygdalusn1s_ep1_1.rvmat and dont forget also Shadow have rvmat too as you will see in there.

    I also rememebr there is a free example of tree from BIS on there website somewhere google will find it probably

  7. #7
    Gunnery Sergeant
    Join Date
    Oct 9 2008
    Location
    Melbourne, Australia
    Posts
    437
    hey Robster, theres a few different ways of doing it.

    Nozwrite
    If you want a blended alpha like the tussock in mb_veg, you need to sort alpha in O2 (Faces/Sort Alpha), and use the "nozwrite" render flag in the .rvmat, that should fix those edges. Its not really meant for vegetation though, you get a few errors sometimes and they draw in front of fog, but you can get away with it on a smaller terrain, cheep tricks but with costs.

    Code:
    mainLight="None";
    fogMode="Alpha";
    ambient[]={1.0,1.0,1.0,1.000000};
    diffuse[] = {1.0,1.0,1.0,1.0};
    forcedDiffuse[] = {0.0,0.0,0.0,1.0};
    emmisive[] = {0.0,0.0,0.0,1.0};
    specular[] = {0.0000,0.0000,0.0000,1.0};
    specularPower = 1.0;
    renderFlags[]= {"NoZWrite"};
    PixelShaderID="Normal";
    VertexShaderID="Basic";
    treeAdv
    I dont think you have to use an _mca or a second UVW channel for treeAdv, you should be able to give that stage a colour value instead of a bitmap and i think the shader would still work.

    Code:
    ambient[]={0.5,0.5,0.5,1};
    diffuse[]={0.38039216,0.28235295,0.62352943,1};
    forcedDiffuse[]={1,1,1,1};
    emmisive[]={0,0,0,1};
    specular[]={0.1,0.1,0.1,1};
    specularPower=126;
    PixelShaderID="TreeAdv";
    VertexShaderID="TreeAdv";
    class Stage1
    {
    	texture="mikebart\mb_veg\mb_trees\data\mb_t_ulmus_foliage_NO.tga";
    	uvSource="tex";
    	class uvTransform
    	{
    		aside[]={1,0,0};
    		up[]={0,1,0};
    		dir[]={0,0,0};
    		pos[]={0,0,0};
    	};
    };
    class Stage2
    {
    	texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,MCA)";	     //replaced "mikebart\mb_veg\mb_trees\data\mb_t_ulmus_forest_MCA.tga" with a colour value, adjust to suit
    	uvSource="tex";                                                     //changed "tex1" to "tex" 
    	class uvTransform
    	{
    		aside[]={1,0,0};
    		up[]={0,1,0};
    		dir[]={0,0,0};
    		pos[]={0,0,0};
    	};
    };
    the ambient value in treeAdv controls how much the tree shades overall, its hard to explain but to get an understanding of that, see what happens when you decrease ambient to 0.1,0.1,0.1,1.0 and then increase it to something like 4.0,4.0,4.0,1.0
    but without the lightmap (_MCA bitmap) on the second UV, you wont have any baked in ambient occlusion or colour variation.

    _can stands for colour alpha noise, If you have a look at the _can textures used for foliage in A2OA, you'l notice the noise on the white parts of the alpha channel, this is used in game when the alpha polygon becomes adjacent to the players view, that polygon fades kind of noisely, im sure you know what I mean from looking at trees in game.

    above is a 2048 bitmap of the right sort of noise you need for the _can texture, just multiply this over your alpha channel.

    _mca is basically a lightmap, not sure what it stands for but thats pretty much what it does, the image below shows an _mca mapped to a second UVW channel, unlike the _ca or _can's every UV is mapped to be unique (no overlap of UV's) the _mca below also shows details from the _can from the first UVW channel, hopefully you can get a better idea of whats going on from this:


    Grass
    If you're intending to use that plant just for clutter, just use the grass shader,

    Code:
    ambient[] = {0.3,0.3,0.3,1.0};
    diffuse[] = {0.1,0.1,0.1,1.0};
    forcedDiffuse[] = {0.0,0.0,0.0,1.0};
    emmisive[] = {0.0,0.0,0.0,1.0};
    specular[] = {0.0000,0.0000,0.0000,1.0};
    specularPower = 1.0;
    PixelShaderID="Grass";
    VertexShaderID="Basic";
    mainLight="Sun";
    fogMode="Fog";
    renderFlags[] = {"AlphaTest32"};
    Last edited by mikebart; Apr 18 2012 at 08:46.

  8. #8
    Gunnery Sergeant
    Join Date
    Sep 27 2010
    Location
    Santiago de Chile
    Posts
    454
    Author of the Thread
    Many thanks for your help, Mr. Bartlett!

    I will certainly put all this into practice to see how far can I get ...

    I'll keep posting here any further advances on the matter, to gather more info about making trees/bushes models...
    Last edited by Robster; May 31 2012 at 02:36. Reason: spelling

  9. #9
    Gunnery Sergeant
    Join Date
    Sep 27 2010
    Location
    Santiago de Chile
    Posts
    454
    Author of the Thread
    Good night mates!

    I made some simple tests and this is what I've gotten so far...

    Here we have that annoying "invisible effect" border in a maize custom model originally made by DMC ...



    Here we made a simple change in the rvmat on the same model:



    As you may see those ugly boundaries are gone... this is not related to model shape or an oversized alpha mask... this is related to rvmat definition...

    ok, here is the trick... any comments are welcome, cheers!

    Code:
    ambient[] = {0.5, 0.5, 0.5, 1.0};
    diffuse[] = {0.5, 0.5, 0.5, 1.0};
    forcedDiffuse[] = {0.5, 0.5, 0.5, 0.5};
    emmisive[] = {0.0, 0.0, 0.0, 1.0};
    specular[] = {0.0, 0.0, 0.0, 1.0};
    specularPower = 1.0;
    PixelShaderID = "NormalMapThrough";
    VertexShaderID = "NormalMapSpecularThroughNoFade";
    
    class Stage1 {
    	texture = "ca\plants2\tree\blank_non.paa"; // this file comes from arma2, so you have it already!
    	uvSource = "tex";
    	
    	class uvTransform {
    		aside[] = {1.0, 0.0, 0.0};
    		up[] = {0.0, 1.0, 0.0};
    		dir[] = {0.0, 0.0, 0.0};
    		pos[] = {0.0, 0.0, 0.0};
    	};
    };
    
    class Stage2 {
    	texture = "#(ai,32,32,1)treeCrown(0.3)";
    	uvSource = "none";
    };
    
    class Stage3 {
    	texture = "#(ai,32,32,1)treeCrownAmb(0.3)";
    	uvSource = "none";
    };
    EDIT: I know picture quality is not the best but I do not want another infraction for images > 100kb
    Last edited by Robster; May 31 2012 at 02:09.

  10. #10
    Gunnery Sergeant
    Join Date
    Oct 9 2008
    Location
    Melbourne, Australia
    Posts
    437
    hey Robster, try this out instead. Because you're using the NoFade shader you dont really need to use the ".non" bitmap for the normalmap, and should get away with just using the flat colour ".no"
    try using the TreeAdv shaders, they should give you a cleaner image (not so degraded around the edges) also I dont think the old NormalMapThrough shaders work with "AtoC"

    I didnt really test this myself, so i hope it works

    Code:
    ambient[] = {0.5, 0.5, 0.5, 1.0};
    diffuse[] = {0.5, 0.5, 0.5, 1.0};
    forcedDiffuse[] = {0.5, 0.5, 0.5, 0.5};
    emmisive[] = {0.0, 0.0, 0.0, 1.0};
    specular[] = {0.045,0.045,0.045,0.2};
    specularPower = 300;
    PixelShaderID = "TreeAdv";
    VertexShaderID = "TreeNoFade";
    
    class Stage1 {
    	texture = "#(argb,8,8,3)color(0.5,0.5,1.0,1.0,NO)"
    	
    	class uvTransform {
    		aside[] = {1.0, 0.0, 0.0};
    		up[] = {0.0, 1.0, 0.0};
    		dir[] = {0.0, 0.0, 0.0};
    		pos[] = {0.0, 0.0, 0.0};
    	};
    };
    class Stage2
    {
      texture = "#(argb,8,8,3)color(0.25,0.25,0.25,0.6,MCA)";
     uvSource = "tex";
     class uvTransform
     {
      aside[] = {1,0,0};
      up[] = {0,1,0};
      dir[] = {0,0,0};
      pos[] = {0,0,0};
     };
    };
    //};
    btw; do you know what the treecrown stages do?, I remember seeing them in Arma 1 trees but never really figured them out

Page 1 of 2 12 LastLast

Similar Threads

  1. transparency in trees/bushes models
    By Robster in forum ARMA : O2 MODELLING
    Replies: 0
    Last Post: Apr 5 2012, 22:07
  2. Nearobjects and trees + bushes
    By fabrizio_T in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 6
    Last Post: Oct 23 2009, 10:51
  3. Trees & Bushes >:(
    By Grodin in forum ARMA - TROUBLESHOOTING
    Replies: 34
    Last Post: Aug 18 2007, 00:58
  4. Bad FPS Around Trees And Bushes
    By nate77 in forum ARMA - TROUBLESHOOTING
    Replies: 12
    Last Post: May 9 2007, 12:31
  5. Create trees and bushes with camcreate?
    By kleaner2 in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 2
    Last Post: May 2 2002, 23:28

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •