• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Distant POI mesh uv's

Pointy

Refugee
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...

main.jpg

Here's a screenshot of the POI renderer (which is currently just using the uv color)

prefab.jpg

Anyone have any ideas?

 
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?

 
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.

model.jpg

Maybe it has something to do with global uvs? My 3d knowledge is limited so maybe I am just missing something too.

 
////// 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?

 
Last edited by a moderator:
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.

 
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.

 
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.

 
Back
Top