PDA

View Full Version : Rendering Animation in MR: FG every 10th frame


nisus
02-19-2007, 07:15 AM
Hi All,

I would like to render an animation of an interior architectural space. The rendering times per frame are HIGH because it is essential to have a superb lighting in the scene.

I would like to pre-render a FG-map-pass and than re-use this FGM for the final animation. However, to save time, I would like to render the FGM every 10 or 20 frames and than re-use this to calculate the final shot.

However, I got no idea how to set up a FGM for an animation.
Can anyone explain in short how to set this up in max9?
Tnx a lot.

rgds,

nisus

mmikee
02-19-2007, 11:28 AM
It is pretty simple. Just render out every nth frame FG map and save each with a different name. Then use the FG_copy utility to merge them into one file. Then load the new file and check freeze. The Mental Ray help file has very good info on the FG_copy utility.

Regards,
Mike

nisus
02-20-2007, 02:27 AM
Just render out every nth frame FG map and save each with a different name

Can't I just render it at once over the network (while I sleep)?
I mean, I do not want to do that manually... isn't there an automated way?
or someone who can script this? ,-))

gonna check the MR help file on "FG_copy utility"...

tnx

nisus

mmikee
02-20-2007, 10:17 AM
A script would be nice for this. But you can send them to your computer through backburner.

Regards,
Mike

nisus
02-20-2007, 10:47 AM
uhu, but i guess there is no way to sent only ONE file and all different FGMs are calculated from that?

I mean: for an archviz animation of +2000frames, i don't want to sent 200files manually...** (yes i'm lazy)

rgds,

nisus


**ps: lazyness is the mother of invention!

nisus
02-20-2007, 11:27 AM
hi,

Is there a way to do all this directly from max, without the command line?

rgds,

nisus

mmikee
02-20-2007, 12:36 PM
As far as combining the FG maps, I dont know of another way.
It would be nice if there was an incrimental setup like in Vray.
I use vray everyday here for arch animation, and that is probably my favorite thing about it. I guess Im going to have
to buckle down and learn some more maxscript.

Regards,
Mike

mmikee
02-20-2007, 12:41 PM
I guess you could probably render every nth frame with FG set
to save, as long as freeze is not checked. Hmmm...Ill have to
test this a bit. It may work. Ill try a couple of things tonight
and post back tomarrow.

Regards,
Mike

nisus
02-21-2007, 02:34 AM
Hi Mike,

I tried this overnight, but I'm not sure it works...

I have rendered an FGM for a (slow) archviz animation every 20th frame, with AA 1/64 1/64 (to speed up the render itself).
After this I re-used the FGM on every single frame with AA 1/4 4... BUT... The scene really flashes!!

For now, I guess this is another problem... Every frame rendered on a particular machine from the network is a lot lighter than the ones rendered on the other machines.

I checked the lowres images that were rendered during the save-FGM, and these also differ (quite a lot!) in brightness...

Do you got any idea how this is possible?
The machines in the network are ALL the same configuration, same memory, same motherboard, bought at the same time...

Anyway, for now I'm rendering the FGM again on a single machine... Have to wait to get the updates...

Did any one got the same issues?

rgds,

nisus

mmikee
02-21-2007, 07:20 AM
Well I would think that the problem of varying brightness is
to be expected. I have to calc the Ir map on one machine when using Vray, or I can have the same problem.
How is your camera animated ? Is it a simple pan, or an actual
walk through ? For a walk through there is no magical nth frame number that works everytime. What I do is study the
max viewport while scrubbing the time slider to make sure that
at the nth frames I am covering all geometry with FG samples.
Of course, if somewhere in between the nth frames there is
geometry exposed that was not sampled in the previous or
latter nth frame, you can simply calc a FG map somewhere in between. I usually load the saved FG map and render a low res
image between the nth frames and check to see if the coverage is complete.
Hope this helps.

Regards,
Mike

nisus
02-21-2007, 03:25 PM
Tnx about explaining the coverage. I have not thought about that yet, but than again my tests are not finished yet (other things need to be rendered first...)

The animation is a slow moving architectural walkthrough, but more every smooth glide than an actual walk...
Every 10 or 20 should be enough...

