fix warp3d textures UV
parent
020f34f75b
commit
bf0ece8061
|
@ -440,8 +440,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||||
Image sculpt = imgDecoder.DecodeToImage(sculptAsset);
|
Image sculpt = imgDecoder.DecodeToImage(sculptAsset);
|
||||||
if(sculpt != null)
|
if(sculpt != null)
|
||||||
{
|
{
|
||||||
renderMesh = m_primMesher.GenerateFacetedSculptMesh(omvPrim,(Bitmap)sculpt,
|
renderMesh = m_primMesher.GenerateFacetedSculptMesh(omvPrim,(Bitmap)sculpt, DetailLevel.High);
|
||||||
DetailLevel.Medium);
|
|
||||||
sculpt.Dispose();
|
sculpt.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -453,7 +452,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||||
// If not a mesh or sculptie, try the regular mesher
|
// If not a mesh or sculptie, try the regular mesher
|
||||||
if (renderMesh == null)
|
if (renderMesh == null)
|
||||||
{
|
{
|
||||||
renderMesh = m_primMesher.GenerateFacetedMesh(omvPrim, DetailLevel.Medium);
|
renderMesh = m_primMesher.GenerateFacetedMesh(omvPrim, DetailLevel.High);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (renderMesh == null)
|
if (renderMesh == null)
|
||||||
|
@ -477,7 +476,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||||
{
|
{
|
||||||
Vertex v = face.Vertices[j];
|
Vertex v = face.Vertices[j];
|
||||||
warp_Vector pos = ConvertVector(v.Position);
|
warp_Vector pos = ConvertVector(v.Position);
|
||||||
warp_Vertex vert = new warp_Vertex(pos, v.TexCoord.X, v.TexCoord.Y);
|
warp_Vertex vert = new warp_Vertex(pos, v.TexCoord.X, 1.0f - v.TexCoord.Y);
|
||||||
faceObj.addVertex(vert);
|
faceObj.addVertex(vert);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -497,12 +496,13 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||||
else
|
else
|
||||||
materialName = GetOrCreateMaterial(renderer, faceColor);
|
materialName = GetOrCreateMaterial(renderer, faceColor);
|
||||||
|
|
||||||
|
faceObj.scaleSelf(prim.Scale.X, prim.Scale.Z, prim.Scale.Y);
|
||||||
|
|
||||||
warp_Vector primPos = ConvertVector(prim.GetWorldPosition());
|
warp_Vector primPos = ConvertVector(prim.GetWorldPosition());
|
||||||
warp_Quaternion primRot = ConvertQuaternion(prim.GetWorldRotation());
|
warp_Quaternion primRot = ConvertQuaternion(prim.GetWorldRotation());
|
||||||
warp_Matrix m = warp_Matrix.quaternionMatrix(primRot);
|
warp_Matrix m = warp_Matrix.quaternionMatrix(primRot);
|
||||||
faceObj.transform(m);
|
faceObj.transform(m);
|
||||||
faceObj.setPos(primPos);
|
faceObj.setPos(primPos);
|
||||||
faceObj.scaleSelf(prim.Scale.X, prim.Scale.Z, prim.Scale.Y);
|
|
||||||
|
|
||||||
renderer.Scene.addObject(meshName, faceObj);
|
renderer.Scene.addObject(meshName, faceObj);
|
||||||
renderer.SetObjectMaterial(meshName, materialName);
|
renderer.SetObjectMaterial(meshName, materialName);
|
||||||
|
|
Loading…
Reference in New Issue