Announcement

Collapse
No announcement yet.

Ignoring displacement during IM and LC prepass

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

  • Ignoring displacement during IM and LC prepass

    Hi there!

    We would like Vray to bypass displacement during GI precalc BUT take into account while rendering, just in one render.

    Traditionally, we used to set up 2 renders, one for gi only - saving the solution - without displacement and the other for the actual render, displacement included. Now we are looking for a faster and more convenient way to do it.

    We are aware of the inaccuracies this method can carry, but willing to accept them for speed's sake.

    We have been looking into scripts to do that but with no success, the same result we got when trying to use vray override mtl, combining a material with displacement on it for the render, and without it for GI.

    If anyone has any ideas or thoughts, we would appreciate it!
    My Youtube VFX Channel - http://www.youtube.com/panthon
    Sonata in motion - My first VFX short film made with VRAY. http://vimeo.com/1645673
    Sunset Day - My upcoming VFX short: http://www.vimeo.com/2578420

  • #2
    What is the issue with the script approach?

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

    Comment


    • #3
      The problem with the scripted approach is that I've been unable to find if there is any maxscript callback launched by VRay after the GI pass to let me switch the state of the 'use displacement' property in the middle of the rendering process.
      And if it is doable I'm not sure if this could cause any kind of problem (other than lighting artifacts) with the renderer itself due the changing of geometry during the process of rendering.

      PS: Panthon and I work in the same place

      Comment


      • #4
        I see; currently V-Ray does not support changing geometry during the rendering itself (might be a thing for a future update), but you can try to make a script to render the image in two passes: first pass, render light cache/irradiance map with displacement off; second pass, render with the saved maps and with displacement on.

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

        Comment


        • #5
          Yeah, would be a nice thing to have an option to disable things like displacement or fur during GI in future versions of VRay.

          I'll investigate on your script idea, Thanks

          Comment


          • #6
            Here is a script to quickly enable all of them in your scene or disable them all, so you can control if your displacement is on or off with the global switch "Displacement"

            Code:
            rollout vdm "VRayDisplacementMod Enable/Disable" (
            	button btn_Enable "Enable all VRayDisplacementMods"
            	button btn_Disable "Disable all VRayDisplacementMods"
            	label lbl_Status "Status:" offset:[25,15]
            	
            	fn updateStatus = (
            		local vdm = getClassInstances VRayDisplacementMod
            		local t=0
            		local f=0
            		
            		for v in vdm do (
            			if v.enabled == true then t += 1
            			else f += 1		
            		)
            		
            		if vdm.count == 0 then
            			lbl_Status.caption = "Status: No VRayDisplacementModifiers in scene"
            		else if t==0 and f!=0 then
            			lbl_Status.caption = "Status: All are OFF"
            		else if t!=0 and f==0 then
            			lbl_Status.caption = "Status: All are ON"
            		else if	t!=0 and f!=0 then
            			lbl_Status.caption = "Status: Some are on and off"
            	)
            
            	on vdm open do (
            		updateStatus()
            	)
            	
            	on btn_Enable pressed do (
            		for v in (local vdm = getClassInstances VRayDisplacementMod) do v.enabled = true
            		updateStatus()
            	)
            	on btn_Disable pressed do (
            		for v in (local vdm = getClassInstances VRayDisplacementMod) do v.enabled = false
            		updateStatus()
            	)
            	
            )
            createDialog vdm 200 100
            Colin Senner

            Comment


            • #7
              You know there is an option in the Global switches rollout of V-Ray that enables/disables displacement, right?

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

              Comment

              Working...
              X