Hi!!,
I have a textured ball and it has an artifact when it is rendered in the screen (see the images, there is a vertical artifact in each image). Below the image there is the code. I don't know how to correct this, I have tried with many ways (welding vertices,...), but with no result, and only happens if I create the mesh with a Ball structure[/code].
I suppose the reason is that "Bola.parts.New().base.create" creates the ball with some bad vertices.
Any suggestions?
Thanks.
the code is:
[code] img.Import(str, -1, IMAGE_2D); // image .gfx created with editor
//--- Crear malla esfera ------------------------------------------------
Mtrl.reset(); // setup defaults
Mtrl.base_0.require(str); // set diffuse texture to white
Mtrl.base_1.require("../data/Emoticon/emoticon5.n.gfx" ); // set normal texture
Mtrl.color.set(0.7f,0.7f,0.7f,0); // set color
Mtrl.ambient.set(0.3f,0.3f,0.3f); // set color
Mtrl.specular=0.5f ; // set specular
Mtrl.glow=0;
Mtrl.bump =0.05f; // set bump value
Mtrl.rough =0.5f; // set roughness
Mtrl.validate(); // validate changes
Bola.parts.New().base.create(Ball(0.5),VTX_TEX0|VTX_NRM|VTX_TNG, 12); // 1 MeshBase, auto. tex. coord., normals and tangents
Bola.parts(0).base.texMap(Tube(0.5,0.5*1.2));
Bola.setMaterial(&Mtrl).setRender().setBox(); // set mesh rendering version and bounding box