Author Topic: Adding to rural grass  (Read 804 times)

Legacy_Tonden_Ockay

  • Hero Member
  • *****
  • Posts: 891
  • Karma: +0/-0
Adding to rural grass
« on: February 16, 2016, 12:01:49 pm »


               

Hey all


 


Question lets say I add/mix in some medieval grass with the standard rural grass. How would I go about doing this? See I was thinking of using grass and some wild flowers or weeds mixed in with different colors.


 


 


Edit: Any way I pulled this 512x512 texture from a hak


 


jq5g8z.jpg


 


 


Since there are 4 different gasses on this texture does that mean the hak is randomly using all 4 kinds throughout the rural tileset?


 


If so could I add more? If I did how would/should I go about doing it? 


 


If so then I could use layering and add in say wild flowers to one of the 4 and say a weed to another one and so on right?



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Adding to rural grass
« Reply #1 on: February 16, 2016, 02:28:30 pm »


               

I think grass is pulled from one of four slots, as if the engine is reading a TXI file dividing the image into 4 sprites. I don't think that can be changed by providing a new TXI, as it's hardcoded.


 


Similar discussion was had by Jedijax and Bannor Bloodfist previously: http://forum.bioware...9-better-grass/


 


You can set the new grass file in the .SET file if you look up what the replacement line is, but as BB said, you need a good one or you are wasting your time. It also won't make clumps of grass that match one sprite. Instead, you'll get (depending on density setting) various sprites from that decal file next to each other, each cloned over a plane perpendicular to the x-y plane.


 


The better thing to do might be to get a better than OC grass texture, like the one you have above, and also make some secondary clumps or decals that represent your other types. They can be programatically placed on area-startup via scripting, but you may run into problems with the z-axis if you don't do it right. Actually, I think it's easier not to mess it up than it is to mess up. Placeables + new base texture is the way to go IMO.



               
               

               
            

Legacy_Tonden_Ockay

  • Hero Member
  • *****
  • Posts: 891
  • Karma: +0/-0
Adding to rural grass
« Reply #2 on: February 16, 2016, 04:39:48 pm »


               

I was going to try coping and pasting parts of this texture


 


 


vox0kz.jpg


 


 


 


but the green background is screwing it up. I have tried to do a quick cut out but I keep losing to much detail. 


               
               

               
            

Legacy_Tonden_Ockay

  • Hero Member
  • *****
  • Posts: 891
  • Karma: +0/-0
Adding to rural grass
« Reply #3 on: February 16, 2016, 05:11:49 pm »


               

the grass textures like these cant have a background right? 



               
               

               
            

Legacy_T0r0

  • Sr. Member
  • ****
  • Posts: 380
  • Karma: +0/-0
Adding to rural grass
« Reply #4 on: February 16, 2016, 05:24:11 pm »


               

Ummm they all have a background. It's there for edge bleeding ( not sure that's the right terminology) . The white background above is probably representing the alpha layer if you got that from a hak if you're using some sort of viewer. 


  Your alpha layer will determine what you see.


 


Also the only portion that you can probably use there is that top left.  The right will get chopped in half . The flowers would be good for splotches. 


*Been awhile since I messed with the grass*


 


That being said, try it !! sometimes the unintended effect is not a bad thing.



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Adding to rural grass
« Reply #5 on: February 16, 2016, 05:25:06 pm »


               

You need to move them over with the mask in tact (the alpha layer). And you need to make sure they fit the box. To do that, you might need to expand the canvas size of the original, but still keep it square and a power of 2. If you use that right side one, you will have a LOT of wasted space on your others, unless you scale it down, which I wouldn't do. Also remember that they'll be tinted when finished, by the colors set in the SET file for grass color. This means that if you don't use something like 50% gray for your tinting, they'll be either darkened or lightened and tinted with color.


So the image you are cutting from is 512 high. To keep the quality, you'll need a target canvas of 1024x1024 to keep the ratio aspect correct. It might be possible to use a rectangle of 512x1024, and see what it does, but I think your images will be squished. Anyway, the 1024x1024 will have a LOT of wasted space, and you'll see that if you don't pad it to fill the equal width to height, you'll have sparse grass at a high density rating. If you want more density, it makes more planes, which instantly cuts your FPS.


 


