Make Your Own HDRIs

PhilWPhilW Posts: 5,139
edited August 2017 in The Commons

Have you ever wanted to create your own HDRIs but don't have the camera equipment or access to locations that you need? Or you want to use your own town as a backdrop to your 3D images?

I recently developed a process to convert panorama backgrounds in JPG format into full HDRIs with lighting information. Using this coupled with a program to capture Streetview panoramas means that you can now produce your own HDRIs of your own neighbourhood, your favourite holiday destinations or indeed, pretty much anywhere in the world where Streeview information is available. You can also use the HDRI conversion to enhance any JPG panoramas for use as Environments in Daz Studio, Carrara, Octane, or any 3D program which can use HDRIs.  I have made the following videos to talk you through the process.

Note that if you are using Streetview panoramas or other commercial JPG panoramas as the source, you can only use these for your personal use, you cannot resell them.

This process will not produce exactly the same as doing a genuine HDRI image using multiple exposures, but as most areas on a typical HDRI are actually within the gamut range that can be captured by a JPG or other Low Dynamic Range Image, you only need to add in the brightest lights to make a usable HDRI. You can also get creative with this technique!

I hope you find this process interesting and to be of use.

Post edited by PhilW on
«134

Comments

  • BlueIreneBlueIrene Posts: 1,318

    Thanks for taking the time to put this together and share, Phil :)

  • fastbike1fastbike1 Posts: 4,074

    @PhilW

    I have a question. Are we corrupting the meaning of HDRI with a process like this? The term is High Dynamic Range Image. I wonder if most people think it's High Definition something.

    My point being that I doubt that Streetview images are really High Dynamic Range. The typically accepted definition in CG is that it is a 32 bit image with at least 12 stops (EV) of lighting information.

    I don't believe that is true for the Streeview images.

     

  • PhilWPhilW Posts: 5,139
    edited August 2017

    The results from this process are High Dynamic Range Images, it is a process for adding the brighter lighting information back into a Low Dynamic Range Image, eg, a JPG. I agree that the results will not be exactly the same as a true HDRI capture, but for many purposes it will give a somewhat similar result.  Plus you can get creative with the technique. So I recommend watching the videos and see for yourself.

    P.S. I have amended the introductory text to reflect this. The results are a genuine HDRI - in fact you can push the lighting to ridiculously high levels should you want to.

    Post edited by PhilW on
  • dragotxdragotx Posts: 1,134
    Oh this is awesome, gonna have to give it a try when I get home
  • fastbike1fastbike1 Posts: 4,074

    @PhilW

    Thanks for the response. Good to know there can be more lighting information added. I confess that I was rendering and checking news, mail, etc so didn't look at the videos. Definitely will now.

    Again, thanks for posting the info.

  • IceDragonArtIceDragonArt Posts: 12,548

    This looks like it will be very useful!  And fun too.  Thanks for taking the time to put this together and show us how to do it.

    As far as corrupting the meaning, honestly, if someone says HDRI I think image with lighting.    If it has a photo and lights my scene to match the photo, to me, that is an HDRI whether that meets the above criteria or not.

  • This is exciting. I will definitely try to make some of these.

  • PhilWPhilW Posts: 5,139
    edited August 2017

    Here are a handful of examples, all with the same character, three use Streetview captured scenes with the lighting added, the fourth uses one of Flinks Skies, which are JPGs but this one has been processed to add light information to create the HDRI. They are only quickly put together but I think they show the potential. I'd love to see what you all can come up with!

    Promenade Des Anglais1.png
    800 x 800 - 724K
    SaudiSand1.png
    800 x 800 - 918K
    Tropical Beach2.png
    800 x 800 - 745K
    FlinksSky02.png
    800 x 800 - 575K
    Post edited by PhilW on
  • BobvanBobvan Posts: 2,652

    Thanks man I love using HRDI's

  • algovincianalgovincian Posts: 2,576
    edited August 2017

    Thanks for taking the time to post, Phil - I'll surely check out the vids in their entirety when I have more time. I've been playing around with an automated process myself for years now to "re-construct" a full dynamic range using different standard 8-bit sources. Like you say, the results are not the same as a true HDRI, but the ease of creation/editing (and the number of existing sources) makes it an extremely attractive option to me.

    Your examples came out great! If you, or anyone else, has any more examples of scenes lit and rendered using fabricated/synthesized HDRI, please post 'em as I'd love to see them!

    Here's an example of a character lit by one such HDRI I've made - not bad for a fake:

    - Greg

    Post edited by algovincian on
  • PhilWPhilW Posts: 5,139

    Algovincian - they look terrific!  I'd be interested to know how you did the HDRIs.

  • algovincianalgovincian Posts: 2,576

    I used a combination of some scripted 2D image manipulation (Photoshop) and processing done by convolutional neural networks. I've got the networks utilizing cuda cores to speed training (which is fantastic), but this makes the VRAM a major limiting factor (not so fantastic lol). It's a work in progress, especially for the general case, but as computing power continues to grow, so will the possibilities.

    - Greg

  • IvyIvy Posts: 7,156

    Hi Phil , maybe you already know this  But HDRlabs.com has a tutorial section on how to make your own free hdri's and they even offer free stock pano's images for you to make them with.  I use photoshop cs5 to make mine using a cannon sx 50 which hasa pano setting for shooting HDRi's

  • PhilWPhilW Posts: 5,139

    I used a combination of some scripted 2D image manipulation (Photoshop) and processing done by convolutional neural networks. I've got the networks utilizing cuda cores to speed training (which is fantastic), but this makes the VRAM a major limiting factor (not so fantastic lol). It's a work in progress, especially for the general case, but as computing power continues to grow, so will the possibilities.

    - Greg

    Wow - that all sounds very clever! What I am doing here sounds simple by comparison!

  • PhilWPhilW Posts: 5,139
    Ivy said:

    Hi Phil , maybe you already know this  But HDRlabs.com has a tutorial section on how to make your own free hdri's and they even offer free stock pano's images for you to make them with.  I use photoshop cs5 to make mine using a cannon sx 50 which hasa pano setting for shooting HDRi's

    Thanks - that covers making them from a camera, but with my method, you don't need any equipment or to have access to the location you want to capture. Actually you don't even need a physical location, you can turn any old JPG or other format into an HDRI, of course you may end up with a nonsensical image, but you can be quite creative.  I think each method has its uses. I have huge respect for people who capture "real" HDRIs on location and I don't think this competes with that, it is just a cheap and cheerful alternative - which can actually produce some really good results with a little care.

  • IvyIvy Posts: 7,156
    edited August 2017

    Hi Phil what you say is all true,  But you can apply the same technique using the camera images in the tutorials at HDRi labs with a Daz studio rendered image instead, just use a point of light as your sun source point for your HDRi, it helps if you add  solar flares if your planning  on using a bright sunlight.  . I have done it a few times for setting up scenes in HDRi's  for Daz Studio animation it helps for faster rendering than actually using a the full 3d set. when your trying to render a animation for a expansive setting.   I just use Photoshop to create & edit them,  that is why i had mentioned HDRi labs tutorials, as a alternative.  

    Post edited by Ivy on
  • PhilWPhilW Posts: 5,139

    Ivy - yes, I have done something similar with Carrara.  And with the Daz Studio spherical camera and using iRay Canvasses, you should be able to render direct to a panorama HDRI with the latest version.

  • IvyIvy Posts: 7,156

    Hi Phil. I almost forgot to mention you will need the photomerge plugin UI for photoshop for your version of Photoshop you maybe using.to stich together & create panorama images   with daz studio renders. unless you have photoshopCC, then I believe the plugin comes with the CC version.    I have been using  "PS cs5 3D extended"   to stich my images together to make panorama images out of daz renders to make HDRi images in Photoshop.  I do this to use as back drops in my animated films, it's really simple and great way to match your scenes,  the good thing is once you save it as a Panoramic image or HDRi  you can use them in other software that can read HDRi files  Sometimes you will have to adjust the dome scale a little to match the software and play with lighting scales  but really I found this the best way to create match Panormaric scenes & HDRi for projects I have been working on using Daz studio images. to use as HDRi in Daz Studio for animations back ground. I don't have carrera. But i would assume the HDRi's will work for it as well.

  • algovincianalgovincian Posts: 2,576
    PhilW said:

    I used a combination of some scripted 2D image manipulation (Photoshop) and processing done by convolutional neural networks. I've got the networks utilizing cuda cores to speed training (which is fantastic), but this makes the VRAM a major limiting factor (not so fantastic lol). It's a work in progress, especially for the general case, but as computing power continues to grow, so will the possibilities.

    - Greg

    Wow - that all sounds very clever! What I am doing here sounds simple by comparison!

    Nothing wrong with simple, it's probably better! Your results look good to me. I particularly like the image with the white sands and boats - her shadow in that one looks especially interesting.

    - Greg

  • AllenArtAllenArt Posts: 7,142

    Thanks! This looks like fun :)

    Laurie

  • mindsongmindsong Posts: 1,693
    edited August 2017

    Wowzer! Phil,

    Thanks for humanizing this seemingly confusing procedure.

    FWIW, the same technique works with Bryce images if you get Horo/David Brinnen's spherical mapper camera lens product, or if you are willing to fake the sky and ground from native Bryce cylindrical panoramas, or if you glue together a 6 shot cube render (1 shot for each direction) as you could from any scene rendering tool. Byce can also export what I would call a "MDRI" if you know the 'tricks', which is a partial-range HDRI saved in the full-range HDRI format, but has an extended light response range (relative to a normal png or jpg). While this information sounds like the source of more questions than answers, Horo, over at the Bryce forums has an excellent set of tutorials that cover these techniques on his web site:

      https://horo.ch/photos/intro_en.html

    And many helpful tips in the bryce forums, if you can search them out. There are some relevant (bryce-specific) videos at:

      http://www.bryce-tutorials.info/

    I'm certainly *not* trying to hijack this thread with Bryce marketing... (I use Bryce, Carrara, DS, and Poser  - all equally badly)  but appreciating that the *approach* that all of these tools take to making custom spherical and cube backdrops and HDRI to match those backdrops is pretty 'doable' once you see what Philw, Horo, and a few other generous folks have put together for us. The one point of confusion that I still struggle with is the different formats of the HDRI, and which rendering programs perfer which, and how I can tell if I'm using the right one for each context (e.g. DS UberEnv2 uses one, IRay uses another, light-probes and angular maps differ, but can probably be converted, etc.) I've saved large numbers of howto posts, but need to simply study it to get it under control in my toolkit.

    As Ivy indicates, the same ideas can be used with photos as well, and even if any/all of these tools are 'cheating' pure HDRI light range accuracy in most cases, they can be made to work really well too. Horo has a great fun set of completely fabricated HDRI from his Bryce tools that can be used to generate some great effects, proving that there are no limits to what we can do with these ideas! Note that the creation of HDRI from photos is documented all over the net, so my (and Philw's ?) emphasis here is in helping get our own rendered worlds and backgrounds into to our renders and animations for the results we want and faster rendering!

    cheers to all, and thanks a bunch Phil (and Horo/David) for taking the effort to en'light'en us all! Beers to you guys (everybody, go buy a product from them! Philw - Horo - DaveBrinnen)

    cheers,

    --ms

    Post edited by mindsong on
  • hacsarthacsart Posts: 2,025

    I do something similar, but use mcasuals HTML5 script  ( https://sites.google.com/site/mcasualsdazscripts5/anywhereintheworld ) - it generates the panoroam image. I then take that jpg into Picturenaut (its free - http://www.hdrlabs.com/picturenaut/ ) to convert to 32 bit and then save as HDR. In Studio, I use Uberenvironment 2 and use the HDR to TIF converter and use the TIF as the light color source for Uberenvironment. (you can also use the .hdr, I think)  Some tweaking of light intensity may be needed as well.. (and a shadow catch plane is useful, too..)  There are probably other approaches that would work, too..  attached pic is a Streetview pan  of Monte Carlo..

    One thing to watch out for is the blurring that Google puts on some signs , etc..

    m4_bond_dbs_hdri_1.jpg
    1680 x 1050 - 1M
  • BobvanBobvan Posts: 2,652
    edited August 2017

    This actually works well for maps that look wahed out from ibl labs thanks

    Post edited by Bobvan on
  • BlueIreneBlueIrene Posts: 1,318
    hacsart said:

    I do something similar, but use mcasuals HTML5 script  ( https://sites.google.com/site/mcasualsdazscripts5/anywhereintheworld ) - it generates the panoroam image. I then take that jpg into Picturenaut (its free - http://www.hdrlabs.com/picturenaut/ ) to convert to 32 bit and then save as HDR. In Studio, I use Uberenvironment 2 and use the HDR to TIF converter and use the TIF as the light color source for Uberenvironment. (you can also use the .hdr, I think)  Some tweaking of light intensity may be needed as well.. (and a shadow catch plane is useful, too..)  There are probably other approaches that would work, too..  attached pic is a Streetview pan  of Monte Carlo..

    One thing to watch out for is the blurring that Google puts on some signs , etc..

    I'm absolutely wired with ideas over this thread - thanks again Phil for starting it. I'd already considered Bryce and the spherical mapper before it got a mention but it's that long since I used the mapper I've forgotten how. I was about to chase this up when I looked at the thread again. Picturenaut looks to have so much potential that I've downloaded it and am about to read the pdf. I will pick a direction eventually(!), but I love how the thread has attracted other suggestions and solutions too, so thanks go to everyone who has contributed those as well :)

  • fastbike1fastbike1 Posts: 4,074

    Dang Phil, those "quickies" really look good.

  • redvantredvant Posts: 5

    Thank you so much for sharing! My brain is tingling! Now that DS has 360 spherical rendering, wouldn't it be possible to take a render of a really cool background environment from DS, and basically do what you did in PS and import it back into DS as an HDRI? You could have accurate lighting that matches the background. Of course, it may take some tweaking to get the proper lighting. However, you would be able to focus on your primary subject/object and cut rendering time down considerably, and reuse it for another render if needed.

  • PhilWPhilW Posts: 5,139

    I think (although I haven't tried it yet!) you could just render an HDRI panorama straight out of Daz Studio, using the spherical camera as you mentioned and also using iRay Canvases which are HDRIs. I'm going to have to go and try it now!

  • BlueIreneBlueIrene Posts: 1,318

    Experiments with background images aren't going very far here - I was never going to go for the Google thing, mostly due to wanting to create resources I can use with no restrictions, Bryce has render width restriction of 4000px (far too small) and rendering anything too involved at a sufficiently high enough resolution for background detail in DS is a bit much for my poor humble computer, although I've done some with a bit less detail that could be blurred a bit and used in some circumstances. Come to think of it, better results probably come from rendering at final size and reducing image maps by half using the Scene Optimiser product rather than rendering at smaller size with full size image maps and resizing the finished render. I tried a render at full size with the scene optimiser last night and couldn't see much wrong with it, but I haven't got round to doing anything with it yet.

    This is because it turns out that creating hdr light probes and hdr skies in Photoshop from images I've created myself using cloud brushes etc is an absolute doddle. I hadn't realised it was that easy, and it's good news because it means no more struggling with really dramatic skies that compete for attention with what I'm trying to make the focus of an image, and no more having to buy light probe sets that I know I'll only use a few from, none of which are quite what I wanted anyway. Brilliant stuff :)

  • algovincianalgovincian Posts: 2,576
    edited August 2017
    PhilW said:

    I think (although I haven't tried it yet!) you could just render an HDRI panorama straight out of Daz Studio, using the spherical camera as you mentioned and also using iRay Canvases which are HDRIs. I'm going to have to go and try it now!

    Can definitely be done - used canvases to create an HDRI in DS last year (although before the spherical cam was introduced):

    https://www.daz3d.com/forums/discussion/102841/efficient-rendering-practices-iray

    Astracadia brings up a good point about rendering & resources. Rendering an HDRI of an environment, and then using that HDRI to light/render characters can ease the load on hardware by splitting up the environment and characters. This was the whole rationale for going through the exercise last year.

    Also, you can make larger files by rendering multiple views and stitching. This bypasses DS's max file size. In that example, I rendered 22 2048x2048 frames to produce the 60 million pixel file, but there is no real limit using this technique.

    - Greg

    Post edited by algovincian on
  • marblemarble Posts: 7,449
    PhilW said:

    I think (although I haven't tried it yet!) you could just render an HDRI panorama straight out of Daz Studio, using the spherical camera as you mentioned and also using iRay Canvases which are HDRIs. I'm going to have to go and try it now!

    That sounds very interesting too. I've often thought that it would be handy to have an HDRI of an interior scene which could be used as the background for animations. The fewer lights and geometry in a scene to be used for animation, the quicker the render (which is all-important if there are hundreds of frames to render). 

Sign In or Register to comment.