A new version of Cineversity has been launched. This legacy site and its tutorials will remain accessible for a limited transition period

Visit the New Cineversity
   
 
Global Illumination Animation Woes
Posted: 01 January 2013 01:19 AM   [ Ignore ]  
Total Posts:  138
Joined  2012-04-04

Happy New Year.

After 8-10 hours of tests and renders I’m still not much closer to creating a successful camera animation of an interior lit with GI.  I have read the documentation and watched various tutorials.  These have helped, though many are for earlier versions of C4D.  I’m using R14 Studio.

I initially tried using IR and Radiosity Map caches, and that worked when rendering an image sequence on a single Mac Pro.  But when I tried a Net Render there were huge shifts on the frames rendered by different machines.  I did everything I could think of to make sure the proper illumination IR and Radiosity Map cache files were visible on the Net Render server, but, judging by the results, the client machines didn’t see them.  The documentation isn’t very clear regarding this, and the most recent tutorial here about GI says there’s a separate tutorial about Radiosity Maps.  I’m not seeing it, so I assume it hasn’t been produced.

So after reading the GI thread started earlier this month by JR01 I thought I’d try baking the illumination to the elements in the room.  Unfortunately, those results are less than ideal.  Even with a very high sample count and cache settings I’m getting some nasty dark artifacts over the baseboards in the corner.

This link shows three renders and the GI setting used; the PNG is too big to attach, and shrinking it down would have made it too small to see the menu grabs:

http://www.marshall-arts.net/Support/GI_Bake_ArtifactsREV.png

All of the GI in the renders used IR+QMC (Still Image), Diffuse Depth of 1 and Primary Intensity of 174%.  I have spotlights outside the windows pointing into the room and a wall behind the camera to bounce the light.

The top image is a standard GI render of the whole room.  There are some light leaks, but I can live with those.  I want that kind of blown-out look to replicate a camera.

The middle image uses the same GI settings, but is closer on detail in the corner.

The bottom image is a standard, non-GI render in which the walls, baseboard and shoe moulding have been baked with illumination enabled (other elements are dark because I didn’t bake those).  Notice the dark blotches above where the baseboard meets the wall.  The texture maps are rendered at 5000 pixels square.  I tried bumping that to 10,000 pixels square, but the similar artifacts are evident.

The documentation for object baking says to crank up the samples to 400, which I’ve done here.  It also says to use Delaunay High for Record Density and Delaunay for Interpolation Method.  Those settings looked horrible when baked, so I’ve used High and Least Squares for those settings here when baking.  At various points I tried High (Details) and Weighted Average, but that didn’t help.  I’ve tried bakes with Distance Map, Check Record Visibility and Details Enhancement turned on and off, with no visible improvement.  If I lower the smoothing the artifacts remain but become sharper.

I’m about at my wit’s end.  I could probably fake the GI through lighting or live with the artifacts or play with the geometry of the walls, but I was really hoping I could just select the objects to bake, let it churn away for an hour or so to bake the textures (then go back in to add back the specularity and reflections to the new materials) and have my scene ready to go, suitable for a fast render.

Any suggestions or tips would be greatly appreciated.  Maybe I’ve missed a setting.  I’ve posted a zipped scene file here:

http://marshall-arts.net/Support/GI_Bake_Test.zip

It’s around 20MB because it includes the three 5k PNGs I baked.

Thank you.

Shawn Marshall
Marshall Arts Motion Graphics

Profile
 
 
Posted: 01 January 2013 04:23 AM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  365
Joined  2006-05-17

Unfortunately irradiance cache solutions are not ideal for interior renders. This isn’t so much a limitation inherent to cinema but to IR caches in general.
Qmc, qmc w. radiosity maps, or baking would be the better options in this case.
For radiosity maps you can generally just turn them on..,although you my want to boost the area/sky samples under the radiosity maps settings.

You could also use IR, but you are likely not using high enough samples to get a good solution. This is what causes splotches/changes from frame to frame.

I would NEVER use the presets for setting sampling quality, this is covered in the video on GI that I did.
I also would not use the animation mode, you would be better off with high sampling and good settings for the records.
For the baking don’t use Delaunay unless you use custom sample settings as well…you will also need to have a fairly good understanding of record settings to get good results with Delaunay. 

You may also want to look into light portals, create a plane just outside the window with its positive normal facing into the room. Then apply a transparent texture to this. In the illumination settings for the material you will see an option for portal there. This will help direct rays from the sky into the room.

At this point I can’t say much else as I am in the middle of celebrations, but hopefully that helps.

