» Transparency Overview
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

Transparency Overview

Japanese

Transparent objects

Related nodes

Blend (EX9.RenderState Advanced)
ZWriteEnable (EX9.RenderState)
AlphaTest (EX9.Renderstate)
Group (EX9)
Group (EX9 Priority)

If you first (high priority) drew a transparent object near the camera and after that (lower priority) draw a solid object behind it, the depth buffer check would just reject the drawing of the solid object behind the transparent one - because it knows nothing about semitransparent objects.

Make sure to draw all objects with alpha textures after everything else (that last sentence exactly describes the problem).

Using a Group (EX9) or the drawing order is determined by the order of inputs on the group node: left (first drawn) to right (last drawn). A Group (EX9 Priority) node allows you to change the drawing order/priority programmatically via the "Priority" pins that are associated with each "Layer" input pins.

If this turns out to be difficult, DirectX supports one classic computer graphics hack for dealing with transparent objects drawn in arbitrary order -- vvvv exposes this hack with the AlphaTest (EX9.Renderstate) node.

Basically it allows one to skip processing for all pixels whose alpha value is below a given reference value. This means these pixels are neither rendered nor written into the depth buffer. Connect the AlphaTest node to the render node in question, enable it, set the compare function to less (or was it greater?), and play with the "reference alpha" pin. this should cut out all transparent areas in your objects. Consult the Microsoft DirectX documentation for details.

Obviously this method will not give you smooth antialiased borders, but it is somehow better than nothing.

See also:

Transparent background

Related nodes

DX9Texture (EX9.Texture)
SetAlpha (Color)

The image rendered by a Renderer can be retrieved as a texture via the DX9Texture (EX9.Texture). This is useful if you need to write it to disk, post-process the image (aka TextureFX) or use it in a feedback-loop.

In order to render on a transparent background the alpha in Background Color of the Renderer (DX9) must be <1 and the Format of the Renderer or the DX9Texture (EX9.Texture) must contain an alpha channel as well. Typically choose A8R8G8B8.

Examples in your vvvv\girlpower\ directory:

  • Graphics\DX9\Texture\TransparentTexture.v4p

anonymous user login

Shoutbox

~4d ago

domj: Midweek Patch Therapy later today at 17:30 ⌚ Come discuss sequencers, the VL language and your patches. https://discourse.vvvv.org/t/come-join-midweek-patch-therapy/18430/17?u=domj

~5d ago

joreg: Looking for support for your #AI project? Try this: https://www.link-niedersachsen.de/link-masters

~11d ago

blausand: Ill be in #Warszawa next weekend. Any #vvvv people around to meet?

~13d ago

sebescudie: Last call, c'est ce soir : webinaire en français pour débutants sur #vvvv gamma! https://thenodeinstitute.org/event/introduction-au-creative-coding-avec-vvvv-gamma-francais/

~14d ago

domj: Ultra high definition volumetric visualization using GPUDirect storage https://youtu.be/GAZP1NcdWMo

~17d ago

CeeYaa: thx for V4-Meetup - some days ago 40th_RetuneStudioVisit from old friends RefikAnadol and Quadrature https://vimeo.com/429510091

~19d ago

david: 4. worldwide vvvv meetup will be here...https://www.youtube.com/watch?v=i0zd68tDUVE

~21d ago

mediadog: @metrowave Magnetic repulsion has always been pure magic to me, proof we only sense a small part of the universe - thanks!