Gonna tell you more, once I got the results

rgds,

nisus

Brian Bradley
02-21-2007, 05:03 PM
Hey Guys,

The problem with calculating FG maps on differnet
render machines is that each machine is evaluating
a different range of frames which means the density/
intensity of the FG map is going to change too drastically
to be useful, hence the bad flashing. I think the only
way to do it succesfully is to have one machine do
the entire FG map calc??

Regards
Bri

mmikee
02-21-2007, 05:36 PM
The problem with calculating FG maps on differnet
render machines is that each machine is evaluating
a different range of frames which means the density/
intensity of the FG map is going to change too drastically
to be useful, hence the bad flashing. I think the only
way to do it succesfully is to have one machine do
the entire FG map calc??


I agree. I always calc the lighting on a single machine, or
use DR.

Regards,
Mike

nisus
02-22-2007, 03:29 AM
Makes sense... I'm testing the FGM calculation on one machine now... (unfortunately, other projects need to be rendered first... grr!)

The DBR is a good idea ,-)

nisus

MasterZap
03-15-2007, 02:14 AM
The proper way to do this is, for an architectural walkthrough (i.e. where neither lighting change nor objects move)


Since max doesn't expose the mental ray 'render FG only' flag, set up your render at the proper resolution but with an 1/64 1/64 sampling, so the "main" render whooshes by.
Set up your render to use an FG file
Hit the "X" button beside your FG file to clear it out.
Set your render to "render every n:th" file (10:th or so quite ok.. maybe every 30:th... or less... it's more about getting each area covered than anything else)
Many computers? Use DBR to do the FG map render.


When done, check the "read only" button by the FG map, set your sampling to your original "beauty", set render to "every frame", and render the total sequence.

Here, it doesn't matter if you use DBR, or if you render "a frame per computer", just make sure they all reference the same FG map and make sure it's in "read only" mode.

Also be certain not to check the "Use radius based interpolation" in the FG panel, since that has a potential to generate render-time FG points.


Also note: There is no need to write to separate files, and combine them with fg_copy. Mr will "add" to the existing FG file all by itself. The "fg_copy" workflow is only necessary if one is rendering multiple FG maps on different computers separately (i.e. without DBR).


/Z

mmikee
03-15-2007, 02:07 PM
Also note: There is no need to write to separate files, and combine them with fg_copy. Mr will "add" to the existing FG file all by itself. The "fg_copy" workflow is only necessary if one is rendering multiple FG maps on different computers separately (i.e. without DBR).

Thanks for the info. This is making my life much easier.

Regards,
Mike

hoppergrass
03-15-2007, 11:06 PM
A quick question, if I render two views of the same space, are the overlapping samples (ie same areas seen from each view) compared and combined / blended? or is it rather if a sample for that point exists from view 1 it is skiped in View 2 ?

If so how are the colours of a fall off map analized for each view? ie the colours would be different for each view as they are generated according to the active camera.

JHV

chaka
03-16-2007, 08:59 AM
The proper way to do this is, for an architectural walkthrough (i.e. where neither lighting change nor objects move)


Since max doesn't expose the mental ray 'render FG only' flag, set up your render at the proper resolution but with an 1/64 1/64 sampling, so the "main" render whooshes by.
Set up your render to use an FG file
Hit the "X" button beside your FG file to clear it out.
Set your render to "render every n:th" file (10:th or so quite ok.. maybe every 30:th... or less... it's more about getting each area covered than anything else)
Many computers? Use DBR to do the FG map render.


When done, check the "read only" button by the FG map, set your sampling to your original "beauty", set render to "every frame", and render the total sequence.

Here, it doesn't matter if you use DBR, or if you render "a frame per computer", just make sure they all reference the same FG map and make sure it's in "read only" mode.

Also be certain not to check the "Use radius based interpolation" in the FG panel, since that has a potential to generate render-time FG points.


Also note: There is no need to write to separate files, and combine them with fg_copy. Mr will "add" to the existing FG file all by itself. The "fg_copy" workflow is only necessary if one is rendering multiple FG maps on different computers separately (i.e. without DBR).


/Z


thanks masterzap you are the best:D

and i when used GI is the same way??

mmikee
03-16-2007, 10:28 AM
Photons are not view dependant, so you can calc the GI for
entire scene at once.

chaka
03-16-2007, 12:17 PM
great :D

thanks mmikee:cool:

nisus
03-19-2007, 03:50 AM
Also note: There is no need to write to separate files, and combine them with fg_copy. Mr will "add" to the existing FG file all by itself. The "fg_copy" workflow is only necessary if one is rendering multiple FG maps on different computers separately (i.e. without DBR).

Tnx Zap, this is so useful to know because now I can troubleshoot more efficient.


However I've had another problem that I hope you can solve or at least shine some light on...
I had tried the workflow that you described last month (without knowing about the 'automated adding' / fg_copy-workflow) but still had some issues with non-consistent lighting in the scene...
I don't know the real reason for it, but this is what i think...

First of all, the problem I got is (again) changes in the lighting of the scene... sometimes the scene is very bright, than not...

And here is what I found to be curious...

I have rendered the FG-pass with 1/64 1/64... In my scene are small spotslights that illuminate the scene using a self-illuminating material... rendering the beauty pass, these (very small) objects are 'seen' in the rendered image, but with a very low sampling the don't, or at least not all the time (some frames yes, others not)... So imho (very imho!) during FG calculation these objects are not used??? I sthis correct???
Is it because of this 'effect' that my scene suffers 'flickering' light? If not, what can be a cause?

Can you give me (us, members in this forum) some background information about what objects are actually used during the FG-calculation so that I (we) can make my (our)problem-shooting-target a bit smaller? Tnx.

rgds,

nisus

nisus
03-19-2007, 04:45 AM
Hi Zap,

Got some more workflow questions for you...

I know FG is view/resolution-dependent, but does it make sense to render the FG on a lower resolution (in any way)? Meaning, can one save time by applying tricks but without losing quality?

rgds,

nisus

hoppergrass
03-19-2007, 04:10 PM
Tnx Zap, this is so useful to know because now I can troubleshoot more efficient.


However I've had another problem that I hope you can solve or at least shine some light on...
I had tried the workflow that you described last month (without knowing about the 'automated adding' / fg_copy-workflow) but still had some issues with non-consistent lighting in the scene...
I don't know the real reason for it, but this is what i think...

First of all, the problem I got is (again) changes in the lighting of the scene... sometimes the scene is very bright, than not...

And here is what I found to be curious...

I have rendered the FG-pass with 1/64 1/64... In my scene are small spotslights that illuminate the scene using a self-illuminating material... rendering the beauty pass, these (very small) objects are 'seen' in the rendered image, but with a very low sampling the don't, or at least not all the time (some frames yes, others not)... So imho (very imho!) during FG calculation these objects are not used??? I sthis correct???
Is it because of this 'effect' that my scene suffers 'flickering' light? If not, what can be a cause?

Can you give me (us, members in this forum) some background information about what objects are actually used during the FG-calculation so that I (we) can make my (our)problem-shooting-target a bit smaller? Tnx.

rgds,

nisus


I suspect that this is due to the AA, does it still do it with a higher AA?

JHV

nisus
03-19-2007, 04:12 PM
thought so too... that's what i'm finding out at the moment...

nisus

nisus
03-19-2007, 04:18 PM
Many computers? Use DBR to do the FG map render.

Can this really be done? When I render FG in DBR , only one machine gets used... (network is setup correctly... done DBR before...)

nisus

mmikee
03-19-2007, 05:25 PM
Can this really be done? When I render FG in DBR , only one machine gets used... (network is setup correctly... done DBR before...)


I do this all the time without any problems. I use up to 7 computers at work for this. And up to 4 computers at home.

Regards,
Mike

nisus
03-20-2007, 09:09 AM
damn damn... found the issue... our template files for DBR where still referring to a 32-bit max instead of the 64-bit we use now... so the DBR was not setup correctly... now it is... ;-)) Tnx lads!

