get mess triangle when set mesh transparent

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
zheng1038
Posts: 2
Joined: Mon Sep 24, 2018 12:20 am

get mess triangle when set mesh transparent

Post by zheng1038 »

Hi, can anybody help me?
I want to set mesh transparent, using the following code:

Code: Select all

 
node->setMaterialFlag(EMF_BLEND_OPERATION, true);
smgr->getMeshManipulator()->setVertexColorAlpha(((IAnimatedMeshSceneNode*)node)->getMesh(), 100);
 
however, when I deform mesh and the mesh was covered by itself, I will get the a lot of triangles in the covering part. like
[img]
https://drive.google.com/file/d/1DbH2iD ... sp=sharing
[/img]
Any suggestion? Thank you so much.
Last edited by zheng1038 on Mon Sep 24, 2018 4:28 pm, edited 1 time in total.
CuteAlien
Admin
Posts: 9652
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: get mess triangle when set mesh transparent

Post by CuteAlien »

You didn't give permission for others to watch those images.

But transparency sorting is per node, not per polygon (which would be too slow). So for those cases you have split your model.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
zheng1038
Posts: 2
Joined: Mon Sep 24, 2018 12:20 am

Re: get mess triangle when set mesh transparent

Post by zheng1038 »

thanks, I have shared the image.
Post Reply