d3tut projectimage
June 2017

Photorealistic Texturing with d3


At dandelion & burdock we set up 2D and 3D workflows in order to subsequently create contents that can easily integrate with media server solutions for event productions.
We also craft d3 projects and often test client requests for their technical and creative feasibility. If you, like us, are in need of realistically shaded previsualisation scenarios or even want to use high resolution textures for content, the following walkthrough should be exciting.

d3tut result

A little background

This article is using the latest release of d3, called r11, which you should obtain if you haven’t got it already.

We will be using the greatly improved d3 calibration tool, named “quick cal” and a quirky little hack, which turns virtual projectors into active mappings.
Quick cal is essentially a tool which matches a virtual projector to a real world projector pointed at a screen object which is also present within the d3 stage. This happens with a few simple steps and makes the on-site calibration of numerous projectors an almost trivial task. I should mention that this tool is giving you real time feedback so you can calibrate points by simple hand to eye moves. The object gets matched in realtime. No calculation- or loading-bars.
So if it works so well, why not use it in reverse? Here is how to turn your d3 into a camera solver and harness the amazing realtime tools in a slightly unintended way.

d3tut projectimage

In a d3 project create a new bitmap layer for the images you would like to match to your building, model etc.

Place some photographs on the timeline and and note their exact size. You will need to make your mappings this size later on.

I have used a few images from angles covering the full extend of the theatre i am matching here. I also selected them because these photos were taken from different vantage points. This allows me to paint out or mask overlapping features that might get rendered into the final image.

Within your bitmap options box, go to the mappings tab and create a new mapping. Use the perspective type; then add the object you want to texture (screen 1) and a new projector as screens. I added an existing projector which was already pointed at the facade from a good distance so you can see what is happing.

Make sure that you drag the projector inside your perspective mapping on top of the screen object. Notwithstanding your perspective mapping position and rotation, the mapping type is now driven by the projector. Note that in my example the perspective mapping is still situated at in the origin with out any rotations. Still the projector is superimposing its values and acts like a good projector should, by shining my bitmap onto the object.

d3tut perpsmapprojhack
A bitmap module with a perspective mapping. The match-projector is the top element in the screen list.
d3tut perpsmapprojhack
A bitmap module with a perspective mapping. The match-projector is the top element in the screen list.
d3tut matchperspmapping
Setting up your projector according to the bitmap that should be matched up.
d3tut matchperspmapping
Setting up your projector according to the bitmap that should be matched up.

As you can see the image and the projector point are not matching at all, but this is about to change.

Open your projector settings by right clicking it. Make its resolution the same as the photo’s you are using. Go to the calibration tab and right click the configuration object.
In the configuration tab make sure you are setting the background image to the same image you set as the current bitmap. While in the “manage points” option you can place reference points on your object. These stick to vertices by default, but holding shift you can also position them elsewhere on your object.

For the purpose of this exercise and given that i am running a d3 designer without a second laptop the next step will be crucial. Go to the feed manager and add a feed rectangle of the match-projector to your GUI screen. Although it’s correct resolution may be huge you can scale it down to fit about a quarter of your GUI. Now go back to your stage view and fade up. You will see an image appear where you placed the output rectangle.

d3tut createoutputfeed
Creating a feed rectangle...
d3tut createoutputfeed
Creating a feed rectangle...
d3tut placeoutputfeed
... and placing it on the GUI.
d3tut placeoutputfeed
... and placing it on the GUI.

Within the calibration options you can now switch to “line up points”. Grab a reference point on the model and start dragging it. On the feed output your cursor will move. Place your reference point where you see it in your photograph. and keep doing this for another 5 points. On or just after the sixth point d3 will start to draw the wireframe of the screen object on top of your output image. You will see how the wireframe moves in realtime as you move your points.

d3tut projbgimage

You may need some extra points to make your match perfect but now is also the time to revisit points placed earlier and get your result just right. At this point you don’t have to keep matching point positions but instead you focus on matching the whole wireframe to your photograph.
Once you are happy you can close the calibration options. The image will now be show on the screen object as the projector takes over.

d3tut resultlineup

Finishing Touches

I repeated this process, of placing a bitmap, creating a new map and assigning, and calibration a projector two more times. This covered my facade entirely with ample room to blend my results.

Depending on your preference you could now remain within d3 and mask each image with a new soft edge texture or you can render your outputs.
I removed all my feed outputs and replaced them with one output for my facade screen. Since this is laid out according to its UV texture space I ended up with a quicktime of of each projected image as a scan-line render.

left
The left hand result for the night time texture.
left
The left hand result for the night time texture.
right
The right part of the Adelaide Festival Theatre.
right
The right part of the Adelaide Festival Theatre.

The final polishing was then done in Photoshop overlaying the three results. As you can see I had some overlapping lighting fixtures in my images which i was able to paint out swiftly.

Finally I brought the image back into d3 and textured the facade with it. In the same fashion you can now give this image to your 2d and 3d artist to speed up realistic lighting scenarios.

finalcomposite2

The project used in this article was a projection mapping show produced by Kojo on the Adelaide Festival Theatre. The technical partner was local d3 Studio Novatech.


admin
By Niall Thompson