Dollhouse Tutorial

PanoCamAdder can automatically distribute the panoramic materials to the model and bake the texture in just a few steps. The whole process of creating the dollhouse texture is done in a few minutes.

In this tutorial I will show you how to do it.
YouTube screencast

baked uv texture
PCA2 example Blender file
Once a model is modelled and all PanoCams are placed, the dollhouse texture can be created.
You can download a blend file, in which eight PanoCams are already placed.

Distribute Pano Materials

Select all HANDLEs and lastly the model (must be the active object) and then click distribute pano materials.

The materials will then be distributed to the model in such a way that always the shortest distance from the HANDLE to the face(center) is chosen. This is usually the best method.
PCA2 dollhouse panel
In some cases, it may make more sense to choose the better angle rather than the shorter distance. This can be done with the checkbox Angle-based. Additionally a maximum distance can be specified. Within this distance panoramas with a better angle will be searched.

If a face(center) is not visible from any pano_CAM, it will get a no_Mat material. Select these faces in edit mode to assign a different material.

If no corresponding material can be found for a HANDLE, an X_pano_MAT is created and assigned. This is just in case you have renamed the material for some reason. Simply replace the material in the material slot if you have this case.


UV-Unwrapping


The model must have an actual uv layout

PCA2 will create an UV layout, if 'Create UV Layout' is checked. But it is best to do it manually to keep an eye on stretch, texture space and margin. UV unwrapping means to cut of the 3D model to make it plane. So you can place all the faces on a 2D space.
xyz
uv unwrapping
uv
Blender has many tools to create the UV's and also many options to do it automaticly.
There are tons of good tutorials in the internet to search for!
Creating the UV's manually has several advantages: You have the full control about the layout, which is very helpfull to keep an overwiew.

The goal for the best result is:
  • Less or no stretching.
  • Best use of texture space.


Tip: You can export the UV-layout, too. This is very helpfull if you want to refine your textures in an image editing application later on.


Bake UV-Texture

Enter a name and a size for the bake image and click the 'bake uv texture' button.
The render/bake settings are adjusted to the panorama material (emission) so that it can be baked very quickly. The texture can then be found in the image editor window after a few seconds.

Open an image editor window, select your baked image from the image menu and save it to your hard disk
PCA2 bake panel


Load UV-Texture / Export OBJ

Select the model and open the Helpers/Materials menu. Click 'UV Texture' and select the baked image in the file browser.
All Pano materials are removed from the model and a UV material with the baked image is created.



The dollhouse is easiest to integrate into krpano later, when all values for location and rotation are 0.0
This happens automatically when distributing the pano materials. Otherwise, select the model and then click 'Object/Apply/All Transformations' before exporting the model.

Now you can export the model as OBJ file.

PCA2 helper materials panel


krpano Scene



<krpano version="1.21" title="Virtual Tour" bgcolor="0x111111" onstart="transition_to_dh()">
<!-- depthmap navigation -->
<include url="plugins/depthmap_navigation.xml"/>
<!-- Transition to dollhouse  -->
<action name="transition_to_dh">
    lookto(0,90,80,default,true,true); 
    tween(view.ox|view.oy|view.oz, 0.0|0.0|1000, 2.0, easeinoutquad); 
    tween(view.tx|view.ty|view.tz, 0.0|0.0|241.0|, 2.0, easeinoutquad); 
    adjusthlookat(0); tween(view.hlookat|view.vlookat, 0.0|90, 2.0, easeinoutquad); 
    loadscene(Dollhouse, null, MERGE|KEEPVIEW|KEEPMOVING, BLEND(1.0)); 
    set(control.invert,true);
</action>
<!-- D O L L H O U S E  -->
<scene name="Dollhouse" title="Dollhouse">
    <view maxpixelzoom="2.0" fovtype="MFOV" fovmin="40" fovmax="140"/>
    <image>
        <sphere url="models/MyDollhouseTexture.jpg"/>
        <depthmap url="models/dollhouse.obj" enabled="true" rendermode="3dmodel" textured="true" scale="100"/>
    </image>
</scene>
</krpano>