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

VVVV.Packs.ProjectorSimulation

module dx9/ex9 pack

about

Installation

Unzip the contents of the zip into your vvvv\packs folder (e.g aside DX11).

Requires addonpack (see/downloads page)

Usage

Check 'Example 0 - Simple DX9' for example on usage

If it doesn't work. let me know asap :)

Notes

Depth testing threshold

Depending on the scale of your scene, you may need to tweak the 'threshold' pin of the TestShadows node inside PreviewCoverage. A value of 0.01 seems to work well for scenes of about 1 to 10 units in size. E.g. if you measure your scene in mm's, or you're projecting onto a 100m wide building, you may need to increase this value to get useful results.

16 Projector limit

The shader code supports up to 16 projectors. If you need more, please look inside the PreviewCoverage module for notes.

What actually is it doing?

  1. We define a spread of projectors as ViewProjection transforms (i.e. if you were to attach this transform to a renderer, it would give you a 1:1 rendering from the projector's perspective, hint: don't use AspectRatio node)
  2.  We use these transforms to render a depth map of the scene from the perspective of each projector
  3.  We then render the scene from an interactive inspection camera (the final renderer). In this render, we apply a shader to every object which the projectors should be seen to act upon. This shader performs calculations of:
  4. Projector coverage (accounting for shadows, projector frustum shape)
  5. Brightness per surface area (accounting for 1/r^2 falloff, normal of surface with respect to projector, user selected projector amplitude constant)
  6. If we set the depth testing threshold very low (see note 'Depth testing threshold' above, we can also see the tearing of individual pixels

Changelog

v2 27-08-2012

tekcor 23/08/2013 - 11:37

its so just in time. thanks :D

elliotwoods 23/08/2013 - 13:12

obviously a dx11 version would make sense nowadays :)

youngjae 14/09/2013 - 23:25

thnx elliot, this is really great. i looked into the depth render subpatch and blended the depth texture with some of my own visuals.

I know i am doing it the faky way because i know you are using the depthrender in order to factor in the distance to brightness relationship. but I couldnt see any other way to actually project dx9 textures, like the old projected texture contribution. hence everything is in blau.

the 3d model is something made with rhion + grasshopper, as a side note.

any hints at how i can modify it so that i can also bring in dx9 textures ? only because I want to actually redesign some elements you see in this facade applciation to work better with projections...

catweasel 16/09/2013 - 12:42

@youngjae you need to use the output from the transform at the top of the patch as an input to your projected texture shader try projector-(ex9.effect)
Think that will work with it...

mrboni 25/09/2013 - 00:37

Would be great if the brightness of each projector's projected depth map scaled with the throw of it's lens - how concentrated the light is

elliotwoods 25/10/2013 - 10:04

@mrboni - yes this is currently glitchy (changing the throw ratio scales the brightness incorrectly)

also ideally we should be able to apply a logarithmic brightness addition (to make it closer to perceptual).

princemio 23/05/2014 - 01:19

one of the reasons to go vvvv is little cool helppatches like this!!! thx for sharing

anonymous user login

Shoutbox

~6d 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

~6d ago

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

~13d ago

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

~15d 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/

~15d ago

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

~18d ago

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

~20d ago

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

~23d ago

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