diff options
author | UbitUmarov | 2018-05-05 04:27:41 +0100 |
---|---|---|
committer | UbitUmarov | 2018-05-05 04:27:41 +0100 |
commit | bf0ece8061738374d1200af0267e4a0e69d7dd78 (patch) | |
tree | 5a374e79d559e40f3e16e7357723795032d8755a /OpenSim/Region/CoreModules/World | |
parent | a few more changes to warp3d and export-map (diff) | |
download | opensim-SC-bf0ece8061738374d1200af0267e4a0e69d7dd78.zip opensim-SC-bf0ece8061738374d1200af0267e4a0e69d7dd78.tar.gz opensim-SC-bf0ece8061738374d1200af0267e4a0e69d7dd78.tar.bz2 opensim-SC-bf0ece8061738374d1200af0267e4a0e69d7dd78.tar.xz |
fix warp3d textures UV
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs index ce017aa..387248c 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs | |||
@@ -440,8 +440,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
440 | Image sculpt = imgDecoder.DecodeToImage(sculptAsset); | 440 | Image sculpt = imgDecoder.DecodeToImage(sculptAsset); |
441 | if(sculpt != null) | 441 | if(sculpt != null) |
442 | { | 442 | { |
443 | renderMesh = m_primMesher.GenerateFacetedSculptMesh(omvPrim,(Bitmap)sculpt, | 443 | renderMesh = m_primMesher.GenerateFacetedSculptMesh(omvPrim,(Bitmap)sculpt, DetailLevel.High); |
444 | DetailLevel.Medium); | ||
445 | sculpt.Dispose(); | 444 | sculpt.Dispose(); |
446 | } | 445 | } |
447 | } | 446 | } |
@@ -453,7 +452,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
453 | // If not a mesh or sculptie, try the regular mesher | 452 | // If not a mesh or sculptie, try the regular mesher |
454 | if (renderMesh == null) | 453 | if (renderMesh == null) |
455 | { | 454 | { |
456 | renderMesh = m_primMesher.GenerateFacetedMesh(omvPrim, DetailLevel.Medium); | 455 | renderMesh = m_primMesher.GenerateFacetedMesh(omvPrim, DetailLevel.High); |
457 | } | 456 | } |
458 | 457 | ||
459 | if (renderMesh == null) | 458 | if (renderMesh == null) |
@@ -477,7 +476,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
477 | { | 476 | { |
478 | Vertex v = face.Vertices[j]; | 477 | Vertex v = face.Vertices[j]; |
479 | warp_Vector pos = ConvertVector(v.Position); | 478 | warp_Vector pos = ConvertVector(v.Position); |
480 | warp_Vertex vert = new warp_Vertex(pos, v.TexCoord.X, v.TexCoord.Y); | 479 | warp_Vertex vert = new warp_Vertex(pos, v.TexCoord.X, 1.0f - v.TexCoord.Y); |
481 | faceObj.addVertex(vert); | 480 | faceObj.addVertex(vert); |
482 | } | 481 | } |
483 | 482 | ||
@@ -497,12 +496,13 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
497 | else | 496 | else |
498 | materialName = GetOrCreateMaterial(renderer, faceColor); | 497 | materialName = GetOrCreateMaterial(renderer, faceColor); |
499 | 498 | ||
499 | faceObj.scaleSelf(prim.Scale.X, prim.Scale.Z, prim.Scale.Y); | ||
500 | |||
500 | warp_Vector primPos = ConvertVector(prim.GetWorldPosition()); | 501 | warp_Vector primPos = ConvertVector(prim.GetWorldPosition()); |
501 | warp_Quaternion primRot = ConvertQuaternion(prim.GetWorldRotation()); | 502 | warp_Quaternion primRot = ConvertQuaternion(prim.GetWorldRotation()); |
502 | warp_Matrix m = warp_Matrix.quaternionMatrix(primRot); | 503 | warp_Matrix m = warp_Matrix.quaternionMatrix(primRot); |
503 | faceObj.transform(m); | 504 | faceObj.transform(m); |
504 | faceObj.setPos(primPos); | 505 | faceObj.setPos(primPos); |
505 | faceObj.scaleSelf(prim.Scale.X, prim.Scale.Z, prim.Scale.Y); | ||
506 | 506 | ||
507 | renderer.Scene.addObject(meshName, faceObj); | 507 | renderer.Scene.addObject(meshName, faceObj); |
508 | renderer.SetObjectMaterial(meshName, materialName); | 508 | renderer.SetObjectMaterial(meshName, materialName); |