Opacity on a dirtmap

692
2
10-25-2016 02:30 AM
KristianMortensen1
New Contributor III

Hey all

I'm having some problems when trying to add a dirtmap to a surface. I want to be able to control the opacity of the dirtmap in the CGA rule file. This is the code so far, the dirt map shows up along with the Grass texture, it is just to dominating. 

BuildingArea -->
               setupProjection(0, scope.xz, 2.25, 1.5, 1)             //ColorMap
               texture(Grass_Tex)
               projectUV(0)

               setupProjection(1, scope.xz, 2.25, 1.5, 1)             // BumpMap
               set(material.bumpmap, Grass_BumpMap)
               projectUV(0)

               setupProjection(2, scope.xz, '1, '1)                      // DirtMap
               set(material.dirtmap, Grass_Grunge)
               projectUV(2)

I have tried adding the set(material.opacity,0.5) but that makes all the materials transparent, hope one of you have the answer, and another question, I'm trying to add a bumpmap, but the bump is not visible in the scene, does any information lack in rulefile? 

Tags (3)
0 Kudos
2 Replies
CherylLau
Esri Regular Contributor

No, you cannot set an opacity value specifically for the dirtmap.  As you found out, the opacity will affect both the colormap and the dirtmap.  I'm afraid the solution would be to change your dirtmap image.  Since the colormap and dirtmap are multiplied to get the end result, I'm guessing that if you make the values closer to 1 and decrease the contrast in your dirtmap, you might get what you're looking for.

For the bumpmap, the texture layer is 1, so it should be projectUV(1).

KristianMortensen1
New Contributor III

Thanks for the answer. I will just make the dirt map transparent in the original file before importing it  

0 Kudos