Profile
 
 
Posted: 01 January 2013 05:07 AM   [ Ignore ]   [ # 2 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hehe, celebrations, yes, it’s New Years Eve. Happy New Year Patrick.

======

Hi Shawn Marshall,

Happy New Year to you.

To answer your question WHY it is so different, think of the camera view (even animated/cached) and how many samples this needs. The settings gives you just that quality.  Then compare this with the baking, which is practically everything in the scene—at once. (Yet alone the pixel-amount to store each solution might give an idea about the two tasks) This is quite the difference. I haven’t found any source to back that up, but that is my way of seeing it. While baking, the set up becomes too “thin” to cover for the same quality.

I certainly would trust anything that Patrick said above. Especially about portals. Here I would like to add that the samples of the shadow-mapps are not really high. The idea to use illuminated polygons instead of light sources is normally more native to that kind of work. The image that you have used (Trees) can receive GI in your scene, which is certainly not ideal in any case.

My first impression is that some light leaks through the walls, the window on the left has an very un-natural brightness there. (Portals)

To your scene, the first thing that I explored was the UV maps, and they are mixed, you might improve those to get more “information” onto your polygons from them. The one for the walls, looks not bad though, in terms of size for the part with the problems. The beauty of such baking is, that you can fix this very easily in BodyPaint 3D or Photoshop, these “splotches” are based on a too low number of samples. The manual shows very nice details about that. The idea of baking everything is, that no GI is needed at all anymore for a pure camera animation. Baked parts might provide light, but shouldn’t get any. So the Receive part can be set to off, with no doubts. Not really a problem in your scene here, but I like to mention it.

For indoor scenes (I might be old school, but I would always have a closed object, it somehow feels weird to me, perhaps Patrick can fill in here if even e.g., a black wall would work here.

IF all is baked, the rendering should go very quickly, perhaps more in minutes than in hours, and it is normally 100% stable.

If these lights should work as Sun-light, Inverse Square (Physical Accurate) is not useful here. As the distance from the Sun to Earth would determine the initial distance, and compared to that, the distance in the room is pretty much “nothing” in terms of “Falloff”. Sunlight here on Earth is not set up as “Square Inverse” in 3D, only if you place the light source to the right distance, and that is nothing that I would suggest at all, never (except perhaps, you make a science fiction movie…).

Reflections might be render in a separate pass, to mix it later on in post, perhaps with a Fresnel pass (not a pass by default in C4D), some like to stick with Specular Highlights as well)

Baking is an effort, but it takes the time out of the information, and with that it makes it stable. This might not work for all parts, and even in Camera animations only, some materials change with a certain camera-object-light constellation. More difficult than that is to to find a nice balance in the results, especially if you render with one or the other light source (light objects vs luminance surfaces). Mostly ignored, but give it a shot to find the differences for your project. Sometimes it might be useful to bake several versions and use a Fresnel as mask between (or among) them. Light source might ignore Material parameters, have an eye on the aesthetics that you are targeting.

=======

As you got nice renderings, I stick with my preference of camera mapping. More work - but if the technique is not new to you, certainly a fast way. Especially when you camera path is final, you might not need at all a lot of coverage.


However, Patrick has certainly more tips after the Holiday is over.

All the best

Sassi

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 01 January 2013 08:07 AM   [ Ignore ]   [ # 3 ]  
Total Posts:  138
Joined  2012-04-04

Thank you both for the quick replies on this holiday; I appreciate it.  I just got back from a party, 2am Pacific Standard Time in Oregon.

I’ll need to digest this information over the next few days.  I haven’t done much GI work since most of our jobs haven’t lent themselves to that technique, so I have a lot to learn. 

Cheers.

Shawn

Profile
 
 
Posted: 01 January 2013 01:22 PM   [ Ignore ]   [ # 4 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Shawn,

You’re welcome. I hope my comparison makes sense (“Single Camera View” vs “Multi/Omni-directional” during baking.)

Have a good start into 2013.

Sassi

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 02 January 2013 03:48 AM   [ Ignore ]   [ # 5 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

P.S.: The light leak close to the left sided window vanishes in the moment the Phong Tag is set to 90ยบ (Is that working for you?).  Exploring your scene a little bit more, I found the urge to remodel it (which I didn’t of course) but the mesh is such a mix of very long triangles (not suggested) and large to very large (in the model scale), I found modeling efforts with no visible (?) effect and of course I know that is just as it comes out of a CAD application, which is not interested in the first place to create a fantastic mesh. CAD is practical oriented, I know to only too well, having worked (too) long as architect/project lead. I might work, but I do not suggest such an “pipeline”. Well, that is my very personal opinion about, you might ignore it for economic reasons alone of course.

Image in non GI mode to check the scene, here with the default setting of your scene.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 02 January 2013 04:41 AM   [ Ignore ]   [ # 6 ]  
Total Posts:  138
Joined  2012-04-04

Again, thanks for the input Dr. Sassi.  I’m not sure I’m understanding all of your points, though.

Conceptually, I get what you’re saying about the GI sampling “thinning out” when you bake all of the walls versus rendering a section.  I tried upping the samples to 10000 on an IR+QMC bake.  The artifacts were still visible, though maybe slightly diminished.  I also tried baking using QMC on the Medium samples setting.  It churned for around 105 minutes on my 12-core Mac Pro to bake a 5K map.  The artifacts above the baseboard were eliminated, but there was visible grain in the map.  If each element in the scene took that long to bake I’d be waiting 15-20 hours to bake all of those elements.

I could go into one of the IR+QMC bakes of the wall and paint out the artifacts in Photoshop.  That would not take too long, but I was hoping things would just “work” natively without having to resort to painting out defects in the bake.

I just started using camera mapping.  This particular animation depicts an actual room in an historic house.  It starts with a video still of the empty room.  I used Syntheyes to establish the position and focal length of the camera, based on the ceiling height of 8 feet.  I camera mapped the video still to geometry to create a subtle move on the still , then transition to a full 3D render showing the furnishings circa 1800.  I modeled everything from scratch (the scene I posted for reference uses placeholder furnishings included with C4D).  You can see an Open GL version of what the actual scene looks like here:

http://marshall-arts.net/Support/HensonBedroomOpenGLDraft720 12-20-12-REV.mov

I originally modeled the walls and other elements with actual depth, but I saw that the Object Baker was baking the back sides of walls that would never be seen, adding time to the render and using up my UV map space.  I tried to use the knife to cut out holes for the windows in that wall, but I was getting some really odd results, so I think I used booleans to make those holes, resulting in the big triangles.  Those are the only triangles I’m seeing in the stuff I modeled.

I don’t know how I’d create camera maps that would cover the whole room.  I haven’t played with Projection Man, and I think it would be easier to just paint out the artifacts if I want to bake this.

I don’t know what you mean by “modeling efforts with no visible (?) effect.”

As you can see in the video still at the head of the above animation, the windows and walls near the windows are really blown out, so I was trying to match that look in my GI renders.  The light leak didn’t look that unnatural to me, and as I wrote earlier, I could live with some of that stuff.  I just don’t want the black junk near the baseboard, though I could pretend it’s soot or grime.

Best.

Shawn

Profile
 
 
Posted: 02 January 2013 04:09 PM   [ Ignore ]   [ # 7 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Shawn,

The simplest way to fix the areas that won’t work for you, is to select the polygons in “question”, make a Selection Tag for these, copy that Selection Tag and invert it, save this while active (Name them!). Then copy the Texture Tag and supply each time one of the Selections Tags to them, so you have two Texture Tags that work as the single one before. Now you can create a new UV tag for the new polygons (the one with the problems) and fill the texture area with it. The Baking should be fast for this Texture Tag. You can put Texture Tags on a list inside the Baking Tag ->Details. A smaller texture in your case should be fine. I tred it here by just baking that little area with the problems (see image) which is rendered at 1k*1k only for that part. (I bake always in OpenExr to get all the light.)

======

Each scene is different and might contain its (needs for an) individual solution.

You have the camera mapping for the existent scene. All you need is the light changes for the camera mapping you have so far. To render the shadow-maps is simple, you might even set all new objects to “(Not) Seen By Camera” (Compositing Tag) and render the shadow for these views, which you can mix them with the Camera mapping in existence (Always from the Camera Mapping camera. Place the shadow “views” into the Diffuse channel of the Camera Projection Material, and check the “Affect Luminance”, now you can blend the shadows as fast or as slow you like during the camera move.

The light on the objects are left as well the “reflecting” light from the new objects to the walls.

I think the objects by itself had no problems so far. I leave it to you.

The Walls need to receive the light that bounces from the Objects, so you might place a material left sided to them in the Object Manager, and set the Texture Tag to Add, which is called “Mix Textures”. You can go from a black material to blend in the light with the luminance channel (animated in this case).

I hope that makes sense and keeps the initial quality of the camera mapping, instead of changing the historical documentary into a full cg.

This is just a thought, and how I have worked in a similar way on my last music video (A making of will follow soon here on Cineversity). See the link below for the clip, each bill-board scene is camera-mapped and shadows are just painted in for the billboards.


=====

I understand the modeling with the knife (looks like CAD to me, but OK ;o), Knife: fast but not always as clean as possible. “Not visible”, well, in your case the polygons might work (not visible effect after improving it perhaps), but if you had modeled the problem area in one piece, all artifacts might have not appeared. Just from the wall into the baseboard. The “light leak”, which turned out is based on the small triangle over the window, was based on the calculation of soft edges—finally based on the Phong Tag. Perhaps two simple polygons, left and right sided from the fireplace would have served better, and would have kept all in four sided polygons. Which I try to produce as much as possible. Exceptions of course given on a daily basis, it is always a battle between time and elegance.

All the best

Sassi

The image is based only on the one area with the problem, anything else is as it was.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile