jPCT-AE - a 3d engine for Android > Support

light and material effects for newie

<< < (2/3) > >>

EgonOlsen:
It is possible when using OpenGL ES 2.0 and a custom shader. If that's too mush hassle, you can try to use specular lighting to improve things a little (http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Object3D.html#setSpecularLighting(boolean), http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Config.html#specPow, http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Config.html#specTerm), but i'm not sure if that will cut it.

julycamara:
hello, i'm here again with new problems.

ok, i try with Object3D.setCulling(false); And the object looks like i want, the black transparent color of the png texture disappear and i can see the back side of the object.

But when y rotate the object on scene it looks bad, sometimes draw the back side over the front sides and his behaviour is not perfect. Please let me show some images for explain it:

http://www.tiikoni.com/tis/view/?id=f590cbf this is the good draw of a transparent object.

When i try to rotate this, then we can see something like that... http://www.tiikoni.com/tis/view/?id=6600893

And then we can see how the back side is drawing over the front side: http://www.tiikoni.com/tis/view/?id=0f1d8a5

I hope it could be solutions. Any ideas? thank you.

EgonOlsen:
That's because the order in which the polygons will rendered depends on the order in which they are defined. For transparent objects, this matter and it might look wrong from certain angles. There's no way to fix this except by splitting the objects into smaller parts, if possible into transparent and opaque parts. Not sure if this helps in this case because i can't access the images ATM because my bandwidth here is very very low.

EgonOlsen:
Another idea that is worth a try: Clone the object, make it a child of the actual object and invert it. Then add some sort offset, so that the inverted clone will always be painted before the actual object. Enable transparency on both and see if it helps. Don't disable calling on any of the objects in this case.

julycamara:
hello,

I try this,

....

               clone = cube.cloneObject();

               cube.setTransparency(50);
               cube.setCulling(false);
               cube.setTexture("texture");
               //cube.strip();
               cube.build();
               
               cube.addChild(clone);
               clone.invert();
               clone.setTransparency(50);
               clone.setCulling(false);
               clone.setTexture("texture");
               clone.setSortOffset(-100000);
               //clone.strip();
               clone.build();
               
               world.addObject(clone);
               world.addObject(cube);

...

But it isn't works for me.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version