Tutorial: Gradient Background

  1. #1
    Germany Extra Spare Tire blake_spector's Avatar
    Join Date
    Oct 2004
    Posts
    292
    Thanks
    4
    Thanked 22 Times in 6 Posts


    3DS MAX Rhino

    Gradient Background

    Software: 3DS MAX

    Sup!

    This is barely about 'Modeling', but i didnt know where else to put it! Some ppl. were curious about how to get the gradient background (known from Maya) into the 3ds max viewport!

    Gradient Background-bwxc0kx52tdxyj93d.jpg

    Its actually fairly simple. Place the 001.png from the attachment into your 3ds max root directory (i.e. "C:\Programs\Autodesk\3ds Max 20**") and execute the following MAXScript (or use .ms file in attachment - remove .txt):

    Code:
    bgImgPath = symbolicPaths.getPathValue "$max"+"\001.png"
    bgImg = openBitmap bgImgPath
    setAsBackground bgImg
    viewport.DispBkgImage = true
    completeRedraw()
    (actually $max points to the root dir, so you could define any path you want!)

    To turn the background off, execute the following MAXScript (or use .ms file in attachment - remove .txt):

    Code:
    viewport.DispBkgImage = false
    completeRedraw()
    Simple as that!

    ---

    The script activates the background for the active viewport. To get it into all 4 default viewports, hit Alt+B and under "Apply Source and Display to" set it to "All views".

    Once you've set up the background, you can "save" it as default using the following technique:
    Save the file as "maxstart.max" and place it into the default "scenes" folder (you'll find that folder, or are able to change it to a custom location by clicking onto "Customize", "Customize User Paths..." in the main menu bar. In that dialog is the "MaxStart" entry.)

    Good luck!
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by blake_spector; 09-15-2011 at 12:43 PM.

  2. The Following 3 Users Say Thank You to blake_spector For This Useful Post:


  3. #2
    United States V6 Inside Decal EquiNOX's Avatar
    Join Date
    Jan 2009
    Posts
    334
    Thanks
    18
    Thanked 32 Times in 21 Posts


    3DS MAX Rhino
    Thanks man.... But I can't see .png file.... Can you re-upload?

  4. #3
    Germany Extra Spare Tire blake_spector's Avatar
    Join Date
    Oct 2004
    Posts
    292
    Thanks
    4
    Thanked 22 Times in 6 Posts


    3DS MAX Rhino
    Well the .png file is just 1px wide (therefore barely visible)! It's there - i know
    Try right-click + save on the attachment link.

  5. #4
    United States V6 Inside Decal EquiNOX's Avatar
    Join Date
    Jan 2009
    Posts
    334
    Thanks
    18
    Thanked 32 Times in 21 Posts


    3DS MAX Rhino
    Oh there! I see it... I suppose Its not possible to change BG color I wanted?

  6. #5
    Portugal V6 Inside Decal PBenjamim's Avatar
    Join Date
    Aug 2011
    Posts
    343
    Thanks
    4
    Thanked 27 Times in 26 Posts


    3DS MAX
    - nvm it works on 2011. But only 1 viewport has the gradient. How to fix it?
    Last edited by PBenjamim; 09-14-2011 at 04:07 PM.

  7. #6
    Germany Extra Spare Tire blake_spector's Avatar
    Join Date
    Oct 2004
    Posts
    292
    Thanks
    4
    Thanked 22 Times in 6 Posts


    3DS MAX Rhino
    Should work in any Max! Screenshot is from 2011.
    But the script is so basic - it should work down to 2009, and even lower.

  8. #7
    Germany Extra Spare Tire blake_spector's Avatar
    Join Date
    Oct 2004
    Posts
    292
    Thanks
    4
    Thanked 22 Times in 6 Posts


    3DS MAX Rhino
    Quote Originally Posted by EquiNOX View Post
    Oh there! I see it... I suppose Its not possible to change BG color I wanted?
    You could use any background image file you want! The uploaded .png is just a sample, to mimic the Maya style. If you want, just make a gradient with any colors of your choice, save it - and point it to the script. Voila!

  9. #8
    Germany Extra Spare Tire blake_spector's Avatar
    Join Date
    Oct 2004
    Posts
    292
    Thanks
    4
    Thanked 22 Times in 6 Posts


    3DS MAX Rhino
    Quote Originally Posted by PBenjamim View Post
    - nvm it works on 2011. But only 1 viewport has the gradient. How to fix it?
    Hmm, i was searching the MAXScript documentation but didn't find anything to apply background to all viewports (just the active one!). Didnt bother me too much yet, as i'm mainly using 1 viewport all the time - and use keyboard shortcuts to get the different views...

    So you'd have to do it manually, hit Alt+B and under "Apply Source and Display to" set it to "All views".

    Edited the original post with some further information, to set the settings as default.
    Last edited by blake_spector; 09-15-2011 at 12:45 PM.

Tutorial Information

Users Browsing this Tutorial

There are currently 1 users browsing this tutorial. (0 members and 1 guests)

Posting Permissions

  • You may not post new tutorials
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SMCARS.NET

SMCars is your source for Car Blueprints and CGI. SMC is a Community with the largest selection of Car Blueprints on the internet.

Contact | Privacy | Advertising