Forum

Author Topic: Best (cheap) way to perform texture unwrapping?  (Read 16328 times)

RalfH

  • Sr. Member
  • ****
  • Posts: 344
    • View Profile
Best (cheap) way to perform texture unwrapping?
« on: January 24, 2013, 11:24:37 PM »
I have a textured 3D model of a sediment profile created in PhotoScan and want to use it as the basis for a stratigraphic sketch. What would be the best way (without using expensive software) to unwrap the texture without excessive distortions?

Simply exporting the expure atlas doesn't help much - depending on the model building quality setting, the texture is either more or less in one piece but distorted or it is fragmented into many pieces.  As you can see in the screenshot, it's not a simple object, so using an orthophoto texture atlas won't work.
« Last Edit: January 25, 2013, 01:20:52 AM by RalfH »

andy_s

  • Full Member
  • ***
  • Posts: 147
    • View Profile
Re: Best (cheap) way to perform texture unwrapping?
« Reply #1 on: January 25, 2013, 02:08:40 AM »
Hi Ralf.

Unfortunately this is probably of absolutely no help whatsoever but, to the extent that Blender is free, this might be worth 1 second of your time ?

http://wiki.blender.org/index.php/Doc:2.4/Manual/Textures/Mapping/UV/Unwrapping


RalfH

  • Sr. Member
  • ****
  • Posts: 344
    • View Profile
Re: Best (cheap) way to perform texture unwrapping?
« Reply #2 on: January 25, 2013, 12:29:39 PM »
Thanks! Looks complicated though... And I guess I'll need quite some time to find my way through Blender before I can attempt something advanced such as texture unwrapping. At the moment, I can import the model, but don't see the texture or even the vertex colours, just the grey model...
« Last Edit: January 25, 2013, 12:31:52 PM by RalfH »

FoodMan

  • Sr. Member
  • ****
  • Posts: 477
    • View Profile
Re: Best (cheap) way to perform texture unwrapping?
« Reply #3 on: January 25, 2013, 01:12:16 PM »
there is also this one

http://www.topogun.com/

but not free, and I don't think it can unwrap BIG meshes... (better for retopo'ed meshes)

Correctly unwrapping heavy meshes is indeed a problem...

f/

Infinite

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
Re: Best (cheap) way to perform texture unwrapping?
« Reply #4 on: January 25, 2013, 02:48:05 PM »
You can take it into ZBrush, Dynamesh it very quickly to retopo, re-project details then use UVMaster to create uvmapping for it. Lots of free tutorials on ZBrush website.

And ZBrush is cheap in comparison to most 3rd party apps for what you get.
_______________________________________________
I N F I N I T E
www.ir-ltd.net

RalfH

  • Sr. Member
  • ****
  • Posts: 344
    • View Profile
Re: Best (cheap) way to perform texture unwrapping?
« Reply #5 on: January 25, 2013, 03:22:56 PM »
Hello Infinite,

$700 is a lot of money for a tool which I only need very occasionally... and considering the time I would need to figure out how to do things properly, perhaps I should have asked a different question: would anybody be willing to unwrap the texture from this one model for me?

FoodMan

  • Sr. Member
  • ****
  • Posts: 477
    • View Profile
Re: Best (cheap) way to perform texture unwrapping?
« Reply #6 on: January 25, 2013, 05:22:48 PM »
or a cheaper alternative to Zbrush is http://3d-coat.com/

f/

RalfH

  • Sr. Member
  • ****
  • Posts: 344
    • View Profile
Re: Best (cheap) way to perform texture unwrapping?
« Reply #7 on: March 27, 2013, 07:21:58 PM »
Thanks to all who commented on this, and lots of thanks to Wishgranter who created a series of orthos which could be stitched to a full unwrapped image.

I went back to this issue about two weeks ago and decided I had to solve the whole problem again, mainly because it was extremely difficult to stitch the orthos in a way that would not distort the scale of the image or cause other problems. I now want to share with you how this can be done.