Oz0qE52.png


 


OR


 


YUX370x.png


 


Maybe what you want is to liven up the grass a bit by pre-clumping some grass types in each square of your sprite map. You could put the 512 height one in the middle of the square, and put one smaller thing to the left and right of it. Maybe like another grass clump on one side, and the ironweed on the other side. In another frame, use some other three, or two from here, and one from another. That way when they get put near each other with the density setting, they cut through each other and mix more of the types. Try it out. See what you get and if that's what you really want to do (go HQ), or if you want to stick with lower quality auto-grass and then make a really nice kit of grass placeables.


Personally, I think that image you have is made for two placeables. One made from a two-sided billboard (4 tri) using the tall side, perpendicular to the short one from the top left (4 more tri). Then the right side made into a separate billboard pair (4 tri), with a plane of the white or yellow spray on top, maybe slightly curved (8 tri polygon square with corners bent down). If you want to be really creative, you put two of the spray images on top of each other and offset by a bit so you have flowers that have two colors, where view angle makes them look more realistic.



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Adding to rural grass
« Reply #6 on: February 16, 2016, 05:33:32 pm »


               

First things first. Step back and learn what alpha channels are and how to move them in tact with the RGB layers. If you don't do that, or if you resize with the alpha layer missing, you are just shooting yourself in the foot.



               
               

               
            

Legacy_Tonden_Ockay

  • Hero Member
  • *****
  • Posts: 891
  • Karma: +0/-0
Adding to rural grass
« Reply #7 on: February 16, 2016, 06:13:05 pm »


               

I have been uploading the textures into paint.net. Some textures for walls and floor are all solid. However the ones for grass has no solid background to them, the have a gay and white checkerboard look.


 


Example:


 


2rxw5ed.jpg


 


I tried using it with the green background and it showed up in the game but with the background. So the background needs cut out so it just has the gray and white checkerboard background.


               
               

               
            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
Adding to rural grass
« Reply #8 on: February 17, 2016, 12:48:17 am »


               

The gray and white is the alpha representation.  Erasing it would work best with a color to alpha type change, but you would need to get the green background adjusted to a color that isn't in the plants for that to work.  Pure white, or a bright red, maybe.  Otherwise any similar green tones in the plants might be alpha'd out as well.


  A color fill over the green might work to initiate that changeover.  Some programs might even allow for a direct alpha filling.



               
               

               
            

Legacy_Tonden_Ockay

  • Hero Member
  • *****
  • Posts: 891
  • Karma: +0/-0
Adding to rural grass
« Reply #9 on: February 17, 2016, 01:50:54 am »


               

OK got it. I didn't know that the gray and white was called alpha. I just called it no background '<img'>


 


Thanks for the heads up Failed.Bard



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Adding to rural grass
« Reply #10 on: February 17, 2016, 03:17:08 am »


               

if you know where that green backed image comes from, maybe you can find a mask image (black and white) that you can use to make an alpha channel, or maybe find a version from the same location with an alpha channel already in it.



               
               

               
            

Legacy_Tchos

  • Sr. Member
  • ****
  • Posts: 454
  • Karma: +0/-0
Adding to rural grass
« Reply #11 on: February 17, 2016, 05:23:37 am »


               


OK got it. I didn't know that the gray and white was called alpha. I just called it no background




 


There are very difficult to explain concepts at work here.  It's not that the grey and white are called alpha, it's just that the checkerboard pattern is a convention in certain image editors that represents transparency.  Alpha channels are called alpha because they're tacked onto a normally 3-channel RGB image, where the channels represent 256 levels of red, green, and blue.  The 4th channel is not any of the visible colours, and so it is an alpha.  It can be pure black and white, or 256 levels of grey, and can be used for many purposes, but in this case it's being used to determine which areas of the image are transparent and which are not.


 


In some other programs, you would see the RGB image with its solid background, and would have to click on the alpha channel to see what's there.  The program you're using is representing the alpha channel as a transparency behind the RGB image, which is what you intend to use it for, but you're not seeing the actual alpha channel.