Announcement

Collapse
No announcement yet.

DR lightcache prepass on localhost script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DR lightcache prepass on localhost script

    anybody made one already?

    i want the lightcache to be rendered on localhost, then stored to a file, then final render with stored solution. because my (slower) render nodes spend all time rendering the lightcache.

    that all should be 100% automated.
    Marc Lorenz
    ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
    www.marclorenz.com
    www.facebook.com/marclorenzvisualization

  • #2
    not quite exactly, but good idea

    Here's a couple basic snippets for the to file/from file part, shouldn't be much of a stretch to turn them into callbacks, probably do it later on if you don't rig something up beforehand.

    http://www.buchhofer.com/upload/file...c_filenames.ms
    http://www.buchhofer.com/upload/file...e_filenames.ms
    Dave Buchhofer. // Vsaiwrk

    Comment


    • #3
      well, here goes, pretty straightforward.., good idea to keep them old athlon beasts somewhat helpful~

      Code:
      (
      	fn PrecalcLightCache  =
      	(
      		savePath=(pathConfig.convertPathToUnc (maxfilePath + "\\Calcs\\"))
      		--Mode: 0=Single Frame, 1=Fly Thru, 2=From File
      		modes=0
      			
      		cam = viewport.getcamera()
      		lmap = savePath +"\\" +maxfilename + "_" + cam.name + "_lc.vrlmap"
      		renderers.current.options_dontRenderImage = true
      		renderers.current.gi_primary_type=3 --set primary bounces to LC
      		renderers.current.lightcache_autoSave = true
      		renderers.current.lightcache_mode = modes
      		renderers.current.lightcache_loadFileName = lmap 
      		renderers.current.lightcache_saveFileName = lmap 
      		renderers.current.lightcache_autoSaveFileName = lmap
      	)
      	
      	fn LoadLightCache =
      	(
      		savePath=(pathConfig.convertPathToUnc (maxfilePath + "\\Calcs\\"))
      		--Mode: 0=Single Frame, 1=Fly Thru, 2=From File
      		modes=2
      		cam = viewport.getcamera()
      		lmap = savePath + "\\"+maxfilename + "_" + cam.name + "_lc.vrlmap"
      		renderers.current.options_dontRenderImage = false
      		renderers.current.gi_primary_type=0 --set primary bounces back to irmap
      		renderers.current.lightcache_autoSave = false
       		renderers.current.lightcache_mode = modes
      		renderers.current.lightcache_loadFileName = lmap 
      		renderers.current.lightcache_saveFileName = lmap 
      		renderers.current.lightcache_autoSaveFileName = lmap		
      	)	
      	
      fn singleFrame =
      		(
      		renderers.current.options_dontRenderImage = false
      		renderers.current.adv_irradmap_autoSave = false
      		renderers.current.adv_irradmap_mode = 1
      		renderers.current.lightcache_autoSave = false
      		renderers.current.lightcache_mode = 0
      	)	
      try(makedir (pathConfig.convertPathToUnc (maxfilePath + "\\Calcs\\")))catch()
      renderers.current.system_distributedRender=false
      PrecalcLightCache()
      max quick render
      renderers.current.system_distributedRender=true
      LoadLightCache()
      max quick render
      singleFrame()
      
      )
      Last edited by dbuchhofer; 27-03-2009, 01:31 PM.
      Dave Buchhofer. // Vsaiwrk

      Comment


      • #4
        Brilliant! I think it needs a few notes though: you need to have the 'calcs' directory already set up and it needs a camera (for the name obviously).
        www.dpict3d.com - "That's a very nice rendering, Dave. I think you've improved a great deal." - HAL9000... At least I have one fan.

        Comment


        • #5
          and that its probably only really useful for people who's workstations are vastly faster than their render slaves

          edited in the calcs dir thing check/creation, a check for vray and for camera could probably be a good idea
          Dave Buchhofer. // Vsaiwrk

          Comment


          • #6
            Hi Dave,

            that's great...works like a charm!
            Marc Lorenz
            ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
            www.marclorenz.com
            www.facebook.com/marclorenzvisualization

            Comment

            Working...
            X