Forum Groups
  All forums
    Help & Feedback
      Work in progress
      Finished Art
      Non-Max related

Featured Threads
  inspiration alert!!!
(36 replies)
  Indespensible MaxScripts, Plugins and 3rd Party Tools
(37 replies)
  The allmighty FREE Resources Thread !
(17 replies)
  spam alert!!!
(4886 replies)
  Maxforums member photo gallery index
(114 replies)
  Maxforums Member Tutorials
(89 replies)
  three cheers to maxforums...
(240 replies)
  101 Things you didnt know in Max...
(198 replies)
  A Face tutorial from MDB101 :D
(95 replies) Members Gallery
(516 replies)
(637 replies)
  Dub's Maxscript Tutorial Index
(119 replies)

Maxunderground news unavailable

Maxscript question - weird request/idea
show user profile  Dr. Jim
So I've got a scene. It is a curved cyc studio enviro with a spotlight that projects a bitmap onto it.
I render that still and use it as a BG in After Effects as part of a larger project.

I have a lot of these stills to do and I wonder if there is a way to automate it?

1 Point to folder of Jpegs (all same size/aspect already. Prepped and identical)
2 Max loads image (or next image) into the material bitmap slot for the "SPOTLIGHT MATERIAL"
3 Max RENDERS a frame
4 Go to step 2 and repeat until all images in folder have been done

(Not sure if images would need naming convention with sequential numbers? not ideal.....or if it could just "do all images in a folder until done")



read 431 times
6/23/2016 12:18:46 PM (last edit: 6/23/2016 12:18:46 PM)
show user profile  ScotlandDave
Do you mean, assign the image to a spotlights Projector Map slot?

Website | Blog | Contact | Vimeo

read 414 times
6/23/2016 12:54:55 PM (last edit: 6/23/2016 12:54:55 PM)
show user profile  ScotlandDave
I've been doing quite a lot of Maxscript for a job recently so had a bash at this:

It loops through the jpg files in the 'imageFolder' path and renders to the 'outputFolder' path using the filename "BG_sourcefilename.jpg".


fn doIt =

        imageFolder = "C:\Users\MyWorkstation\Desktop\images"
        outputFolder = "C:\Users\MyWorkstation\Desktop\\renders"
        -- Make Sure the Selected Object is a Spot Light

        if ( (findstring (classof $ as string) "spot") != undefined ) then

                -- Step Through All JPG Files in Folder

                for filename in (getFiles (imageFolder+"\\*.jpg")) do
                        -- Assign the Motherfucker

                        $.projectorMap = Bitmaptexture fileName:filename
                        -- Set New Output Filename for Render

                        renderFileName = getFilenameFile filename

                        rendOutputFilename = outputFolder+"\BG_"+renderFileName+".jpg"
                        -- Render To File

                        render outputfile:rendOutputFilename




Maxcript file here

Website | Blog | Contact | Vimeo

read 408 times
6/23/2016 1:55:54 PM (last edit: 6/23/2016 2:03:15 PM)
show user profile  Dr. Jim
SD - yes!
That is what I mean....I basically have a MAP in a material slot that is instanced to the spot light bitmap projection field. SO yes.

Awesome bro.....let me take a look at this....sounds like it would do exactly what I want.

Thank you!
read 392 times
6/23/2016 3:59:12 PM (last edit: 6/23/2016 3:59:12 PM)
show user profile  Dr. Jim
Also SD.....I am curious if Motherfucker is a function name? or a variable?
Oh's a comment! Got it.
read 391 times
6/23/2016 4:00:20 PM (last edit: 6/23/2016 4:00:20 PM)
show user profile  soontekk
thats right biaaatschj

melting ur brainz!
/ FOS4 / FO2 / Blurb / Twitter / Facebook / Vimeo /

read 386 times
6/23/2016 4:22:56 PM (last edit: 6/23/2016 4:22:56 PM)
show user profile  ScotlandDave
Yeah motherfucker is coders shorthand for 'thing in question', applies in almost any situation..

Website | Blog | Contact | Vimeo

read 379 times
6/23/2016 6:55:55 PM (last edit: 6/23/2016 6:55:55 PM)
#Maxforums IRC
Open chat window