Announcement

Collapse
No announcement yet.

Understanding DMC Sampler

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

  • #61
    Very much so - the higher your aa goes, the lower your materials get reduced. I'll try and do a video run through soon.

    Comment


    • #62
      I went back to my old DMC settings and cranked up the material samples, seemed to do the trick! Thanks goes to you for your handy script in auto setting those samples! cheers
      Brendan Coyle | www.brendancoyle.com

      Comment


      • #63
        All good. I've got to try and figure out a method that'll respect bitmaps used in the glossiness slots as at the minute the script won't work for a bertrand type method.

        Comment


        • #64
          I've found everything slows down enormously when the image sampler takes over the work of the material, lighting and GI subdivisions.

          I've been trying to keep the sample rate pass blue except the edges (Green, which Im sampler takes over) and adjusting the color threshold to catch the AA on the edges of reflections (Also green)

          I get really really fast renders with next to no noise.

          General rule of thumb when using a dome light is.

          Dome light- 128 subds
          Brute force subdivs- 128

          Material subdivs if glossiness over .8- 128. If under .8- 256

          DMC- 1 or 2 - 25 up to 50

          Color threshold (Trial and error until) .01 - .05

          Then I adjust the global subdivs until the image noise is acceptably low.
          admin@masteringcgi.com.au

          ----------------------
          Mastering CGI
          CGSociety Folio
          CREAM Studios
          Mastering V-Ray Thread

          Comment


          • #65
            Originally posted by grantwarwick View Post
            I've found everything slows down enormously when the image sampler takes over the work of the material, lighting and GI subdivisions.

            I've been trying to keep the sample rate pass blue except the edges (Green, which Im sampler takes over) and adjusting the color threshold to catch the AA on the edges of reflections (Also green)

            I get really really fast renders with next to no noise.

            General rule of thumb when using a dome light is.

            Dome light- 128 subds
            Brute force subdivs- 128

            Material subdivs if glossiness over .8- 128. If under .8- 256

            DMC- 1 or 2 - 25 up to 50

            Color threshold (Trial and error until) .01 - .05

            Then I adjust the global subdivs until the image noise is acceptably low.
            Those are pretty much my settings too, however I noticed that at 96 Dome subdivision the renders are a bit faster. Can you check your scene maybe to see if you see similar reactions?

            Thanks, bye.
            CGI - Freelancer - Available for work

            www.dariuszmakowski.com - come and look

            Comment


            • #66
              Originally posted by grantwarwick View Post
              I get really really fast renders with next to no noise.
              How fast is a fast render on your system?

              For example the average a 720p animation, what would you aim for render times per frame with these settings on YOUR system?
              Kind Regards,
              Morne

              Comment


              • #67
                I'm fairly close although rarely getting up past 16 on AA. I find I need to go higher on domelights though with HDRI's.

                Comment


                • #68
                  Joconnell, great scripts, thank you.
                  What needs to be added to enable these scripts to be added to the "customize" menu, so we can add them to toolbars or quads etc?
                  I have tried adding something think this:

                  macroScript SetVraySamples
                  category: "VRay"
                  internalCategory: "SetVraySamples"
                  buttonText: "SetVraySamples"
                  icon: #("Render",3)
                  tooltip: "SetVraySamples"

                  But where ever I put it, it breaks the script - I know nothing of scripting

                  Originally posted by joconnell View Post

                  Code:
                  try(destroydialog SetVraySamples)catch()
                  
                  
                  Function setVrayMatSubdivs ActualGlossy glossy_02 glossy_04 glossy_06 glossy_08 glossy_10 = (
                  	
                  	case of (
                  					(ActualGlossy >= 0.0 and ActualGlossy < 0.2): ActualGlossys = glossy_02
                  					(ActualGlossy >= 0.2 and ActualGlossy < 0.4): ActualGlossy = glossy_04
                  					(ActualGlossy >= 0.4 and ActualGlossy < 0.6): ActualGlossy = glossy_06
                  					(ActualGlossy >= 0.6 and ActualGlossy < 0.8): ActualGlossy = glossy_08
                  					(ActualGlossy >= 0.8 and ActualGlossy <= 1.0): ActualGlossy = glossy_10
                  					)	
                  )
                  
                  rollout RollSetVraySamples "Set VrayMat Samples"
                  (	
                  	Group "Material sample amounts" 
                  	(
                  		spinner glossy_00_to_02 "Glossiness 0.0 to 0.2"  range:[00,5000,100] align:#right type:#integer
                  		spinner glossy_02_to_04 "Glossiness 0.2 to 0.4"  range:[00,5000,80] align:#right type:#integer
                  		spinner glossy_04_to_06 "Glossiness 0.4 to 0.6"  range:[00,5000,60] align:#right type:#integer
                  		spinner glossy_06_to_08 "Glossiness 0.6 to 0.8"  range:[00,5000,40] align:#right type:#integer
                  		spinner glossy_08_to_10 "Glossiness 0.8 to 1.0"  range:[00,5000,20] align:#right type:#integer
                  					
                  		button DoubleVraySamples "Double samples" width:180 align:#left
                  		button HalfVraySamples "Half samples" width:180 align:#right offset:[0,-26]
                  	)
                  	button SetVraySamples "Set Sample amounts" width:200 align:#right
                  	
                  	Function ProcessMaterial m =
                  	(
                  		if (classof m) == VRayMtl then 
                  		(
                  			m.reflection_subdivs = setVrayMatSubdivs m.reflection_glossiness glossy_00_to_02.value glossy_02_to_04.value glossy_04_to_06.value glossy_06_to_08.value glossy_08_to_10.value
                  			m.refraction_subdivs = setVrayMatSubdivs m.refraction_glossiness glossy_00_to_02.value glossy_02_to_04.value glossy_04_to_06.value glossy_06_to_08.value glossy_08_to_10.value
                  		)
                  		-- ============================ VRay2SidedMtl =============================================
                  		else if (classof m) == VRay2SidedMtl then
                  		(
                  			ProcessMaterial m.frontmtl
                  			ProcessMaterial m.backmtl
                  		)
                  		-- ============================ SHELLAC =============================================
                  		else if (classof m) == SHELLAC then
                  		(
                  			ProcessMaterial m.shellacMtl1
                  			ProcessMaterial m.shellacMtl2
                  		)
                  		-- ============================ VRayBlendMtl =============================================
                  		else if (classof m) == VRayBlendMtl then
                  		(
                  			ProcessMaterial m.baseMtl
                  			for i = 1 to 9 do ProcessMaterial m.coatMtl[i]
                  		)
                  		-- ============================ VrayMtlWrapper =============================================
                  		else if  (classof m) == VrayMtlWrapper then ProcessMaterial  m.baseMtl
                  		
                  		-- ============================ VrayOverrideMtl =============================================
                  		else if  (classof m) == VrayOverrideMtl then
                  		(
                  			ProcessMaterial  m.baseMtl
                  			ProcessMaterial  m.GIMtl
                  			ProcessMaterial  m.reflectmtl
                  			ProcessMaterial  m.refractmtl
                  			ProcessMaterial  m.shadowmtl
                  		)
                  		-- ============================= Vray CArPaint =====================================================
                  		else if  (classof m) == Vraycarpaintmtl then
                  		(
                  			m.subdivs = setVrayMatSubdivs m.base_glossiness glossy_00_to_02.value glossy_02_to_04.value glossy_04_to_06.value glossy_06_to_08.value glossy_08_to_10.value
                  		)
                  		-- ============================= Vray FAST SSS2 =====================================================
                  		else if  (classof m) == Vrayfastsss2 then
                  		(
                  			m.specular_subdivs = setVrayMatSubdivs m.specular_glossiness glossy_00_to_02.value glossy_02_to_04.value glossy_04_to_06.value glossy_06_to_08.value glossy_08_to_10.value
                  			
                  		)
                  		-- ============================= Vray FLAKESMTL =====================================================
                  		else if  (classof m) == VrayFlakesmtl then
                  		(
                  			m.subdivs = setVrayMatSubdivs m.flake_glossiness glossy_00_to_02.value glossy_02_to_04.value glossy_04_to_06.value glossy_06_to_08.value glossy_08_to_10.value
                  		)
                  		-- ======================================================================================
                  		-- ============================ MULTIMAT =============================================
                  		-- ======================================================================================
                  		else if (classof m) == Multimaterial then for i = 1 to m.count do ProcessMaterial m[i]
                  		
                  		-- ============================= blend (fusion) =====================================================
                  		else if (classof m) == blend then
                  		(
                  			ProcessMaterial  m.MAP1
                  			ProcessMaterial  m.MAP2
                  		)
                  		-- ============================= composite =====================================================
                  		else if (classof m) == compositematerial then
                  		(
                  			ProcessMaterial m.baseMaterial
                  			for i = 1 to m.materiallist.count do ProcessMaterial m.materiallist[i]
                  		)
                  		-- ============================= top-bottom =====================================================
                  		else if (classof m) == topbottom then
                  		(
                  			ProcessMaterial  m.topmaterial
                  			ProcessMaterial  m.bottomMaterial
                  		)
                  		-- ============================= SHELL (coque) =====================================================
                  		else if (classof m) == shell_material then
                  		(
                  			ProcessMaterial  m.originalMaterial
                  			ProcessMaterial  m.bakedMaterial
                  		)
                  	)
                  	
                  	on DoubleVraySamples pressed do
                  	(
                  		glossy_00_to_02.value = glossy_00_to_02.value*2
                  		glossy_02_to_04.value = glossy_02_to_04.value*2
                  		glossy_04_to_06.value = glossy_04_to_06.value*2
                  		glossy_06_to_08.value = glossy_06_to_08.value*2
                  		glossy_08_to_10.value = glossy_08_to_10.value*2
                  	)
                  	
                  		on HalfVraySamples pressed do
                  	(
                  		glossy_00_to_02.value = glossy_00_to_02.value*0.5
                  		glossy_02_to_04.value = glossy_02_to_04.value*0.5
                  		glossy_04_to_06.value = glossy_04_to_06.value*0.5
                  		glossy_06_to_08.value = glossy_06_to_08.value*0.5
                  		glossy_08_to_10.value = glossy_08_to_10.value*0.5
                  	)
                  	
                  	on SetVraySamples pressed do
                  	(
                  		for m in scenematerials  do with undo off ProcessMaterial m
                  	)
                  
                  )
                  
                  CreateDialog RollSetVraySamples width: 400
                  Simon

                  .... . .-.. .--. .-.-.- .--. .-.. . .- ... . ... . -. -.. -.-. .... --- -.-. --- .-.. .- - .
                  I need a new signature
                  --
                  Max2017.1 | Vray 3.70.01| win11
                  ASUS Z790PLUS | i9 13900K | 64Gb RAM | Geforce GTX4070Ti

                  Comment


                  • #69
                    If you have the script open in the maxscript editor, select all the code and just drag it to a toolbar.

                    Comment


                    • #70
                      Originally posted by Morne View Post
                      How fast is a fast render on your system?

                      For example the average a 720p animation, what would you aim for render times per frame with these settings on YOUR system?
                      How long is a piece of string?
                      But as an example if I get a default render time of 10 minutes using universal settings and lots of noise my goal is always to halve the render time with no noticeable noise and I can come pretty close to this.

                      as per render time- No idea, I work in print. Resolutions of 5k up most of the time.

                      Originally posted by joconnell View Post
                      I'm fairly close although rarely getting up past 16 on AA. I find I need to go higher on domelights though with HDRI's.
                      I go higher on AA because I prefer the way the antialising looks but admittedly, I still have much to learn about the back end of Vray.

                      Originally posted by DADAL View Post
                      Those are pretty much my settings too, however I noticed that at 96 Dome subdivision the renders are a bit faster. Can you check your scene maybe to see if you see similar reactions?

                      Thanks, bye.
                      I will check! I guess it depends on the dome lights size / range / time of day.
                      Last edited by grantwarwick; 18-06-2013, 04:09 PM.
                      admin@masteringcgi.com.au

                      ----------------------
                      Mastering CGI
                      CGSociety Folio
                      CREAM Studios
                      Mastering V-Ray Thread

                      Comment


                      • #71
                        Ultimately, people saying they don't have "time" to clean a scene need to take a step back and break vray into two components.

                        Antialising and Noise.

                        Please forgive me if I don't explain it perfectly correct but The tutorials I have been developing go in depth on the subject. I am merely an artist, not a TD so I try to explain things in a way an artist can understand.

                        This scene has settings like this

                        HDR- 256 Subdivs
                        Brute force- 256 subdivs
                        Material subdivs- 512 (Base coat) (.7 glossiness thus the high level) Top coat has 8 subdivs (No glossy)





                        Sorry I forgot to include textures. You want the image sampler to tackle these areas!
                        Last edited by grantwarwick; 18-06-2013, 04:53 PM.
                        admin@masteringcgi.com.au

                        ----------------------
                        Mastering CGI
                        CGSociety Folio
                        CREAM Studios
                        Mastering V-Ray Thread

                        Comment


                        • #72
                          Hey,

                          all this seams great, it's another approach that what I'm used, but I will definitely consider this. Thanks guys.

                          But my main concern is, what if we are doing a animation?
                          Because Grant, when you say the only difference is less AA, well, ok for stills but, when you've got an animation, less AA makes everything noisy/sparkling...

                          How should I treat trees that I see from 100m away? those one will flick, isn't it?
                          even if I put 24 or 128 in the subdiv of the material, the fine geometry will suffer from the start having low dmc.

                          Now I see that you have put 1/50, but your not reaching any red at all, and your blue is solid, all good, but woudn't you have the same rendertime with 1/10 or 1/16 like you showed?
                          From my understanding, speaking of the DMC only, going from blue to green with 1/50 is the same as going form blue to red with 1/25 no?
                          I thought that the whole idea of the heat map was to show visually how the dmc is going up in the subdiv...

                          So for me the only thing that made you render going faster, is upping the HDRI subdiv.

                          It would be good to have a sample scene where we can test each our approach...

                          Thanks anyway, really interesting thread

                          Stan
                          3LP Team

                          Comment


                          • #73
                            Of course the render times would change! Drastically too....

                            upping the HDR to 256 and setting to 1/16 will oversample the image!

                            I'm not sure about animation, I work in print but I will do further testing.

                            BTW, changing to 1/16 and keeping the subdivs at 256 has led to a render time of over 10 minutes....

                            As far as I'm aware, what I've done is effectively "kill" the adaptiveness of the image...or very finely balanced it. The blue represents areas where the image sampler is doing no work and the green represents areas where it is antialising geometry edges and textures.

                            The goal being (Once the subdivs are set correctly) to lower the max rate until you are happy with the edge and texture antialiasing.
                            Last edited by grantwarwick; 18-06-2013, 05:54 PM.
                            admin@masteringcgi.com.au

                            ----------------------
                            Mastering CGI
                            CGSociety Folio
                            CREAM Studios
                            Mastering V-Ray Thread

                            Comment


                            • #74
                              Originally posted by grantwarwick View Post
                              The goal being (Once the subdivs are set correctly) to lower the max rate until you are happy with the edge and texture antialiasing.
                              Totally agree - let the anti aliaser do it's job and no other ones.

                              Comment


                              • #75
                                in the past I've tested this way to go but, at the end, it seems to be almost unusable because of that ultra high material subdivision values; here the problem was material editor taking forever to update the sample sphere ...but maybe I've missed something, any ideas? how do you guys manage those high values?
                                Alessandro

                                Comment

                                Working...
                                X