mapbox-unity-sdk icon indicating copy to clipboard operation
mapbox-unity-sdk copied to clipboard

Water

Open Lnaydun opened this issue 6 years ago • 16 comments

Water isn't displaying until i turn it into lines then a polygon :/ nothing loads on start or preview until those changes are made, tried almost anything I can think of but it just isn't displaying it until I change the values. Not too sure what to do and well no use not having water lol.

Lnaydun avatar Apr 11 '20 22:04 Lnaydun

I am currently having the same issue as well.

gangstageek avatar Apr 11 '20 22:04 gangstageek

I am currently having the same issue as well.

Inside the Vector Example it displays. I managed to copy the settings into my scene map and it worked for me, just got clipping as an issue, BUT this issue is still an issue because we shouldn't have to use other examples to get it working lol it should just work when we declare it inside the map features. Looking at the project, tons of it is corrupt and either makes unity crash or lags into 3fps. I've got a fairly decent set up too for my PC so it isn't my PC that is the issue. Hopefully they reply soon

Lnaydun avatar Apr 13 '20 08:04 Lnaydun

Hey @Lnaydun, @gangstageek I'm afraid I'll need more info about this. I tried it myself, using settings below and it worked as expected. I don't have a guess what's wrong at your side but maybe the buildings with unique ids checkbox is checked? (admittedly it's not a very intuitive setting)? Unity_2020-04-13_16-42-40

brnkhy avatar Apr 13 '20 13:04 brnkhy

Yes that was the issue, thanks :)

Lnaydun avatar Apr 14 '20 14:04 Lnaydun

It fixed my lag issue too so god knows what it was doing and the curruption issues we're to do with AR so i removed them all and it seems fine although I do have clipping. any suggestions @brnkhy

Lnaydun avatar Apr 14 '20 14:04 Lnaydun

@Lnaydun umm what do you mean by clipping? I'll need more info on that :( maybe a screenshot or something? incase you mean z-fighting (flickering) with tile plane, you can push it upwards using extrusion type and a fixed number.

brnkhy avatar Apr 14 '20 22:04 brnkhy

@brnkhy so basically when I make roads on my map layers, if I attach the 'road' texture some are clipping over the top of others and it doesn't wrap around it properly, I done as you suggested but it looks ugly lol so an example would be Road A is going Right, then we have road be coming upwards, when it over laps it doesn't round the corner off. It will display the texture going straight up and then across if that makes any sense? I can post a screenshot if you want but think i covered it above haha.

Lnaydun avatar Apr 15 '20 12:04 Lnaydun

image

This is what I mean, like I don't mind fully as much as when I overlay a seamless texture and alter it, it seems to blend together quite well but I don't wanna have to ghetto fix something incase it causes more issues later, I'm already having some issues with the Buffer Settings not loading the texture when it loads a new area... lol I'm starting to think im either not using the SDK properly or it's actually broke on side because I've looked at loads online about it and it isn't fixing my issues and honestly diving into the SDK core isn't something I wanna do. I wanna use its resources not recode it lol I already have my core game design and thought adding mapbox would be easy as it says on all the tutorials but at this point it's giving me a massive headache. I'm starting to think against using it.

Lnaydun avatar Apr 15 '20 12:04 Lnaydun

@Lnaydun There's no easy fix for this. If you want non-intersecting roads, you will need to either style the map in Studio and accept the raster image or write an intersection solver to generate a nice-looking mesh for every case that roads meet.

On a side note, how did you get that interesting blended brown/green look on your terrain? Or is that just the lighting?

heath3n avatar Apr 22 '20 11:04 heath3n

@heath3n Made it inside Sketchbook using the Gradient tool, its the underlayer, they is about 4 more layer thats go on top but the road issues has been slowing progress down, so I decided to just use a seamless splatter texture. I have a few ideas, so I'll see what I can do inside the studio to make it less broken inside unity ha

Lnaydun avatar Apr 22 '20 13:04 Lnaydun

image

A quick follow up after the following was suggested:

  • buildings with unique ids for water not displaying switching off
  • intersection solver to generate a nice-looking mesh for roads

Problem solved, not sure how you close the issue.

Lnaydun avatar Apr 26 '20 15:04 Lnaydun

@Lnaydun Hey

how did you manage to set up this intersection solver?

Thank you.

cha-hin avatar Apr 26 '20 16:04 cha-hin

@cha-hin I made a script which checks if any vertices are inside any of the road pieces, and if they is it takes away the ones inside, then snaps the closest ones outside it to the nearest edge, with some offset input i managed to make it look like the above, then just applied a seamless texture onto the road mesh with an outline shader.

Lnaydun avatar Apr 26 '20 21:04 Lnaydun

Oh what a nice result! Thank you for your explanation @Lnaydun.

Would it work with the road seamless pattern you had set in the first place though?

Thanks.

cha-hin avatar Apr 26 '20 22:04 cha-hin

@cha-hin It would work yeah but on corners where it turns they might look odd it did for me anyway so thats why I just made them have a seamless texture and then added an outline colour

Lnaydun avatar Apr 27 '20 09:04 Lnaydun

@Lnaydun those roads looks awesome! Are you doing this as a post processing (after all roads are created) or as a part of a custom mesh modifier? Is the performance good? I really love the result!

closing this issue but I believe it doesn't prevent posting so we can keep talking

brnkhy avatar Apr 27 '20 14:04 brnkhy