- Home /
Problems making game grid for space rts. (just visible to player not highlighting grid cells)
I want to create a game grid that looks to be intersecting lines, but also has a blue color that is about 75% opaque. I first tried with a png transparent texture with intersecting lines (no corner smoothing) and that is set to 75% opaque in gimp layer properties. I applied this to a plane made in another model program. The grid has odd irregularities, and I am unsure of how to repeated this grid piece to cover level. I would assume I would use a loop and size of level and size of each grid plane mesh.
My second method suggested to me is gl.lines, but following the documentation for it but can't get a sample line to be drawn on screen. I am unsure of how to use this code or what could be wrong. I tried searching elsewhere but still no luck. With gl method, can the line be semi transparent and have a tweakable color value?
Here is my current grid:
As you can see my lines get distorted for some reason and are omitted even at right angle viewing. The texture is imported as a texture. I tried as a gui but no luck. The shader is an unlit-transparent.
Answer by Owen-Reynolds · Feb 05, 2012 at 07:54 PM
Any part of the process could be to blame. Some ocmments:
o Don't bother making it 75% transparant (in Gimp.) You can almost always select a "TintColor" in Unity, where you can adjust alpha to 196 (75%) or whatever. Setting your starting image blue lines to fully opaque gives you the maximum control over final alpha.
o Probably easier, and more tweakable, is to make the tiling in Unity, instead of the modelling program. Unity has a perfectly nice plane (10x10 units, with 121 certs -- not sure why,) or you can make your own.
Either way, you'll have a Material with the texture. Can set Tiling to whatever you like, to get the repeats on one giant plane. Lining up lots of little squares can give tiny "edge" errors.
o A trick for creating a good-looking tilable texture is to set it as your computer background screen, set to tile. Workflow is: Resave in Gimp, reload in SelectBackground (then "Don't Save changes" for your background, when done.) There's a chance the faded blue lines are you. Of course, this won't show the alpha. Could do the same thing using Unity.
Also, just checking -- you know about Offset50/50 in Gimp? Very useful to shift the corners into the center so you can fix that bright blue dot.
Your answer
Follow this Question
Related Questions
Flashing mesh grid lines problem 2 Answers
Whats the float in Vector . Distance? 2 Answers
Transparent object VS itself 1 Answer
Grid on Ship 1 Answer
Generating and altering a mesh at runtime as a grid based terrain 3 Answers