for example:
i use "drawVertexPrimitiveList" to draw 2 object(triangle here), and i want the overlap area draw with blend color, how can i do that ? Thank you in advances
camera position : (5,5,20)
camera target: (5,5,0)
green triangle : (0,0,0), (5,5,0), (10,0,0)
blue triangle : (2,0,1), (7,5,1), (12,0,1)
[SOLVED] how to blend two 3D object's color
-
- Posts: 10
- Joined: Thu Jul 17, 2014 6:40 am
[SOLVED] how to blend two 3D object's color
Last edited by wps20052002 on Sun Jul 05, 2015 5:37 am, edited 1 time in total.
-
- Posts: 10
- Joined: Thu Jul 17, 2014 6:40 am
Re: how to blend two 3D object's color
to be simple, i just want to a transparent objects, like "Tutorial 10. Shaders", but i want a easy to do this(without shaders, because i have no idea about shader programming)


Re: how to blend two 3D object's color
You can try setting the colors of each vertex. It should then interpolate between the vertex colors over the triangles.
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: how to blend two 3D object's color
Irrlicht has some built-in material types for transparency. (documentation: http://irrlicht.sourceforge.net/docu/na ... 0cbc5430f1)
If the background is black, then you can use the material type EMT_TRANSPARENT_ADD_COLOR.
So if you draw a red triangle on top of a green one (and vice versa) you will get yellow.
If the background is black, then you can use the material type EMT_TRANSPARENT_ADD_COLOR.
So if you draw a red triangle on top of a green one (and vice versa) you will get yellow.
-
- Posts: 10
- Joined: Thu Jul 17, 2014 6:40 am
Re: how to blend two 3D object's color
Oh yes, it works!Foaly wrote:Irrlicht has some built-in material types for transparency. (documentation: http://irrlicht.sourceforge.net/docu/na ... 0cbc5430f1)
If the background is black, then you can use the material type EMT_TRANSPARENT_ADD_COLOR.
So if you draw a red triangle on top of a green one (and vice versa) you will get yellow.
Thank you very much, have a nice day.
-
- Posts: 10
- Joined: Thu Jul 17, 2014 6:40 am
Re: how to blend two 3D object's color
actually , i want to draw transparent objects, maybe i didn't express clearly, but thank you for your reply.CuteAlien wrote:You can try setting the colors of each vertex. It should then interpolate between the vertex colors over the triangles.