rgds,

nisus

Camby1298
03-22-2007, 10:16 AM
Could someone help me out here, DBR?? What does it stand for?

Brian Bradley
03-22-2007, 10:24 AM
Hi,

DBR = Distributed Bucket Rendering.

Regards
Bri

MasterZap
03-23-2007, 01:42 AM
A quick question, if I render two views of the same space, are the overlapping samples (ie same areas seen from each view) compared and combined / blended? or is it rather if a sample for that point exists from view 1 it is skipped in View 2 ?


If the new view would want to create an fg point at the same location as one already exists, it is skipped. However this tolerance is very tight, so it has to be pretty much in exactly the same spot.

So normally, two FG points will be created. The blend happens at beauty-pass time.

If so how are the colours of a fall off map analized for each view? ie the colours would be different for each view as they are generated according to the active camera.

Actually, falloff is calculated by the viewing ray direction, not the active camera. So when FG point are generated, each point gets a falloff that is appropriate from the vantage point of the FG point itself (as if the FG point was the camera).



First of all, the problem I got is (again) changes in the lighting of the scene... sometimes the scene is very bright, than not...


This is odd. With a 'read only' FG map, this should not happen, the illumination should be completely consistent frame to frame. If no objects move, and no lights move or change intensity, the lookup into the FG map should be completely deterministic.


I have rendered the FG-pass with 1/64 1/64... In my scene are small spotslights that illuminate the scene using a self-illuminating material... rendering the beauty pass, these (very small) objects are 'seen' in the rendered image, but with a very low sampling the don't, or at least not all the time (some frames yes, others not)... So imho (very imho!) during FG calculation these objects are not used??? I sthis correct???
Is it because of this 'effect' that my scene suffers 'flickering' light? If not, what can be a cause?


What is "seen" in the beauty pass is irrelevant. The entire beauty pass itself is irrelevant.

Not even what is "seen" (by YOU) in the "fg precompute" phase is itself relevant.

What is relevant is what is "seen" from the FG POINTS generated during the fg precompute phase.

If your "small self illuminated spotlights" are missed, then I would say either
- more FG rays, or
- higher density, or
- consider making them as real lights rather than letting FG light it

Also, when working heavily with FG-only lighting, consider turning the FG filter to "None". The FG filter throws away weak or deviant FG samples. "None" Is the only completely unbiased mode, but has a risk of creating "spots" if you have small extremely bright objects.

Can you give me (us, members in this forum) some background information about what objects are actually used during the FG-calculation so that I (we) can make my (our)problem-shooting-target a bit smaller? Tnx.


All objects are used. The object themselves being "seen" in the beauty pass, or even the fg-pass is not relevant. You should probably see their effect already in the prepass (if the prepass is completly black, somethign is going on, try suggestions above).

Hi Zap,

Got some more workflow questions for you...

I know FG is view/resolution-dependent, but does it make sense to render the FG on a lower resolution (in any way)? Meaning, can one save time by applying tricks but without losing quality?


Difficult question, but here is one answer:

If you are working with an image at, say, 1500x1000 pixels and you are "happy with it", but plan to make a 6000x4000 for print later, you can quite possibly use the FG map from the former to render the latter. Unless of course there is a ton of detail that you do not even see in the 1500x1000 that would only be visible at 6000x4000, that you then would like to "resolve" in the FG solution.

Although me, I tend to get most "detail" out of AO.


/Z

oliviercefai
03-24-2007, 11:44 AM
Hello,

What would be the right workflow for using FG in a scene where every object moves and the camera also moves. The scene uses FG-only (no photons) for fill light (HDRI+skylight).

At the moment, I plan to just compute FG maps for every single frame - but then I cannot have it saved since it is not incrementing (and what is on the screen as the begginning of the animation is different from what is at the end)...

In a network rendering scenario, would that work ok as far as light flickering is concerned? and if rendered on a single machine?

tks
Olivier

mmikee
03-24-2007, 07:16 PM
You can save the FG map as one file to load during rendering of the final. If you have moving objects you will need pretty high settings for the FG to avoid flickering.

Just save the FG map (make sure that freeze is unchecked).
You could send the job through backburner, using DBR for the FG calc, then the final using each computer rendering a frame.
Just make sure to set the dependency in backburner correctly
and check freeze in the FG options before submitting the final
animation.

Regards,
Mike

mmikee
03-24-2007, 07:26 PM
V

Hey Master Zap. Would you recomend running an AO pass for animation seperately, and comping it in post. Or Just using the AO detail enhancement in the Arch&Design mat ? We
do almost exclusively archviz animations, most very detailed.
An example....Private schools, animations from the atrium, and the Fieldhouse, Pool, and Gym are all visible in the animations. So very large, detailed scenes.

Any suggestions are always appreciated.

BTW, we dont know how we got along before your Arch&Design mat. The time saved is huge, and the results are
superb.

Regards,
Mike

oliviercefai
03-25-2007, 02:06 AM
You can save the FG map as one file to load during rendering of the final. If you have moving objects you will need pretty high settings for the FG to avoid flickering.

Mike

Sorry Mike, but this would not work, since some objects are getting occluded by others during the animation: say for example an object on the ground getting up in the air; with FG saved with no freeze (increment calculations), you end up with dirt shadowed zones in the end, where the object was sitting at the begginning.
The only way to make this work is to calculate an FG for each frame, with very high settings (I have been doing that so far in the last few months) but that would still create flickering in areas many lit by indirect light, thus my initial request...

MasterZap, any advice on your side? There must be a normal workflow for animation with FG after all - without having to find "tricks"...

Olivier

mmikee
03-25-2007, 07:52 AM
The only way to make this work is to calculate an FG for each frame, with very high settings

Actually, I was talking about calc FG for every frame. Regardsless of whether or not you calc for nth frame or every frame, you can save it and load it during the "beauty" pass.
This should speed the process up, because you can calc the
FG using DBR, and the "beauty" pass normally.

Regards,
Mike

hoppergrass
05-17-2007, 10:54 PM
Remeamber that if a FG sample exists then its skiped should an other sample fall in the same place.

for example an object raising off the ground. Once samples are created under the raising object and the ground, further samples in that area are skipped. Therefore a "dark" area could remain.

This could be unnoticable or an issue,

JHV

chaka
07-10-2007, 10:51 AM
Actually, I was talking about calc FG for every frame. Regardsless of whether or not you calc for nth frame or every frame, you can save it and load it during the "beauty" pass.
This should speed the process up, because you can calc the
FG using DBR, and the "beauty" pass normally.

Regards,
Mike

Sorry Mike, but this would not work, since some objects are getting occluded by others during the animation: say for example an object on the ground getting up in the air; with FG saved with no freeze (increment calculations), you end up with dirt shadowed zones in the end, where the object was sitting at the begginning.
The only way to make this work is to calculate an FG for each frame, with very high settings (I have been doing that so far in the last few months) but that would still create flickering in areas many lit by indirect light, thus my initial request...

MasterZap, any advice on your side? There must be a normal workflow for animation with FG after all - without having to find "tricks"...

Olivier


Masterzap i waiting for your answer :( , or anybody

Atlante
12-06-2007, 11:53 AM
Hi,

this is my first post and the discussion are very intersting.

I agree with the render method with aa1/64 and fg every 10 frame but this is good with the only camera is animated.

I want to create an animation with object in movied and I need to save a fg every 10 frame but. I think that the fgcopy utility is one way but I don't able to use it.

Is someone able to use fg_copy utility?

Thanks

3DMadness
12-07-2007, 03:57 AM
I haven't seen Zap around latelly, so I think he don't mind if I quote his message from cgtalk and I saved it to my favorites. ;)

Here are some tips that I can share. I will probably put a refined version of this on my blog eventually:

* Always use the FG modes new to ray 3.5, i.e. "auto" or "multiframe". This is because the old (radius based) modes generate render time FG points, which generate most of the flicker.
* It can be better to use a low density of FG points with a high number of points being interpolated (in the new FG modes). This causes smoother FG solution. However, this solution may be over-smoothed, so you combine this with applying sort-ray AO on the indirect contribution to "get the details back", i.e. nice contact shadows under feet etc.
* Never use high FG "filter" values, it won't help you. Never use anything but filter 0 or 1. The FG filter is not a "smoothing filter" it is a "reject N brightest rays" filter. If you want smoother, crank up the number of points interpolated instead.
* A much better way to combat issues than cranking up the filter is to make sure the environment map that FG "sees" is already fairly smooth (i.e. nothing with insanely high contrast and small features). Pre-blur the environment map that FG "sees". If you need to "see" the environment map in reflections too, apply a ray switching node to the environment.

