Announcement

Collapse
No announcement yet.

Maxscript exposure for VRay Presets?

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

  • Maxscript exposure for VRay Presets?

    Is there any exposure for maxscript to the vray presets renders from the "VRay:: System" dialog? Many thanks
    Colin Senner

  • #2
    best to just use the regular max presets?
    Eric Boer
    Dev

    Comment


    • #3
      bearing in mind max 9 has a serious show-stopping bug on presets load.
      Lele
      Trouble Stirrer in RnD @ Chaos
      ----------------------
      emanuele.lecchi@chaos.com

      Disclaimer:
      The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

      Comment


      • #4
        RErender: Max presets aren't nearly as good as VRay render presets. I can't delete the default ones like "mental.ray.hidden.line.render" etc, they just keep coming back no matter how many times I overwrite it and delete the file. Also it saves things I don't necessarily want saved for every scene. With Vray render presets I don't have to save the GI rollout if I don't want to.

        Lele: I have never seen any problems with loading presets in max9, and I do it 100s of times a scene. Am I missing something?

        edit: lele: ah, you are talking about max render presets...nvm.

        Thanks guys!
        Colin
        Colin Senner

        Comment


        • #5
          There was a particular issue where if you load a 3ds Max render preset with a biped in the scene and save, the scene will then refuse to load again... but this is for the 3ds Max render presets, not the V-Ray ones. It may have been fixed in 3ds Max 2008, not sure...

          Back to the point, there is currently no access to the V-Ray presets, but it can be added... what kind of functionality do you need?

          Best regards,
          Vlado
          I only act like I know everything, Rogers.

          Comment


          • #6
            Currently the design of the 3dsmax render presets is great, a docking toolbar with a drop-down list of your presets and what preset you are currently set to, but the functionality of the vray ones is perfect. It'd be nice to have access to the vray presets so I could add the docking and drop-down list to improve vrays!

            Thanks rerender, lele, vlado as always!
            Colin
            Colin Senner

            Comment


            • #7
              but in that case, why not just save a vray-only tab preset, and use the standard max mechanisms?

              And yes, it had to do entirely with max, nothing to do with vray, i should have specified.
              Reportedly, with bipeds or afterburn in a scene.
              http://www.chaosgroup.com/forum/phpB...=181417#181417

              here.

              seems fixed in 2008, thank goodness.
              Lele
              Trouble Stirrer in RnD @ Chaos
              ----------------------
              emanuele.lecchi@chaos.com

              Disclaimer:
              The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

              Comment


              • #8
                but in that case, why not just save a vray-only tab preset, and use the standard max mechanisms?
                Could you point me to what methods are available for doing this?

                It wouldn't be too hard to parse the vfg file to learn the render presets at any rate, if it's a pain to add preset functionality, or if it's decided that it wouldn't be necessary to accomplish what I'm after.
                Colin Senner

                Comment


                • #9
                  when saving a preset, it ask which tabs to save (general, render elements, and so on).
                  Just pick the vray one.
                  Or am i missing something?
                  Lele
                  Trouble Stirrer in RnD @ Chaos
                  ----------------------
                  emanuele.lecchi@chaos.com

                  Disclaimer:
                  The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                  Comment


                  • #10
                    This does work lele, but it doesn't do it on a per-rollout basis like vrays preset do.

                    For instance in one scene I might use an environment override, that differs from another scene.

                    If I save the preset with the environment override and load my ("0" - base quick render) preset it will try and put the override active in my new scene.

                    or conversely if I want to use an override when my preset doesn't have one, I have to load the preset and then add it to my environment override tab each time.

                    Maybe I'm missing something?

                    -Colin
                    Colin Senner

                    Comment


                    • #11
                      I see what you mean, now, yes.
                      You'd rather have a finer grain to deal with.
                      Lele
                      Trouble Stirrer in RnD @ Chaos
                      ----------------------
                      emanuele.lecchi@chaos.com

                      Disclaimer:
                      The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                      Comment


                      • #12
                        bingo

                        How does everyone else handle this?

                        The way I use it is this:

                        0 - Quick'n'dirty render, no glossies, fixed aa
                        1 - Same as above but with glossies
                        2 - Same as above but with fixed aa @ 2
                        3 - AA-Subdivision, with displacement
                        5 - Same as above but with better noise threshold values and adapative amounts, "Final" render settings

                        And while it isn't bad to hit F10, Settings Tab->Presets Button, it would be nice to have it like Maxes.

                        Is there a better way?
                        Colin Senner

                        Comment


                        • #13
                          Marc Lorenz wrote a script that recreated the vray presets more or less, probably some issues with 1.50 compatibility. The script is not encoded if someone wanted to update it. Marc?


                          anyways the script worked great back in the day

                          http://plugins.angstraum.at/
                          Eric Boer
                          Dev

                          Comment


                          • #14
                            cool, checking out the script now.
                            Colin Senner

                            Comment


                            • #15
                              Here is the basis for the script, it replicates Maxes drop-down list of presets.

                              It reads the presets you have and creates the drop-down list for each of them, there is no functionality after that.


                              NOTE: Change the line

                              global vrayPresetFile = "C:\\Documents and Settings\\csenner\\Local Settings\\Application Data\\Autodesk\\3dsmax\\2008 - 32bit\\enu\\plugcfg\\vray.cfg"

                              to reflect your own vray.cfg file!, don't forget double \\ or forward slashes /


                              RErender, Vlade, Lele, with maxscript exposure to vray system presets, implementing the rest will be a snap, without it, it will be messy and a bit difficult, but I'm willing to try Thanks for your help, take a look.

                              Code:
                              -- VRay Render Shortcuts
                              
                              -- Closes previously opened scripts
                              if rlt_VRS != undefined then destroyDialog rlt_VRS
                              
                              global rlt_VRS, rlt_TextPad
                              
                              global vrayPresetFile = "C:\\Documents and Settings\\csenner\\Local Settings\\Application Data\\Autodesk\\3dsmax\\2008 - 32bit\\enu\\plugcfg\\vray.cfg"
                              global presetFileArr = #()
                              global presetFileArrS = ""
                              
                              (
                              	fn ReadPresetFile = (
                              		-- Clear variables
                              		presetFileArr = #()
                              		presetFileArrS = ""
                              		
                              		if (local fs = openFile vrayPresetFile mode:"r") != undefined then (
                              			-- Opened the Config File		
                              			print "Opened Config File."
                              
                              			while not(eof fs) do append presetFileArr (readLine fs)
                              
                              			close fs
                              			print "File Read Correctly."
                              			
                              			for i = 1 to presetFileArr.count do
                              				presetFileArrS += presetFileArr[i] + "\n"
                              		) 
                              		else (
                              			messageBox "Could not read your config file!\nPlease edit the script and change the line\n\nglobal vrayPresetFile = \"C:\\\\Documents and Settings\\\\csenner\\\\Local Settings\\\\Application Data\\\\Autodesk\\\\3dsmax\\\\2008 - 32bit\\\\enu\\\\plugcfg\\\\vray.cfg\"\n\n  to reflect your config file, don't forget to make the dashes double \\\\"
                              		)
                              	)
                              	
                              	fn getPresetNames = (
                              		local arr = #()
                              		for i = 1 to presetFileArr.count do (
                              			if (findString presetFileArr[i] "preset \"") != undefined then (
                              				local start = (substring presetFileArr[i] 9 100)
                              				local end =  (substring start 1 (start.count-3))
                              				append arr end
                              			)
                              		)
                              		arr
                              	)
                              	
                              	rollout rlt_VRS "V-Ray Render Shortcuts" (
                              		checkbutton cbtn_Textpad "TextPad"
                              		label lbl_vrayPreset "VRay Presets:" align:#left offset:[0,5]
                              		dropdownlist ddl_Presets width:50 offset:[75,-21] align:#left
                              		
                              		on rlt_VRS open do (
                              			clearListener()
                              			
                              			ReadPresetFile()	-- now the variable presetFileArr holds the file contents, and presetFileArrS holds the file contents in string form
                              			ddl_Presets.items = getPresetNames()
                              
                              			-- Variables 
                              			-- presetFileArr     - Array - holds the entire vray.cfg file in array form
                              			-- presetFileArrS   - String - holds the entire vray.cfg file in string form with newLine chars
                              		)
                              		
                              		on cbtn_TextPad changed thestate do (
                              			if thestate then createDialog rlt_Textpad 580 780
                              			else destroyDialog rlt_Textpad
                              		)			
                              	)
                              	
                              	rollout rlt_TextPad "TextPad" (
                              		edittext edt_textpad width:550 height:760
                              		
                              		on rlt_TextPad open do (
                              			edt_textpad.text = presetFileArrS
                              		)
                              	)
                              	
                              	createDialog rlt_VRS 165 60
                              	cui.RegisterDialogBar rlt_VRS
                              )
                              Colin Senner

                              Comment

                              Working...
                              X