Substance Painter
In this start to finish texturing project within Substance Painter we cover all the techniques you need to texture the robot character.
# 1 28-04-2013 , 07:51 PM
EduSciVis-er
Join Date: Dec 2005
Location: Toronto
Posts: 3,374

MR calculations based on distance from SSS object

I've got another annoying render problem. Doing some test renders, I realized that it takes some time for mental ray to do calculations before the render actually starts. After some research, it appears that the calculation time is proportional to the distance the camera is from my geometry. I'm trying to get my camera in nice and close for a shot, but this results in a verrrry long pre-render time. It was well over five minutes on a 640x360 before I killed it and it hadn't even rendered a pixel yet.

With a bit more research I've come to the conclusion that this is because I'm using a SSS material. Does anyone know how to circumvent or alleviate this problem? Thanks.

# 2 29-04-2013 , 12:07 AM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
You might be able to bake the FG, which may speed it up a bit. Try running the MR diagnostics and see if anything pops up.


Imagination is more important than knowledge.
# 3 29-04-2013 , 01:32 AM
EduSciVis-er
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
I've got the FG map at freeze, is that what you meant? Or bake it to textures. I'll give the mr diagnostics a try.

# 4 29-04-2013 , 01:46 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
If you have it set to freeze, you also have to supply a filename if I remember correctly.

You can also use an MR lightmap, which will write the SSS calculations to disk.


Imagination is more important than knowledge.
# 5 29-04-2013 , 02:00 PM
EduSciVis-er
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
Yeah, the freeze is working fine, that's not a problem. I'll look into the MR lightmap, is that something that is used across all frames? Or does it cache the lightmap for each frame before doing the rendering?

# 6 29-04-2013 , 06:31 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988


Imagination is more important than knowledge.
# 7 29-04-2013 , 11:24 PM
Jay's Avatar
Lead Modeler - Framestore
Join Date: Feb 2003
Location: UK
Posts: 6,287
scale is always an issue as well, check your scene unit size, meters or cm?

always take it into consideration. This is something that isnt very well documented

Jay

# 8 29-04-2013 , 11:33 PM
EduSciVis-er
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
It's in cm, properly scaled. I'm just curious that there seems to be something related how close the object is to the camera. Or perhaps because the material fills the whole render, it has to do more calculations??

# 9 30-04-2013 , 12:12 AM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
I don't think it's the distance that's the problem, but how much screen space the object takes up. (Which is inherently the distance)

The more pixels an object takes up, the more pixels that need to be computed with that material. If the material is expensive to calculate, it will take longer to render. With SSS, each traced ray that hits the material scatters. This creates many more rays that it needs to calculate, so you kind of get an exponential complexity increase.


Imagination is more important than knowledge.
# 10 30-04-2013 , 01:52 AM
EduSciVis-er
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
That makes sense ND, I guess I was assuming there was something inherent to the distance, but it has to render a full frame of SSS goodness. The problem is that it's the most necessary to have a good looking shader when it's right close to the camera.

# 11 30-04-2013 , 03:10 AM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
Well, if you save the lightmap of the SSS, you only need to render it once for a given light configuration.


Imagination is more important than knowledge.
# 12 30-04-2013 , 02:10 PM
EduSciVis-er
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
I'm trying to save the lightmap, but I'm really confused as to the process. If I have "writable" checked, and don't specify a file, it does the full calculation. If I put a new filename there, it jumps right to the rendering, and when that's done, it says "no such file or directory, can't write". If I don't have "writable" checked, then it doesn't even render, it just errors out.

The pdf you linked me to says "You don’t need to specify an image name. But if you do, you can render the scene once, and uncheck the “writable” button."

# 13 01-05-2013 , 10:20 PM
EduSciVis-er
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
Any ideas on how to write a lightmap to a texturefile to be read once? I feel like I'm missing something obvious.

# 14 02-05-2013 , 01:30 PM
EduSciVis-er
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
Okay, I found this thread: https://groups.google.com/forum/?fro...3d/vfzbQqUeOwQ
So I created a blank white image in PS at the specified resolution, saved it as a 32-bit tiff, since the bit-depth in the Attr Editor was 32. I tried a render and the image now looks like it has some grayscale information for my render. So that's cool. I turned off writeable and am now rendering again. I think it might be going okay, but the output window says this:
PHEN 0.10 193 MB error: misss_lightmap_write: Lightmap 1073741828 is not writable, aborting lightmapping.

Is that expected? I guess I'll just see how the render looks.

# 15 02-05-2013 , 02:53 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
I remember this being a pain as well. You could also just make an SSS pass, and comp it together later.


Imagination is more important than knowledge.
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads