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.


Messages - thecosmicboy

Pages: [1]
1
Support / Re: Expanding TileMap's Alt to copy from all layers
« on: June 02, 2016, 04:17:05 pm »
Has this feature been added? This would really streamline editing on a project i'm currently working on

2
Support / Tilemap reverts to tiles I painted previously in Playmode.
« on: March 11, 2016, 12:30:01 pm »
Having this problem yesterday and today, every time I press play in playmode the tilemap reverts to a previous set up I had a couple of days ago. As soon as I stop it, it goes back to the latest layout I had done in the editor. This does not change if I re-commit the tilemap and only happens in playmode as stated. I checked tileMapData file and the tileMapEditor file and they are both dated 2 days ago. I am only using these files in one scene on one new tilemap so no other scenes or tilemaps could be interfering with these files.

Any cause for this or solution?

3
Support / Re: Proper steps for bump-map lighting on a tilemap?
« on: September 16, 2015, 03:58:50 pm »
Any chance this could be elaborated on?

To calculate the normals in the tk2dSpriteCollectionBuilder.cs
it contains these lines after the normals are recalculated to calculate the tangents.
Quote
                            tmpMesh.RecalculateNormals();
               
               coll.spriteDefinitions.normals = tmpMesh.normals;

               if (gen.normalGenerationMode == tk2dSpriteCollection.NormalGenerationMode.NormalsAndTangents)
               {
                  Vector4[] tangents = new Vector4[tmpMesh.normals.Length];
                  for (int t = 0; t < tangents.Length; ++t)
                     tangents[t] = new Vector4(1, 0, 0, -1);
                  coll.spriteDefinitions.tangents = tangents;
               }


I have found "chunk.mesh.RecalculateNormals();" inside the tile tk2dTileMapMeshBuilder.cs
but I am unsure of how to apply the simple tangent code above to the TileMap.

Any help would be greatly appreciated :)

Edit : I have solved the problem by using the attached script called "TangentSolver.cs"
and implementing this line of code "TangentSolver.Solve(chunk.mesh);"
inside the tile tk2dTileMapMeshBuilder.cs script just after the normals are recalculated.

Like so

Quote
chunk.mesh.RecalculateNormals();
         TangentSolver.Solve(chunk.mesh);

Works like a charm,
Maybe you could implement this code into the next update.

4
Support / Re: Tangents
« on: May 26, 2015, 07:16:04 pm »
Never mind, its in tk2dSpriteCollectionBuilder.cs

line 1939:
tangents[t] = new Vector4(1, 0, 0, 1);

Changed it to this :
tangents[t] = new Vector4(1, 0, 0, -1);

Worked like a charm :)

5
Support / Re: Tangents
« on: May 26, 2015, 06:44:58 pm »
Any updates on this? Or a location I can find the code to edit myself?

The issue can be corrected by inverting normal maps in the Y direction,
but I am also using height maps, and this cannot be rectified in the heightmap image,
the tangent on the y-axis needs to be flipped otherwise it will not display correctly.

Any help with this would be great as I really need it working for this project.

Thanks :)

Pages: [1]