» 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 - 10:37

its so just in time. thanks :D

elliotwoods 23/08/2013 - 12:12

obviously a dx11 version would make sense nowadays :)

youngjae 14/09/2013 - 22: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 - 11: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 24/09/2013 - 23: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 - 09: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 - 00:19

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

anonymous user login

Shoutbox

~7h ago

strblau: @schlonzo I DID IT! Thank you so much

~8h ago

schlonzo: @strblau install addonpack

~11h ago

strblau: anyone knows how to find kinect2 (dx11,flateric) node?

~4d ago

bjoern: Need someone to patch for you? I am looking for a job :)

~4d ago

joreg: Need some patching help? This evening: Patching Circle with everyoneishappy of InstanceNoodles and FieldTrip fame: patching-circle-a-vvvv-support-group

~5d ago

mrboni: 'Acoustic trap display' creates a 3D floating and animated image that can produce sound