Pointy Posted October 27, 2019 Share Posted October 27, 2019 I have been messing about with a map viewer (potential editor) and have run into a problem that my tiny brain can't understand. When reading the UV's for each vertex from the distant POI mesh files, 99% of them are (1, 1). So does Unity do some trickery when rebuilding the GameObjects or am I missing something? I can read the vertext/nidex data fine and render the mesh. I am also able to get the block ids and grab the info from the 'ta_opaque.xml' file, I have the block textures extracted and rebuilt into an OpenGL texture array, I just don't understand the UV's. Here's a screenshot of the main map viewer... Here's a screenshot of the POI renderer (which is currently just using the uv color) Anyone have any ideas? Link to comment Share on other sites More sharing options...
n2n1 Posted October 27, 2019 Share Posted October 27, 2019 Interesting....how do you view the distant-POI Meshes? Do you have your own utility, or something suitable for this? Maybe i don't quite understand what you mean... but, my guess (i would like to check this) - the fact that the meshed are now also consist of squares(blocks) that each have their own UV? Link to comment Share on other sites More sharing options...
Pointy Posted October 28, 2019 Author Share Posted October 28, 2019 Interesting....how do you view the distant-POI Meshes? Do you have your own utility, or something suitable for this? Maybe i don't quite understand what you mean... but, my guess (i would like to check this) - the fact that the meshed are now also consist of squares(blocks) that each have their own UV? I am reading the prefab meshes (.mesh files) directly and then displaying them using OpenGL in my own application. The mesh files are not block data but basically a list of vertex positions, uvs and indices.(I thought it would be nice that when you click on a POI in the map (first pic abaove) it showed a 3d preview (2nd pic) along with or instead on the preview image and information, in the right hand panel) I would expect the uvs to range from 0,0 (bottom left) to 1,1 (top right). I can read and display the static models fine, so I know that my drawing logic is working. Maybe it has something to do with global uvs? My 3d knowledge is limited so maybe I am just missing something too. Link to comment Share on other sites More sharing options...
n2n1 Posted October 28, 2019 Share Posted October 28, 2019 ////// The mesh files are not block data but basically a list of vertex positions, uvs and indices.///// I meant that because they are converted from blocks-their uv has a lattice structure rather than the usual one when it is based on geometry shape topology. I hope you will publish your tool someday. Unfortunately I can't understand the specific problem now. PS: You know about the blocks-imposters, which are taken into account for the construction of meshes? Link to comment Share on other sites More sharing options...
Laz Man Posted October 28, 2019 Share Posted October 28, 2019 What are you trying to accomplish? I am not familiar with uvs but perhaps the reason why they are minimal is to maintain performance. The distant POI meshes were probably not meant to be viewed up close. Link to comment Share on other sites More sharing options...
Pointy Posted October 29, 2019 Author Share Posted October 29, 2019 What are you trying to accomplish? I am not familiar with uvs but perhaps the reason why they are minimal is to maintain performance. The distant POI meshes were probably not meant to be viewed up close. The application, in it's current state is simply a world viewer, it reads the heightmap, splat3, splat4, prebals files from a RGW or pre-generated world and renders them as a 2d map, as per the first image in the first post. That part is working fine. You can then click on any prefab in the map to see more information about it, which is shown in the right panel. I thought as well as show the prefab preview image, it would be nice to have a 3d model of the preab to give a little more detail. The distant poi meshes have a reasonable amount of detail to help you visualize the prefab better than just the preview image. I would like to add some simple editing facilitates to start with, such as moving or swapping prefabs and this is where the 3d visualization really helps. Link to comment Share on other sites More sharing options...
Pointy Posted October 31, 2019 Author Share Posted October 31, 2019 I think that the blocks are using some form of triplanar mapping in the shader. I have cobbled together a simple shader and it's now working well enough for my needs. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.