Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / Max 2009 - Rebuild FG map and Photon map
  RSS 2.0 ATOM  

Max 2009 - Rebuild FG map and Photon map
Rate this thread
 
25533
 
Permlink of this thread  
avatar
  • tubel
  • Posted: 14 April 2009 04:50 AM
  • Total Posts: 1
  • Joined: 15 February 2007 05:43 AM

Hello all,

I’m trying to rebuild FG map and Photon map from a maxscript but without any luck. FinalGatherRebuild returns “Unknown property”. Any idea how can I regenerate my maps from a script?

Thanks you very much!

Script

mentalRR mental_ray_renderer ()
if 
classof renderers.current==mental_ray_renderer then
    
(
        
mentalRR.FinalGatherEnable2 true
        mentalRR
.UseFinalGatherFile true
        mentalRR
.FinalGatherFilename = @"F:\work\test.fgm"
        
mentalRR.FinalGatherRebuild true
    }

Error

>> MAXScript FileIn Exception: -- Unknown property"FinalGatherRebuild" in mental_ray_renderer:mental_ray_renderer <<


Replies: 0
avatar
  • deftang1
  • Posted: 18 April 2009 01:46 PM

For max 2009 (and probably previous versions) you can use the following code:

if classof renderers.production==mental_ray_renderer do
(
   --Final 
Gather
   renderers
.production.UseFinalGatherFile true
   renderers
.production.FinalGatherFreeze true
   renderers
.production.FinalGatherFilename = (Enter filename string)

   --
GI
   renderers
.production.PhotonMapUseFile true
   renderers
.production.PhotonMapFilename = (Enter filename string)
)


Replies: 0