|
Post by Bradley on May 13, 2015 13:51:00 GMT
I was wondering if creating custom markers was possible. I see that there are around 40 markers (mostly roads) but I would like to create my own. How would I go about adding my own marker textures? For some reason, the Friendly marker is showing up orange, not green? I also noticed that the ClearAllMarkers seems to, in addition to clearing markers, replace every marker with a green circle texture. Is this supposed to happen?
|
|
|
Post by khash on May 13, 2015 16:29:28 GMT
Hi! yes it seems funny that it places those green markers instead. All markers are jsut templates. It is expected that users will develop their own to support their game design. At first I have placed only full color hexes (green, blue, red...) but A'vee shouted at me that its so "no pro" and she made those funny shapes to place on the world including roads. It looks much better but its just a template to help you get started. All hexes in this system is just about setting certain "type" value for texture pixel color which stores this information for shader, you can use it anyway you want and I encourage you to make your own markers overriding everything including roads! Do everything you feel right to make your game great, and give me a shout when you have some nice screenshots from it
|
|
|
Post by Bradley on May 13, 2015 17:31:35 GMT
Okay, so I see that when you SetMarkerType it changes a couple of pixels on the 2dTexture (hexData.SetPixel(x, y, c) and hexData.SetPixel(x + 1, y, rotations)). Then the dirty is set and the update SetMarkerMaterials. I have a couple more specific questions:
-Where is the information for a specific shader (e.g. the road, question mark, etc) saved? Like, is it an image that I could open up in Photoshop and edit? -How would I go about adding a new marker texture? Do I put a 2D texture or image in a specific folder and call it? I guess I don't quite understand how the marker gets put on top..
I apologize for my ignorance--I got this package a couple days ago and am quite new to doing more than dragging and dropping textures and the like.
Thank you.
|
|
|
Post by khash on May 13, 2015 18:43:48 GMT
There is terrian shader which draws terrain and is able to identify position of the markers using the texture you noticed getting changed if its "dirty". It simply converts data from this texture to pixel position of the marker in the world and draws its pixels on the terrain. Actual markers are stored in single atlas texture which you can easily modify in photoshop.
There are as well easy ways to save texture with data we produce at runtime. Check how its done in SaveImage class and simply use it on the texture which is fed to the terrain shader. you can do anything with it or simply store and then load it and override data to restore your markers. Note that changing marker data texture is very hard in photoshop as its very much compressed information which stores different details in different colors and pixels with precision you cant mess up if you want to achieve sensible results but there is nothing stopping you from painting road and then saving its texture to drive for later usage ;D
|
|
|
Post by Bradley on May 13, 2015 19:36:35 GMT
Awesome! I look more into it. Thanks so much for your quick and helpful feedback!
|
|
|
Post by bradley on May 13, 2015 19:39:59 GMT
I just found the HexSelectors file so I think I will just try to add/remove/edit the markers within that. I'll post some screenshots of my custom markers when they are done!
|
|
|
Post by khash on May 13, 2015 19:42:10 GMT
Cool
|
|
|
Post by swatter on Jun 2, 2015 5:49:45 GMT
The reason you are getting the green dots everywhere is because the "None" value in the MarkerType enum is set to zero and the first texture on the default marker atlas is the green dot. The "None" value needs to be set to a blank slot in the atlas.
|
|
|
Post by khash on Jun 2, 2015 8:19:52 GMT
True true
|
|
|
Post by Tasardur on Mar 22, 2016 14:29:39 GMT
I am trying to get rid off this green dots, setting MarkerType enum None to diffrent values and nothing helps. Where can i find default marker atlas? Sorry i am new to unity.
|
|
|
Post by swatter on Mar 22, 2016 15:36:28 GMT
Its ok to be new to Unity, we all start there.
You need to find the marker atlas (good time to learn how to navigate through Unity). The first "slot" on the atlas should be blank, but it has a green dot. That is why there are green dots everywhere, because the first slot was meant to be default blank. Just remove the dot in your favorite paint program and problem solved.
|
|