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
Tree uv mapping
5 posts
Page 1 of 1
Re: Tree uv mapping
Stegei
Our project is at standstill because of this one last single issue.
Pls reply.
PLS
Our project is at standstill because of this one last single issue.
Pls reply.
PLS
Re: Tree uv mapping
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!!!!!
Re: Tree uv mapping
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.
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.
Re: Tree uv mapping
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
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
5 posts
Page 1 of 1