Tree uv mapping

Your forum for all discussions around Modding.
sablerock
Posts: 119
Joined: Sat Dec 10, 2022 1:58 pm

Tree uv mapping

Post by sablerock »

So we have solved most of rendering trees mysteries in Blender for game. With ONE exception: The cut section. Like all trees ingame, we use single texture file for the trunk with cut section at the bottom and we uv map the tree in Blender to this single texture png file.
The texture map looks great in GE, but when we cut the tree ingame, the cut section texture is off and distorted.
What are we missing here?
Specific file sizes? Mipmaps problem? We convert the png to dds with Giants texture tool.
We even tried Maya, same result.
PLS HELP
sablerock
Posts: 119
Joined: Sat Dec 10, 2022 1:58 pm

Re: Tree uv mapping

Post by sablerock »

Stegei
Our project is at standstill because of this one last single issue.
Pls reply.
PLS
sablerock
Posts: 119
Joined: Sat Dec 10, 2022 1:58 pm

Re: Tree uv mapping

Post by sablerock »

So the secret is the SPLIT UVS. Pity we can’t find documentation about what the values of each if the 5 coordinates should be!!!!!
Stegei
GIANTS Software | CTO
Posts: 1788
Joined: Sat Jun 09, 2007 10:51 am

Re: Tree uv mapping

Post by Stegei »

Yes the Split Uvs define which texture area is used for the cut section.
The splitUvs attribute is an array of 5 values:
minU minV maxU maxV uvWorldScale

minUV defines the lower left corner of your texture area (0,0 means the lower left corner of the texture)
maxUV defines the upper left corner of your texture area
uvWorldScale defines how the texture is scaled. It defines the inverse of your texture area in meters. I.e. a value of 1 means the texture area should be mapped to a cut section of 1 meter. A value of 2 means it will be mapped to an area of 0.5 meters. You have to make sure that the area is as large to cover most cuts, so at least the maximum diameter of your tree.
sablerock
Posts: 119
Joined: Sat Dec 10, 2022 1:58 pm

Re: Tree uv mapping

Post by sablerock »

Many many thanks Stegei !! Cut section solved.
Now, new problem. New trees work/look/cut perfectly ingame.
But my new trees are NOT saved in Splitshape.gmss file upon saving game. Why? Is it geometry problem again? Something I must change in xml file?
Pls help what I hope is last problem
Post Reply