Forum

Author Topic: Straight to height/color map , without mesh ?  (Read 5465 times)

pjenness

  • Newbie
  • *
  • Posts: 45
    • View Profile
    • IMDB
Straight to height/color map , without mesh ?
« on: January 18, 2016, 01:48:47 AM »
Hiya

Im wanting to use photoscan to make some displacement/normal/colour tiles for brick walls, grounds etc.

Currently the method I use is to go thru all the steps, create the mesh, then extract that information from a UVed plane, and put that plane (redisplaced the shape detail) back into photoscan to bake color.

Is there a more simple version where just let photoscan know, this is a planar (ortho I guess) data set, and I want displacement (height) and colour maps only.

It feels like this would be part of the ortho DEM solution, and could be used for texture tile creation, but I think Ive missed something?

Using the mesh approach, some fidelity is lost due to the mesh. If it was all pixel based then would get a sharper result.

Thanks

-Paul
Lead Environtment Artist
Weta Digital

http://www.imdb.com/name/nm1473416/

sc

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: Straight to height/color map , without mesh ?
« Reply #1 on: January 18, 2016, 11:49:06 AM »
You can right click one of your photos and export diffuse, depth and normal. I usually need more than that so I run everything through xNormal. Baking some maps from Photoscan and some in any other apps usually give tiny offsets that don't perfectly align in the end, so I would advice against it.

pjenness

  • Newbie
  • *
  • Posts: 45
    • View Profile
    • IMDB
Re: Straight to height/color map , without mesh ?
« Reply #2 on: January 18, 2016, 10:53:11 PM »
You can right click one of your photos and export diffuse, depth and normal. I usually need more than that so I run everything through xNormal. Baking some maps from Photoscan and some in any other apps usually give tiny offsets that don't perfectly align in the end, so I would advice against it.

Oh wow, thanks for that!!

 I hadnt seen that feature. Results look interesting, will have to try again with intentional photos.


The main caveat with this approach seems to be it requires using the supplied camera positions, so you have to choose one.

Is there a way to for example supply a UVed mesh into the project that is say an average ground plane, or if a tree trunk , low poly cylinder wrapped into the space. And Extract the same colour, depth and normals from the dense data to the UVed mesh?

The only way I can think of at the moment is generating the highest mesh you can handle in zBrush etc, retopo, UV, bring back in and extract. But you always lose some of the detail in the shape edges (bark,rock edge etc) this way. If we could extract from the depth information that is per pixel the result should be more accurate right? (tho potentially a little noisy or holes in places of now data)

-P

« Last Edit: January 18, 2016, 11:12:20 PM by pjenness »
Lead Environtment Artist
Weta Digital

http://www.imdb.com/name/nm1473416/

sc

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: Straight to height/color map , without mesh ?
« Reply #3 on: January 19, 2016, 12:29:24 PM »
I guess you could import a custom camera. If you export your cameras you get an .xml file with your camera profiles and transformation.
Code: [Select]
<sensor id="4" label="Canon EOS 6D (24 mm)" type="frame">
        <resolution width="5472" height="3648"/>
        <property name="pixel_width" value="0.0065789473684210523"/>
        <property name="pixel_height" value="0.0065789473684210523"/>
        <property name="focal_length" value="24"/>
        <property name="fixed" value="false"/>
        <calibration type="frame" class="adjusted">
          <resolution width="5472" height="3648"/>
          <fx>3753.5223540078168</fx>
          <fy>3753.5223540078168</fy>
          <cx>2738.2623805545941</cx>
          <cy>1807.8852989996785</cy>
          <k1>-0.096003340193473383</k1>
          <k2>0.090491266178159571</k2>
          <k3>-0.022672314154036397</k3>
          <p1>-0.00036612279367345148</p1>
          <p2>0.00021318275905502101</p2>
        </calibration>
</sensor>
and
Code: [Select]
<cameras>
      <camera id="0" label="IMG_6974.jpg" sensor_id="0" enabled="true"/>
      <camera id="1" label="IMG_6975.jpg" sensor_id="0" enabled="true"/>
      <camera id="5" label="customcam" sensor_id="0" enabled="true">
        <transform>-9.8752684113413847e-001 -3.4323850223813929e-002 1.5366395590847953e-001 -2.0584633926248333e+001 1.5731772697203841e-001 -2.5520505827043760e-001 9.5400288836750047e-001 -1.3817692896672533e+001 6.4707665682775389e-003 9.6627752304345549e-001 2.5742159513339813e-001 2.6039842407608546e+001 0.0000000000000000e+000 0.0000000000000000e+000 0.0000000000000000e+000 1.0000000000000000e+000</transform>
      </camera>

So maybe if you add a custom profile with a square resolution and a custom camera with your own transform maybe that would work out. Ideally you would import your cameras and a proxy mesh into your 3d app of choice and add a new camera there and import that back into photoscan, but not sure if that is possible

sc

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: Straight to height/color map , without mesh ?
« Reply #4 on: January 19, 2016, 03:32:46 PM »
Another way, if possible, could be to create a camera from the current viewport location in Photoscan, and set a custom resolution if say you want a 4k output. I'm not sure if this could be done through a python script or not though, but we would be interested in this as well. Maybe Alexey knows :)

pjenness

  • Newbie
  • *
  • Posts: 45
    • View Profile
    • IMDB
Re: Straight to height/color map , without mesh ?
« Reply #5 on: January 20, 2016, 10:25:44 AM »
I get the impression the camera must have its own depth data/map. In which case an arbitrary camera imported from say may would not have the depth info/data/cloud.

But....will give it a go.


Extracting from a UVed mesh straight to the depth cloud would be interesting. To bypass the mesh routines completely.



Lead Environtment Artist
Weta Digital

http://www.imdb.com/name/nm1473416/