I decided to create an image not by unwrapping the texture but by unwrapping a dense point cloud, so I first exported a dense point cloud at ultra quality (883 million points, 36 GB including RGB colour). I also created a lower-resolution model (.ply) and used MeshLab to pick the positions of a series of pairs of approximately vertically aligned points. Then I started writing code: the point pairs are used to compute an average vertical vector. This is then used to rotate the dense point cloud accordingly. Then, the mid-points of the point pairs are projected to the now horizontal xy plane, creating a polyline along the sediment profile. Now, the distance of a point of the rotated dense point cloud from the new xy plane is the image Y coordinate, the distance along the polyline is the image X coordinate, the distance from the polyline (projected into the rotated xy plane) is a "DEM" type value, and the image xy grid is filled with the point RGB values. Two GPS points (averaging each thousands of one-second measurements) together with their positions in the model are used to scale the image grid. After two weekends and a number of evenings of thinking and programming and testing, the programme needed about 6 hours to go through the 883 million points, and then I finally had a metrically correct unwrapped image!
« Last Edit: March 27, 2013, 07:25:46 PM by RalfH »

Wishgranter

  • Hero Member
  • *****
  • Posts: 1202
    • View Profile
    • Museum of Historic Buildings
Re: Best (cheap) way to perform texture unwrapping?
« Reply #8 on: March 27, 2013, 08:49:30 PM »
Hmm, sounds interesting.. this is very nice solution.....
----------------
www.mhb.sk

James

  • Hero Member
  • *****
  • Posts: 748
    • View Profile
Re: Best (cheap) way to perform texture unwrapping?
« Reply #9 on: March 27, 2013, 09:48:28 PM »
Sounds great! I have a similar dataset, a dry stone wall circling an old church yard, and if I get time will try implementing your idea. It would be a personal project just for 'fun' though so will struggle to find any time at all, but i bet it would look good!

RalfH

  • Sr. Member
  • ****
  • Posts: 344
    • View Profile
Re: Best (cheap) way to perform texture unwrapping?
« Reply #10 on: March 27, 2013, 10:48:15 PM »
I could share the code. It's written in Visual Basic and needs some cleaning up, but it's probably better to start from that than to go through all the pain yourself. I'll also try to write up the process in a more extensive blog post, perhaps next week.
« Last Edit: March 27, 2013, 10:58:50 PM by RalfH »

James

  • Hero Member
  • *****
  • Posts: 748
    • View Profile
Re: Best (cheap) way to perform texture unwrapping?
« Reply #11 on: April 11, 2013, 01:14:00 PM »
That would be very kind of you thanks! I mostly use vb too :)

James

  • Hero Member
  • *****
  • Posts: 748
    • View Profile
Re: Best (cheap) way to perform texture unwrapping?
« Reply #12 on: July 09, 2013, 07:42:31 PM »
I couldn't find the code on your website but found time today to come up with my own solution, which unwraps the uv mapped mesh based on a path specified in the XY plane. It basically compares each vertex in the mesh to each segment of the path and gives it a new XY position depending on it's position along that path.

Attached below is the result, and this is the location (very nice area, going sailing there next week!): http://goo.gl/maps/ovKQQ

I hope I will also be able to share some of the work I have been doing lately with architectural orthophotos, but need to check permission with client/pm first.

GUS

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Best (cheap) way to perform texture unwrapping?
« Reply #13 on: October 15, 2015, 12:55:32 PM »
I was training with a frescoed barrel vault to studying for future applications in maintenance tasks of the paintings stamped on the intrados vault, so I would like to obtain the unwrapped model (UV unwraped mapping) of the textured vault which I have got previously with Agisoft PhotoScan.

I am trying to unwrap the UV unwrapped texture of the vault through Blender but I must to assess the accuracy to know if acceptable.

I ask to Agisoft support team and they told me the next workflow: build mesh in PhotoScan, export mesh, open it in Blender (or similar 3D editing application), create custom UV parametrization and apply to the mesh, import mesh back to PhotoScan, build texture using Keep UV option.
I don't know exactly how I should do to "create a custom UV parametrization to apply to mesh" into Blender (maybe it means I have to define a regular surface projection) but I don't understand why I have to "import mesh back" to PhotoScan and to "build texture in PS using keep UV option".
Agisoft support team told me they can't help me beyond this tips because they have experience enough in "UV mapping" and they recommend me to visit the forum where I saw your post.

Another idea about I was thinking, it was to unwrap a dense point cloud (XYZ coordinates) into UV mapping (XY unwrapped coordinates) but I didn't know if this was possible untill I saw a post of a user who got to "unwrap" a dense point cloud trhough Meshlab and VisualBasic codes.

Please, could someone help me to obtain the unwrap UV mapping of the texture of my beautiful vault model (or the unwrap dense point cloud)?