Alex's Texture Scans

polycounter lvl 7
Offline / Send Message
m4dcow polycounter lvl 7

I decided to try my hand at capturing textures with a cross polarizing light setup and this was the result of todays test.



I generated albedo, normal and specular/roughness maps.

The relevant equipment I used is as listed:
  • Canon 7D
  • Canon EF 28mm F1.8 USM
  • B+W Circular Polarizer
  • Canon 430EX II Flash
  • Manfrotto 055XPROB Tripod
  • 1 Sheet Linear Polarizing Gel
  • NEEWER 160 LED CN-160 Light (Cheap Shit)
  • Remote Shutter Release
  • Threaded Light Stand
  1. I setup my tripod to full height and used this cool feature where you can convert the stem from vertical to horizontal, so I could shoot downwards.
  2. I then got a small square table which I put a plain black piece of cloth onto so I can have a nice matte background, and be able to tell when my the cross polarization works.
  3. I cut a few pieces of the polarizing gel so it would fit onto my led light and over my flash using cardboard and duct tape.
  4. I dial in cross polarization by using a coin or washer, as I adjust the reflected light from the coin changes, when it is at it's darkest you're set, you can also see the matte cloth go dark too.
  5. My first shot is the using the flash only cross polarized, then I rotate the gel on the flash 90 degrees to get the second shot (I set the power low to sort of match the led light).
  6. Next I use the light only, I have it pointing down at angle, I take 4 shots moving the light around in a circle so I end up with a bottom, left, top, right, then I rotate the gel and repeat. (Each time I position the light 90 degrees the shot goes into or comes out of cross polarization, so the order of images I end up with is bottom-pol, left-spec, top-pol, right-spec I rotate the polarizer on the light 90 degrees and then get bottom-spec, left-pol, top-spec, right-pol).

I am left with 10 images, first I bring them into photoshop, label and stack all into a single file (I should have brought into lightroom and done lens corrections etc).

Then I extract the specular of each direction by overlaying the image with highlights over the one without highlights (cross polarized) and setting the layer to difference.


As you can see, it isn't perfect at A I get weird hue shifts where the leaf colour varies and overall I go not much value at B due to angle of the lights/curl in the leaf, the room was also pretty dark, so there wasn't much other light contaminating the scene.

I do this for all 5 directions, and then I desaturate and blend all the channels together using a lighten. to get my specular and invert for roughness.

I generate my normal maps using the maps except for the frontal using the method shown here http://www.zarria.net/nrmphoto/nrmphoto.html
Because I split out the specular fairly cleanly, this method actually works decently for objects with different colours along a contiguous surface.

For the Albedo, I blend all the 5 cross polarized images using lighten.

I brought my albedo, roughness and normal into substance designer so I could tweak things. I did have to brighten the albedo a bit I'll get a colour chart to do this more accurately in the future. It is important to not blow out the highlights on the specular images, so I rather under expose the albedo, than screw up the normal and roughness.

My take aways are to get a colour chart, experiment with the light angles/softboxes, get some strong double sided tape to flatten those fucking leaves out. Ideally I would get a few more lights and stands so I could just turn the lights on and off as I need rather than re-positioning each shot.

Where I currently live there are a wide variety of interesting plants and as I refine my process I'd love to share them, maybe throw them up on gumroad or something like that.

