Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - windjammers

Pages: [1]
1
Support / Sprite/Atlas shader with normals?
« on: October 02, 2015, 02:03:18 pm »
I have a normal map that matches my sprite collection atlas. Is there a 2dtk-centric way to apply this normal map to my sprites?

edit: The closest I get to the results I want are as follows.

1) Shaders: Using either the Unity standard shader or one provided with Sprite Lamp (the tool I use to generate my normal maps) I get tiles that are lit properly providing I don't flip or rotate them. If I do the tile tile rotates properly, as does the normal map, but the lighting is wrong. It responds to light as though it hasn't rotated or flipped, as though lighting is rendered first.

2) Using the tilemap settings data tab I can add gameobjects to each tile that contain the correct sprite with normals. This works up to a point. There are a few major problems though. Firstly I can't see how the level is lit in the scene editor. I have to run it to see this. Secondly it doesn't work consistently, with added gameobjects frequently having the wrong rotation/scale. Finally, I don't think this is an efficient way to do things, as I have read elsewhere on the forum that 2dtk doesn't like caching gameobjects with non-uniform scale/rotation.

I've seen on the roadmap that there's some support for sprite collections with normals to be added, but I'm looking for a robust solution in the meantime that someone with my slightly wobbly game dev. skills can impliment. :)

Pages: [1]