For character animation (i.e. some characters/objects moving on an otherwise "static" scene (but with camera moves)), you can also do the following:

* Render the entire scene with your FG map written to file. Still include all characters, and use AO for the contact shadows. This will yeild a render where the background looks fantastic, but the characters will have all sorts of strange issues due to them moving through a cloud of (possibly inappropriate) FG points.
* Then render the entire scene again with the FG map being re-calculated per frame (using all the above "tricks"). This will yeild a pass which may contain flickering in the background (especially if the camera pans slowly over lots of tiny geometry) but your characters will look fine.
* Now, replace all your "background" object with a matte white material. Replace all your "character" objects with a white self-illuminating (incandescent) material.
* Put a light source with shadows OFF in the center of gravity of each character, and set it's falloff ranges so it falls off about where you think your characters no long has an "influence" on the indirect illumination.
* Render this "black and white special" as your third render pass.
* In comp, blend between your first render (the "perfect background" one) and your second render (the "perfect characters" one) using the third pass as a blend mask.

Voila. Bob's your father's brother!

/Z

TAGANCHIN
02-06-2008, 02:00 AM
Hi guys.
I made this picture for animation.
I use mrSun+mrSky+mrSkyPortal but the image of a very noisy.
I use FG + GI.
Options FG is not very high, but the rendering time high.
Configuration PC: P4 2,6 Hgz, 1024 RAM.
What to do to get rid of the noise? How to reduce the rendering time?
tnx

http://img90.imageshack.us/img90/9978/mrclassr30000ka7.th.png (http://img90.imageshack.us/my.php?image=mrclassr30000ka7.png)

ramy
03-18-2008, 09:03 AM
I have rendered an FGM for a (slow) archviz animation every 20th frame, with AA 1/64 1/64 (to speed up the render itself).
After this I re-used the FGM on every single frame with AA 1/4 4... BUT... The scene really flashes!!



This is a great technique for rendering animations with no secondary animation.

You shouldn't be getting flickering even if you're using different computers to calculate your final frames. Be sure your .fgm file is on the network and all the computers have access to it. To keep the animation from flashing be sure both read/write and read only/freeze are checked in your Final Gather settings.

ramy
04-02-2008, 10:05 AM
I finally posted a blog on this topic. Check it out. (http://3dsmaxrendering.blogspot.com/2008/04/why-does-my-animation-flicker_02.html)

Ethan_Janssens
08-21-2008, 04:03 PM
TAGANCHIN: the noise you're having is 99% chance to come from the mr_sky portal which tends to have low-shadow quality, resulting in noise, if you're in the modify tab of the mr_portal, check the shadow samples, they're prob still at default: -16-

increase to 64 and notice the difference (in render time and quality).

ps: I like the noice, gives a nice rough render-edge, espeacially in your scene

greets

MagicOPromotion
05-24-2009, 09:09 AM
My advice would be to take the time to learn (http://www.botmasternet.com/) how to use vray. A fly through animation shouldnt be giving you flickering with proper settings. You simply need to precalculate and save your light cache and irradiance maps and you should get the results you are looking for with low frame times. Camera dependent GI is the beauty of vray, you only have to calculate GI for the areas you need.

hoppergrass
07-02-2009, 10:21 PM
and this adds to the discussion how? :rolleyes:

Shimrod
07-04-2009, 02:25 AM
I guess MagicOPromotion is a bot, its signature contains the name of a spamming software.

plurbKar73
10-13-2009, 11:45 AM
I don't know how it works but it is possible

It is called Batch Rendering and it is an option within Vray. Do some more google searching for Batch Rendering in Vray and you might find your answer.

Be sure and check back here as I'm sure someone else will know how. Sorry I couldn't be of more use