Efficient Rendering Practices (Iray)
algovincian
Posts: 2,664
I've been taking a detour from my usually scheduled program (NPR/3DL) as I've been asked to render some hi-res panoramas in Iray. Admittedly, I have little experience rendering in Iray, so I've got no established workflow. The first option is to render at higher resolutions and pull the plug on them rather quickly. This results in lots of noise (obviously). The alternative is to render at lower resolutions, but let them cook for the same amount of time. The comparison to be made is the lower resolution image vs. a downsampled version of the higher resolution image. Does anybody have any thoughts/experience with this?
There are, of course, considerations other than image quality that need to be taken into account (VRAM usage, etc.). I've also been working on a post processing workflow designed to work with the first approach above. The brightest fireflies are not handled by downsampling alone, so I'm working on a noise reduction algorithm specifically designed for this. Here's an example:

And here's a small version of the finished render:

In this case, the full size image was roughly 60 million pixels. Once I've got the workflow down, I'll be shooting for one that approaches 1 billion pixels - woot!
Any different approaches or thoughts that anyone has on the subject would be most appreciated! I also would like to confirm that distributing this render for use as a texture on a skydome, or as an HDRI is legally OK? Thanks in advance.
- Greg

Comments
Both work, and it is possible to get a fater render by reducing the size of a render with a lower number of samples.
Due to the increase in render times for larger images, sometimes the difference is very little. One aspect though, is when a few fireflies are being persistant. Then it can help, but then again, fireflies can be more than one pixel and the reduction in size doesn't get rid of them.
You might be thinking after this, that you need to test it out; you'd be right. :)
I can't comment on the legalities of distribution; we are allowed to use renders for commercial purposes, but have no clue of any special exclusions. Hopefully a mod will stop by and comment.
Oh, and please excuse the poor stitching there (which you can see in the column) lol. Being just a preliminary test, I didn't bother removing any outlier control points before optimizing - doh!
- Greg
Can't comment on the legality, but I feel it is kinda crappy to use/make a product to take away from further purchases of the original product, free or pay. Most scenes, cityscapes, environments, etc are meant mostly for background purposes anyway and to use them to make another backgroud does take away the need to have the original in some way.
Seems to me that I have seen some DAZ sets used to create 2D backgrounds sold elsewhere. Pretty cheesy practice, and I would never buy such a thing.
Wait, how is this done? Are you rendering multiple sections and patching it together after? iRay doesn't have a spherical camera yet (though it is coming and apparently vr camera too).
As for quality, I've never found that downsampling a higher res images works at all. I've seen some blogs mention it. AFAICT, it only works if you stop rendering BEFORE you achieve the quality you want. IOW, early in the render when it's still grainy. But once you start getting decent results, rendering at a higher resolution (with the purpose of downsampling) actually yields worse results than just rendering at the resolution you want. This is my personal experience. Perhaps others may have been able to get different results.
That's good Ostadan, because I'm not selling anything. My intentions were never to do anything "crappy", or "cheesy", or whatever else anybody may choose to say. The only reason I'm even involved is because the guy I'm helping can't even come close to getting the scene plus the characters into the VRAM on his video card. Both John and I have purchased the Old London set.
It does bring up an interesting discussion, though. It's been suggested to me in the past (by a PA as a matter of fact) that I should use my NPR algorithms to render sprite sheets to sell to people making video games. For those that may not know, these are frames of character animation rendered with a transparent background for use in 2D games.
I never ended up doing this, but using similar logic, would this be a crappy thing for me to do because it takes away the need to buy the original in some way? Like nicstt said, maybe we can get a mod to chime in.
- Greg
Yeah Alien - I wrote scripts to handle rendering the multiple frames. In this case, I rendered 22 2048x2048 frames to produce the 60 million pixel file. I set each frame to stop after 50 iterations. This was way before the quality I wanted to achieve, but potentially OK because it was higher resolution than the end target, and hadn't gone through the HDR and noise algorithms yet.
To me, this approach makes sense because I believe Iray has diminishing returns as the render cooks longer. Maybe I'll do some formal testing on this if I can find the time.
- Greg
I never really understand arguments such as these because in most cases artists are using those sets that they buy to make 2D art for others to use are making them for people who would never think or even want to try and make any art themselves in DAZ Studio or any other such program. They want the 2D art to use like they would any other stock image. That is one of the purposes to having it stated in the EULA that we can do anything we want with our 2D representations of what we make. We provide a service to those who would never dream of even attempting to create anything in DS. And, in doing so, we aren't taking anything away from the vendors who make the sets that allow us to do that. There is more to creating a 2D image than just taking a picture of a set to use as a background. We add lighting, figures, shaders, and a ton of other things that influence what any particular set looks like in the final image. And, it's that final image that people are willing to buy or use depending on the circumstances. It's what we created and how we interpreted the scene that is selling what we did. I fail to see how creating the HiRes Panorama with Old London, which by the way looks amazing, is any different than creating a 2D piece of art that gets sold for someone to buy as a backdrop to their website or used for some other purpose. I guarantee there is a whole lot more that goes into making it look that good than just slapping it together in DS and then putting it together. Even having Old London or some other set, not just anyone is going to be able to duplicate what Greg did.
Going by the logic that creating a background image using a background set is something we should NOT do means that a ton of images that are made here in DS and then sold as stock is cheesy and crapy and shouldn't be done even if said image looks totally different than the original set due to the artists interpretation and use of said background. Fogive me, but I fail to see how creating a HiRes Panorama is a bad thing.
knittingmommy, I can see the point you are trying to make and in some cases I kinda agree (combination of products to produce an original image), but i have seen way to many items in stores that don't go into the depth of creating as you mention, they simply loaded the scene, added a light, rendered, and put it in a marketplace. To me this is the same as loading up V7, rendering her in different angles and then using those renders to create you own skin for V7 and selling it as a character or a merchants resource which I am pretty sure is not allowed thru DAZ.
If a user asked me to make a render of a stonemason or firstbastion scene so they could use it as a background for their render i would decline and give them a link where they could get the actual product for themselves, regardless of their situation (slow computer, not used to DS, etc)
i have been involved in commercial 3D for awhile (here and elsewhere) and have seen way too many misuses of products and too many that try to make a buck off others hard work, so I am a bit jaded and this makes me see the extremes of what can happen in many cases which is why I brought it up. I am not saying that is what was happening here, just making a point is all. I also tend to see things from a commercial aspect and not a customers aspect
There are more than enough users to shout in favor of customers and their percieved rights, but not nearly enough to stand up for commercial creators.
A little common sense. I think that is not directly sell a product like yours. It is selling an image created by oneself. If someone is selling a product or parts of a product as own, it is clear that it is wrong and is skipping the law. But I think we all understand that is not the case.
All of us, amateurs or professionals, are creating own images and it is understood that the resources of DAZ and PA's in the same way that a photographer uses any real resource to generate their images are used. As an example, imagine a picture of a girl in Denim drinking coffee. The picture is beautiful, perfect, a great photographer's work. Now it turns out that the photographer does not have rights to the image and work because the coffee pot that appears is the manufacturer X, the Denim pants brand Y, kitchen furniture brand Z ... etc ?. What is the difference on a product from another if is picture or drawing? If you draw it is not the same product from another if photographed? Where we put the boundaries?.
I think that using common sense we can understand that is not the same selling a another one product as your own stuff that to sell an image created by you where appear products that you have not made them. If so, the whole world of advertising, film, photography, graphic design, ... etc. It would be unworkable. This I understand the laws internationally.
If someone is so crappy to sell a simple direct image of a product can not then claim any copyright about the image, because anyone can easily reproduce that exact image with your own resources.
This is already happening, at least in Europe with the reproduction of images of ancients paintings. You can not have rights image reproduction of a painting that is not yours, but you have it about a photograph made by you of that picture. The problem is that images are so simple that anyone can do an equal image of that picture and have image rights on their own copy. And probably here we are speaking about industrial resources and not artistic creations. As speaking of a car image or a chair image.Probably the governing law these resources is a industrial legislation than laws about artistical works.
Otherwise we will all end up making our own resources and DAZ store and others shops would end closing for lack of sales. I think we all understand what is right and what is wrong. A little common sense. And in cases of doubt always remain the courts.
Maybe all of us should understand that these kinds of people have confused their profession or hobby and what they really are is pure sellers but not creators.
Algovincian, I think the number of samples/amount of time you render an image depends on the scene as well as the intended use. I've found letting an image render longer can make a big difference if there are highly reflective surfaces involved. I've also had images get lighter with longer renders, which really helps if the image is somewhat dark to begin with.
I don't have an Nvidia graphics card, so all my renders are CPU only. When I'm ready to render a final image, I'll set the Max Samples to the limit of 15000 and let the image render while I'm sleeping. (I've been known to let an image render for days... I really do need a new computer, with a good Nvidia card...)
Huh really that's cool where did you hear this exciting news?
Over-lighting the scene may also help Iray build up it's samples quicker.
Then pull the image back with tonemapping.
As I stated before, both John and I have purchased the set. Regardless, I guess I'll simply tell him he is SOL and I won't let him use the .hdr I created (which I was not getting paid for, btw). I'm the one that suggested DAZ in the first place, and I'm sure this will leave a bad taste in his mouth. He was frustrated enough to begin with (which is why I tried to help in the first place), and knowing him, I doubt he'll ever buy anything from DAZ again.
On a more progressive note, how about listing minimum and recommended hardware specs for products? This is common practice in the software world.
- Greg
BTW, I would still be interested in hearing DAZ's take on this discussion. (insert crickets here)
In my limited experience using Iray, I have already noticed exactly what you're talking about as far as highly reflective surfaces, as well as renders brightening up in general the longer they cook. This is good general info!
- Greg
I'm already rendering out 32 bit .exr files and tonemapping via a custom algorithm in post. I'll experiment with increasing the "Environment Intensity" parameter, or the numerical value attached to "Environment Map", to see if this results in less noise for a given amount of samples/time. I assume this concept is why the default value for "Environment Map" has been set to 2.
I'm curious to see what effect this has at the boundaries of the 32-bit file, and the overall quality of the lighting/shadows. Anyway, thanks for the suggestion, prixat!
- Greg
The value of HDRis comes in their lighting quality. If you're just after a background image, you can do a background plate. The largest most any HDRi needs to be for Iray is 32M pixels, which is 8K x 4K.
Bryce has a spherical camera (add-in product), and while it doesn't have a photoreal engine, its renders can be remarkabe in their realism. The software is inexpensive, and worth a look.
On the other subject of using a vendor's 3D asset to create a 2D product for sale: this is what these products are sold for! It's silly to think there's some kind of unwritten rule that makes this a bad idea. While I grant that simply setting up a scene with presets makes for a lazy result, but these aren't likely to be salable anyway. The value of any of this comes from the creative after-process. If a 3D vendor thought there'd be a market in 2D renders of their work, they'd be first in line. Really, do you see that very often? No, because one person is better at making the wax, and another at making the candles. This is how the world works. (And no, my business is not in rendering and selling background settings.)
All this said, spherical photos of real settings tend to be better, and easier to make. Your setting, while "photoreal," lacks the realism of life. HDRi scenes are hard to populate with props. If you don't have the gear to make cylindrical or spherical panos, there are a couple of online sites that rent pro photo gear, though the basic setup is not expensive to purchase. It's the stitching software that's important.
In that case, be sure you are turning off tone mapping in Iray, and setting Nominal Luminance manually. You only need single-source tone mapping.
Tone mapping in Iray has an affect both before and after camera, and the tone mapper gives hints to the engine for setting a baseline luminance. When you turn the mapping off, you lose this mechanism. Experiment with values to set the result you want.
Has anybody examined the boundaries of .exr output from Iray in DAZ?
When I open the default .hdr (DTHDR-RuinsB-500.hdr) in Photoshop and slide the exposure down to -20, it fades naturally to solid black (as it should).
When I point a camera in the scene at the hotspot of the HDRI and render out a 32-bit .exr file, this is not the case. Instead, adjusting the exposure to -20 yields this:
I thought that this may be a result of the default numerical value for the Environment Map being set to 2, so I changed it to 1 and got the following (after opening the rendered .exr file in Photoshop and setting the exposure to -20):
In both cases, tonemapping within DAZ was turned off (though this shouldn't effect 32-bit output anyway). Anybody have any ideas/thoughts?
- Greg
Viewing the histogram and the dynamic range might tell you more about what's going on.
My version of Photoshop can't do what I want so I have to use a utility to view the histogram and find the dynamic range of the HDR.
'Bracket' is small and free:
http://www.hdrlabs.com/tools/links.html
I would send a support ticket to Daz to ask this question. Those with the authority to give a judgment call on this issue do not regularly visit the forums. It seems to me that giving one very specific HDRI, for a very specific reason, to one very specifc person who can produce a reciept for the product is vastly different in form and intent than rendering a bunch of backdrops and offering them as a set for sale. The same for the 2D sprite sheets. The sprite sheets have a much different end use and target audience. Redistribution of rendered output is covered by the EULA, as long as you are not viewed as redistributing a competeing product, or something that would negate the need for the original product.
*No legal advice stated or implied*
I hope it works out for you.
Hmmm... What exactly is Nominal Luminence? I mean, I could translate that from scientific speak into common English, but that wouldn't really tell me what it does in the render engine.
I've gone over to tone mapping pretty much everything by hand and I need to learn more about it, and probably need to learn better what I am telling the engine to do.
I have found that Nominal Luminance affects the Firefly Filter and what it considers white temperature and what it should be filtering. I have mine set at 100 which seems to clear most of the fireflies straight off depending on the output of any lights in the scene.The more light in the scene the higher the Nominal Luminance value. It does affect the Bloom Filter though and the Nominal Luminance has to be set such that it doesn't affect the Luminance used by the Bloom Filter. I hope that makes sense :)
These are some great light-weight, fast-launching utilities - thanks for the link!
Here are the histograms for the two .exr files described in the previous post:
There should be some differences because they are just a portion of the entire sky, but I'm not sure what's going on here. When I get a chance, I'll render out the entire sky to .exr and post the results.
- Greg
Is this documented anywhere? Seems like it should not effect the 32-bit file.
- Greg
Thanks for the sound, level-headed advice, @DestinysGarden, but John is already over it - he has uninstalled DS and moved on, so it's moot at this point.
- Greg
Hoping DAZ will clarify the legaility of selling/distributing redenered backgrounds/sphere maps. It is my understanding that any 2D art we render out of DAZ is okay to sell and distribute, whereas, any exporting of the 3D meshes is not permitted to be sold or distributed. Based on that understanding your proposed use should be okay. Just my opinion.
"“iray nominal luminance” <float>
The nominal luminance is a hint to iray on what is considered a
“reasonable’’ luminance level when viewing the scene. This luminance
level is used internally to tune the firefly filter and error estimate.
When the nominal luminance value is set to 0, iray will estimate the
nominal luminance value from the tonemapper settings. If a user
application applies its own tonemapping without using the built-in
tonemappers, it is strongly advised to provide a nominal luminance.
Recommendations: For visualization, a reasonable nominal luminance would be the luminance value of a white color that maps to half the maximum brightness of the intended display device. For quantitative
architectural daylight simulations (e.g. irradiance buffer), a reasonable nominal luminance could be the luminance of white paper under average day light. (default 0.0)"
hmmmm. Is this what they mean when they complain about things getting too technical?
Thanks, Fishtales, for that cogent and useful explanation.
Here's an example that may help -- if you slapped a texture onto a plane and set a camera up to include all of that plane, it would possible to get a good approximation of the original texture. That is not allowed by the EULA. Not sure about buying a background set to render a background falls into that category or not, but it's obviosuly borderline.