Replies

  • allengingrich
    Offline / Send Message
    allengingrich polycounter lvl 2
  • tomenjerry
    Offline / Send Message
    tomenjerry polycounter lvl 3
    looks like an interesting thread! definetely going to look into the normal creation technique, looks interesting! keep it up
  • m4dcow
    Offline / Send Message
    m4dcow polycounter lvl 7

    Thanks. I did some experiments with regards to my specular stuff and the missing highlights were due mostly to the angle of the light. So I'm going to try to do a 45 degree angle, and an almost 90 degree angle (a bit less to avoid self shadowing).

    I've ordered a few more things, including some plastic material for me to make holders for the linear polarized gel. so they can slot into the front of the led lights. I figure by rotating the filter for each position, I make sure the light is in the same exact position for the cross polarized and specular shot, and I move the light stand around half as much, so less chance of bumping something and having to start over.

    I'm also going to shoot tethered in lightroom, even though I have a shutter release cable (The short one) because the tripod is in the horizontal position the setup is very bouncy even the slightest tension difference on the cable has it moving.

    I'm also ditching the flash for the time being, and instead lighting the frontal shots with 2 of the led lights. The flash isn't really able to give me the even coverage I need throughout the whole frame, but that setup is still decent for field capture.

    When I get the new gear I'll post results and picture of the setup for anyone who's interested.

  • tomenjerry
    Offline / Send Message
    tomenjerry polycounter lvl 3
  • m4dcow
    Offline / Send Message
    m4dcow polycounter lvl 7

    So I got more equipment in a few days ago, and here are my results with the new setup. The specular setup still has some issues, but at the very least the cross polarized images should be of use.

    This is part way through the process of making holders for the linear polarizer gel, basically it stiffens up the edges so I can put it in the light filter holder easily and thus be able to rotate them easily.

    And here are a few shots of my setup (pardon the crappy cell phone pictures).

    This is my "frontal" shot, the lights clamped on the bottom aren't being used for these.

    And here is my Top/Bottom setup

    Here's a dropbox link with png versions of the Albedo, Roughness and Normals.

    https://dl.dropboxusercontent.com/u/10105386/pc/160410-Scan.zip

    Let me know what you think.

  • m4dcow
    Offline / Send Message
    m4dcow polycounter lvl 7
    Did another one tonight, but I noticed that my double sided tape was showing through. So I have to be careful with thinner leaves. I also ended up using the frontal albedo shot since I noticed in my last set it came out a bit splotchy because of the blending.
  • dzibarik
    Offline / Send Message
    dzibarik polycounter lvl 4
    these looks sick. I want to scan some vegetation too, so this thread will be helpful.
  • PaulH
    Offline / Send Message
    PaulH polycounter lvl 6
    Hey man, are you still experimenting with this stuff? The results are excellent, and I'm looking for an alternative to Megascans.
  • m4dcow
    Offline / Send Message
    m4dcow polycounter lvl 7
    PaulH said:
    Hey man, are you still experimenting with this stuff? The results are excellent, and I'm looking for an alternative to Megascans.
    I haven't been doing much with this lately, I kind of got stuck on how to generate or capture height and/or displacement maps.
    I also need to test a few other ideas I have for lighting.

    So hopefully when I get more time I'll pick this back up.
  • Elithenia
    Online / Send Message
    Elithenia interpolator
    Just a quick note when dealing with calculating specular (difference between lit and cross polarized), this NEEDS to be done in linear space, otherwise, because of the increased range between light and dark values in sRGB space, you will get an incorrect end result.
  • m4dcow
    Offline / Send Message
    m4dcow polycounter lvl 7
    Elithenia said:
    Just a quick note when dealing with calculating specular (difference between lit and cross polarized), this NEEDS to be done in linear space, otherwise, because of the increased range between light and dark values in sRGB space, you will get an incorrect end result.
    So I actually hadn't thought too much about that since I was just happy to get a somewhat greyscale value from actual photos. I did however do my photoshop work in Adobe RGB colour space which is what the camera captures, and export 16bit textures but I suppose that also has some sort of gamma curve that will give an incorrect output.

    So I'll definitely keep linear colour space in mind going forward, and TBH I was adjusting levels on the specular to get it to behave how it did in real life and that is probably the issue right there :pleased:
  • m4dcow
    Offline / Send Message
    m4dcow polycounter lvl 7
    So finally got around to capturing some images with my new scan setup. I am using some of the new scan processing features in Substance Designer 6 to speed up output of my different maps.

    There are a few things I need to play around with on the capture side, but things are a lot easier compared to the last setup.

    Here are a few results running a few images quickly through the graph to prototype things.


  • m4dcow
    Offline / Send Message
    m4dcow polycounter lvl 7
    Here are a few more results, rendered in marmoset.

    I'm still playing around with methods for generating the alpha masks for these. I should try to have similar colored leaves in the same capture but then these cases where I have crazy colored leaves where the spots want to clip through pose a problem. Ultimately I think I'll end up doing some cleanup on a few of these but I'll have to see how this does for more complicated things like ferns.

    I also captured backlit versions of some of these things, but not sure how to use those just yet.

    On another note, Substance Designer's new multi-angle to normal node works damn well, even on the multi color leaves. The multi angle to albedo works okay, but since I'm already shooting cross polarized shots to derive roughness values I'll continue to use those for my albedo.
  • m4dcow
    Offline / Send Message
    m4dcow polycounter lvl 7
    I figured I would show a few pics of my current setup.

    I have a sort of scaffolding made out of PVC pipe, which I can quickly clamp on my lights and there are 2 crossbars on the top where I mount the camera and another light. Right now the setup is 3ft cubed, but I can just cut longer PVC to be able to capture larger subjects light palm fronds, I probably won't go past 6 ft since i don't have room for much more than that. The lights are super bright cree XHP70 LEDs (I got high CRI versions also) which I mounted on aluminium heatsinks which are 1/4" threaded on the back. I found that LEDs without reflectors or lenses throw out very wide and surprisingly even lighting. I made filter holders out of some aluminium channel which end up holding a layer of diffusing material and a piece of linear polarizer.

    I have a piece of translucent acrylic which the subjects are set on, and this is raise up from the floor so i can have a light for the backlighting, so far the translucent acrylic might be too transparent and I end up having to lower the light intensity, I might just try regular "opaque" white sheet to see if it does let some light through, it is also easier to get my hands on.


    I have my camera mounted in one of those video cages and made some braces so the rig can sit on top of the 2 spans. I have the light clamped onto one of the spans and placed as close to lens as I can.


    I'm using this Sony prosumer camera mainly so i can zoom in and out as needed since i don't have a suitable zoom for my canon 7d. I am using a linear polarizer instead of a circular, the drawback is autofocus doesn't work very well with it, but the retarder on circular polarizers that allow metering and autofocus to work result in clipped values when i subtract the cross polarized image from the specular one to derive my roughness/gloss.
    I have one of these adjustable rubber gears that people use for follow focus rigs, I thickened the front element that rotates by wrapping a bunch of thin vinyl tape so when i move the handle, it only rotates that front element.

    Instead of rotating filters between cross polarized and specular shots (which i would have to do on all 5 lights I just rotate the polarizer on the lens. I run the risk of moving the camera between shots but since my lights and camera are mounted to the same frame turning 5 filters like before would probably result in the camera moving due to light filter adjustments rather than camera filter ones.

    I use coins or metal to verify I'm in a cross polarized position, I mark that point and rotate 90 degrees to to get the full specular effect I mark that point too so when I shoot I can just move the filter between these points quickly.


    I shoot tethered to a laptop to avoid bumping the frame. My lights are powered by a lab power supply so i can have the flexibility of varying voltage and current to the lights.


    I had fun wiring this little control box, it allows me to switch between each light easily using the rotary switch, I only have a 2 way switch on the front/back because I couldn't find a rotary switch with more positions to accommodate.

    On my recent set of captures, I took bracketed shots 3 per bracket 1EV, next time i'll test out doing 2EV, I did this because the specular shots are easy to blow out, and if that happens the normal detail that you derive from those areas are useless.

    It is a pain in the ass to sort out these files normally, but bracketed its even worse. So I try to keep the same shot order for every set and move those into separate folders as I go.

    I also got a colorchecker, and I shoot my first shot using that and maintain the lighting intensity as I go, so later on I can color correct all my images with 1 profile.

    Pheww that was a long wall of text, if you have any questions or suggestions, let me know.
  • m4dcow
    Offline / Send Message
    m4dcow polycounter lvl 7
    So the ferns turned out decent, I do have an issue where one of them was over where the reflection from the frontal light was and I'm getting weird fringing. The solution I guess would be to avoid putting the intricate foliage in that spot, or maybe put some matte material over the acrylic like tracing paper.

    I'm still trying to work out the opacity generation hopefully when I go through some of the other scans I can come up with something decent.

  • m4dcow
    Offline / Send Message
    m4dcow polycounter lvl 7
    Here are some more, the alphas still suck but I'm also linking a zip file with some jpg versions if anyone wants to check out the files themselves.

    https://www.dropbox.com/s/de4u2f3bgcsydmr/HeliconiaLeaves.zip?dl=0
  • trendtb
    Hey Alex,

    Sweet work with the scans. I've been working on a head scanner (and in progress body scanner) myself, and have been considering setting up a little system for materials, plants and potentially another for small props as well.

    Have you considered diving in to arduino to automate the capture process? My thinking here is, depending on your camera capture software, you could easily write up a script (Python) that handles all of the exposure bracketing, and sync that up with an arduino controller that alternates the various lights that are on/off.

    I haven't any experience on the arduino side but have been investigating it a fair bit for the body scanning stuff, seems fairly doable?

    I also moved over to digicamcontrol for the camera software, which has a tonne of flexibility for the automation side.

    Thoughts?
  • m4dcow
    Offline / Send Message
    m4dcow polycounter lvl 7
    trendtb said:
    Hey Alex,

    Sweet work with the scans. I've been working on a head scanner (and in progress body scanner) myself, and have been considering setting up a little system for materials, plants and potentially another for small props as well.

    Have you considered diving in to arduino to automate the capture process? My thinking here is, depending on your camera capture software, you could easily write up a script (Python) that handles all of the exposure bracketing, and sync that up with an arduino controller that alternates the various lights that are on/off.

    I haven't any experience on the arduino side but have been investigating it a fair bit for the body scanning stuff, seems fairly doable?

    I also moved over to digicamcontrol for the camera software, which has a tonne of flexibility for the automation side.

    Thoughts?
    Hey Trent thanks for the kind words.

    Initially when I was trying to figure out a method for rotating the polarizer I looked briefly into automated stuff like arduino and it honestly scared me off, although the example I looked at was to do with a constant follow focus sort of rig with 2 servos which is more complex than just turning lights on or off. My system is fairly simple at the moment so i don't think it really warrants much arduino stuff for now.

    The digicamcontrol software looks pretty cool though, before with my 7D I was simply doing tethered capture through lightroom, the rx10 III I'm using now has some of it's own capture software but it's basically a glorified remote shutter because It doesn't even have any sort of preview or histograms.

    I still have a ways to go and a bunch of stuff to test out with this setup but hopefully I can get there.

    Good luck with your head and body scanners, sounds pretty cool.
  • trendtb
    Makes sense on the arduino front. I just picked up an arduino nano experimenters kit, it is surprisingly more straight forward than I thought it would be. If I do anything of interest with it I'll be sure to let you know and will share any findings!

    digicamcontrol is pretty sweet. I was using SmartShooter as well for a while, but digicamcontrol is open source and free. It also has the built in options for focus stacking and exposure bracketing as well which you might find useful. Worth checking out if you get the time.

    As with all things, this stuff seems to take a lot of trial and error :smile:.  Good luck with it all!
  • pachermann
    Offline / Send Message
    pachermann Polycount Sponsor
    wow impressive!
    would you make a build guide so i can rebuild it :D ?
  • m4dcow
    Offline / Send Message
    m4dcow polycounter lvl 7
    wow impressive!
    would you make a build guide so i can rebuild it :D ?
    Is there anything in particular you want to know?
    When I get some time I can go though any of that in more detail.
    Been playing Breath of the Wild, which has eaten up a chunk of my free time.
  • pachermann
    Offline / Send Message
    pachermann Polycount Sponsor
    i would love to rebuild this for scanning custom stuff.
    you could sell the scan kit making tutorial on gumroad or so :smiley:
  • Tomiajayi
    Offline / Send Message
    Tomiajayi triangle
    Funny note.  Cgi is getting so good these days, I took a quick look at your first pic and was like "hmm those textures are not very good.. looks pretty fake" 

    hahahaha
  • Tomiajayi
    Offline / Send Message
    Tomiajayi triangle



    Funny note.  Cgi is getting so good these days, I took a quick look at your first pic and was like "hmm those textures are not very good.. looks pretty fake" 

    hahahaha
  • m4dcow
    Offline / Send Message
    m4dcow polycounter lvl 7
    Tomiajayi said:



    Funny note.  Cgi is getting so good these days, I took a quick look at your first pic and was like "hmm those textures are not very good.. looks pretty fake" 

    hahahaha
    Haha, yeah shitty pictures not textures.
  • ElasticMango
    Offline / Send Message
    ElasticMango polycounter lvl 2
    Wow your scans look really great! A buddy of mine and I are currently working on our own scanning solution and are wondering on how to extract height information. We're basically working with the same setup, different lights and crosspolarized images.
    Do you have an idea on how to do that or are you still pondering that yourself?

    Just wanted to say how inspiring and helpful it has been to see your progress!
  • m4dcow
    Offline / Send Message
    m4dcow polycounter lvl 7
    Wow your scans look really great! A buddy of mine and I are currently working on our own scanning solution and are wondering on how to extract height information. We're basically working with the same setup, different lights and crosspolarized images.
    Do you have an idea on how to do that or are you still pondering that yourself?

    Just wanted to say how inspiring and helpful it has been to see your progress!
    Thanks man, right now I'm just using substance designer's normal to height high quality, so it isn't totally accurate but is pretty decent. I'm always looking for alternate methods but that's where I'm at now.
Sign In or Register to comment.