Icare Posted August 16, 2010 Share Posted August 16, 2010 Hi I'm thinking that I found a bug in object with multi surface...I found a temporary solution, but it's very strange, it looks like the surface doesn't reset after a create In first time my code who created 2 plans and I assign 2 materials, but the second surface doesn't show correctly the material. And the screen shot _mesh = CreateMesh() surf = _mesh.AddSurface() surf.AddVertex([1.0, 1.0, -1.0], [0.0, 0.0, 0.0], [0.0, 0.0]) surf.AddVertex([1.0, 1.0, 1.0], [0.0, 0.0, 0.0], [1.0, 0.0]) surf.AddVertex([1.0, -1.0, 1.0], [0.0, 0.0, 0.0], [1.0, 1.0]) surf.AddVertex([1.0, -1.0, -1.0], [0.0, 0.0, 0.0], [0.0, 1.0]) surf.AddTriangle(0, 1, 2) surf.AddTriangle(0, 2, 3) mat = LoadMaterial("abstract::skyright.mat") PaintSurface surf, mat ' Front Face surf = _mesh.AddSurface() surf.AddVertex([1.0, 1.0, -1.0], [0.0, 0.0, 1.0], [1.0, 0.0]) surf.AddVertex([1.0, -1.0, -1.0], [0.0, 0.0, 1.0], [1.0, 1.0]) surf.AddVertex([- 1.0, -1.0, -1.0], [0.0, 0.0, 1.0], [0.0, 1.0]) surf.AddTriangle(0, 1, 2) surf.AddTriangle(0, 2, 3) mat = LoadMaterial("abstract::test.mat") PaintSurface surf, mat And the screen the solution, I must Create two Time the First vertex on the second surface _mesh = CreateMesh() surf = _mesh.AddSurface() surf.AddVertex([1.0, 1.0, -1.0], [0.0, 0.0, 0.0], [0.0, 0.0]) surf.AddVertex([1.0, 1.0, 1.0], [0.0, 0.0, 0.0], [1.0, 0.0]) surf.AddVertex([1.0, -1.0, 1.0], [0.0, 0.0, 0.0], [1.0, 1.0]) surf.AddVertex([1.0, -1.0, -1.0], [0.0, 0.0, 0.0], [0.0, 1.0]) surf.AddTriangle(0, 1, 2) surf.AddTriangle(0, 2, 3) mat = LoadMaterial("abstract::skyright.mat") PaintSurface surf, mat ' Front Face surf = _mesh.AddSurface() surf.AddVertex([- 1.0, 1.0, -1.0], [0.0, 0.0, 1.0], [0.0, 0.0]) surf.AddVertex([- 1.0, 1.0, -1.0], [0.0, 0.0, 1.0], [0.0, 0.0]) surf.AddVertex([1.0, 1.0, -1.0], [0.0, 0.0, 1.0], [1.0, 0.0]) surf.AddVertex([1.0, -1.0, -1.0], [0.0, 0.0, 1.0], [1.0, 1.0]) surf.AddVertex([- 1.0, -1.0, -1.0], [0.0, 0.0, 1.0], [0.0, 1.0]) surf.AddTriangle(0, 2, 3) surf.AddTriangle(0, 3, 4) mat = LoadMaterial("abstract::test.mat") PaintSurface surf, mat And the screen Nicolas Quote Link to comment Share on other sites More sharing options...
Joh Posted August 17, 2010 Share Posted August 17, 2010 UpdateMesh ( mesh ) Did you updated the mesh? Quote Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10. Link to comment Share on other sites More sharing options...
Icare Posted August 17, 2010 Author Share Posted August 17, 2010 Yes , There is no change with updatemesh .... And a mesh with multi surface exporter with Leadwerks tools 2.2 for 3ds max doesn't work too. Nicolas Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.