Author Topic: Batch Render Help  (Read 1895 times)

0 Members and 1 Guest are viewing this topic.

Guest

  • Guest
Batch Render Help
« on: October 25, 2006, 09:55:25 AM »
I'm working on a little program that will render multiple camera views within a drawing without any user interaction.  However, my renderings are looking a lilttle less than perfect.  For instance, in a room with walls, doors, steel, floor and ceiling slabs and mechanical equipment the only thing I end up with are the slabs and the steel.  If I do the rendering the old fashioned way, I get everything (as I should).   Below is the code... Am I missing anything??

Comments & suggestions are welcome!

Quote
;;;===============================================
;;;  File Name ............ RENDERFARM.lsp
;;;  Main Function ........ RENDERFARM
;;;  Written By ........... Matt W
;;;
;;;  Compatibility ........ AutoCAD 2005
;;;
;;;  Notes:
;;;
;;;  Menu entry = ^P^C^C(load "RENDERFARM");RENDERFARM;
;;;
;;;===============================================
;;;  Revision History:
;;;
;;;    Version ..... 1.0    10-14-06    Initial Release
;;;
;;;===============================================


;;;===============================================
;;; Function:    RenderFarm
;;;
;;; Description: Batch renders a drawing with AEC_CAMERAs
;;;===============================================
(defun C:RenderFarm ( / a len cnt ent obj)
   (setq a (ssget "x" '((0 . "AEC_CAMERA"))))
   (arxload "acrender.arx")
   (setq len (sslength a))
   (setq cnt 0)
   (repeat len
      (setq ent (ssname a cnt))
      (setq obj (entget (ssname a 0)))
      (if (= len 1)
         (progn
            (command "aeccamera" "view" "")
            (c:rpref "dest" "file")
            (c:rfileopt "tiff" 2048 1366 1.0 "C24")
            (c:rpref "stype" "aray")
            (c:rpref "toggle" "cache" "on")
            (c:rpref "toggle" "shadow" "on")
            (c:rpref "toggle" "finish" "on")
            (c:rpref "toggle" "skiprdlg" "on")
            (c:render (strcat "E:/Temp/RenderFarm-" (rtos cnt 2 0) ".tif"))
         )
         (progn
            (command "aeccamera" "view" ent "")
            (c:rpref "dest" "file")
            (c:rfileopt "tiff" 2048 1366 1.0 "C24")
            (c:rpref "stype" "aray")
            (c:rpref "toggle" "cache" "on")
            (c:rpref "toggle" "shadow" "on")
            (c:rpref "toggle" "finish" "on")
            (c:rpref "toggle" "skiprdlg" "on")
            (c:render (strcat "E:/Temp/RenderFarm-" (rtos cnt 2 0) ".tif"))
         )
      )
      (setq cnt (+ cnt 1))
   )
   (alert "RENDERFARM is complete!")
   (princ)
)

(princ)
;;;===============================================

Didge

  • Bull Frog
  • Posts: 211
Re: Batch Render Help
« Reply #1 on: October 25, 2006, 11:14:00 AM »
Try this  :-)

Code: [Select]
(c:rpref "SELECT" "ALL")
EDIT:  I suspect the (c:rpref "toggle" "cache" "on") line might actually slow things down a touch unless you're wanting to render exactly the same view each time.


« Last Edit: October 25, 2006, 11:20:28 AM by Didge »
Think Slow......