Partly textured model, seeing through textured boxes

Hi folks,



I got small problems with setting texture on a model (letter U) and seeing through(letter T).

Attaching code for letter U:



Spatial U = assetManager.loadModel(“Models/U/U.j3o”);

Material matt = new Material(assetManager, “Common/MatDefs/Misc/Unshaded.j3md”);

TextureKey keyy = new TextureKey(“Models/U/MetalScratches0040_1_thumbhuge.jpg”);

keyy.setGenerateMips(true);

Texture tex = assetManager.loadTexture(keyy);

tex.setWrap(WrapMode.Repeat);

matt.setTexture(“ColorMap”, tex);

U.setMaterial(matt);



I got something like party textured model:

http://imageshack.us/photo/my-images/521/problemhb.png/



Furthermore, bricks fallen on ground is possible to see through letter T, which consists of 2 boxes. All is attached at screenshot.

What’s the problem, any idea?

I’d make sure the model materials all use proper blending, and that they are not being rendered as transparent.





U.setQueueBucket(Bucket.Opaque);





That’s how you put the models in the correct render queue.

Thank you for help.

Did not work, but I noticed that there were shadows what we could see through T. So I tried:

T.setShadowMode(ShadowMode.CastAndReceive);

instead of

T.setShadowMode(ShadowMode.Cast);

and it works now.



Anyway, I don’t understand it

Any idea whats wrong with letter U which is textured just partly (at the picture looks like there is NO texture) ???

have you tried turning off shadows altogether? just to see what happens.



It looks shadow related.

Is it a blender model you made?



Then maybe try to go to Edit mode, and Flip normals. Its looks like its inside out.

Ok, I tried to turn off ShadowRenderer, here is the result:

http://imgur.com/gkk90

Shadows, Bricks, are not see-able through the T letter. So it has sth to do with ShadowRenderer:

initShadows((pssmRenderer = new PssmShadowRenderer(assetManager, 1024, 3)), lightDir);

viewPort.addProcessor(pssmRenderer);



private void initShadows(PssmShadowRenderer pssmRend, Vector3f lightDirection) {



pssmRenderer = pssmRend;

pssmRenderer.setDirection(lightDirection);

pssmRenderer.setLambda(0.55f);

pssmRenderer.setShadowIntensity(0.6f);

pssmRenderer.setCompareMode(CompareMode.Hardware);

pssmRenderer.setFilterMode(FilterMode.Bilinear);

}