Home Technical Talk

3ds max viewport AO minimum radius

polycount sponsor
Offline / Send Message
Joost polycount sponsor
Does anyone know of a way to decrease the radius further? It looks fine in orthographic mode but in perspective mode and camera views it's way too big.

(Using 2012)

pWaNzCw.png

Replies

  • Ott
    Offline / Send Message
    Ott polycounter lvl 13
    Did you try rescaling your objects?
  • Joost
    Offline / Send Message
    Joost polycount sponsor
    It's all in (approximately) real world scale so I can't really mess with the scale.
  • Ott
    Offline / Send Message
    Ott polycounter lvl 13
    Try saving. Scaling. Rebaking AO. Reopening.

    You don't have to keep the size forever - only to get the maps.

    It's easier to help with screenshots of the results as well.
  • Amsterdam Hilton Hotel
    Offline / Send Message
    Amsterdam Hilton Hotel insane polycounter
    i kinda think you should change your system/display units so you can work at a non-microscopic scale. the default for this setting is like, 15. but if you can't do that then you can still instance your model and scale it up just for screenshots
  • Joost
    Offline / Send Message
    Joost polycount sponsor
    Sorry I should have been a bit more clear. I meant viewport SSAO.

    It's a very minor issue but It's been bugging me at work. Won't be able to change the unit scale but instancing and scaling up should be alright, thanks!
  • monster
    Offline / Send Message
    monster polycounter
    The lower limit is imposed on the spinner on the UI. You can set a lower radius with MaxScript.

    To make the code re-usable, paste the following into a new MaxScript editor window. Then select the text and drag it to your toolbar. It'll make a button for you. Then you can right click on the button and edit the appearance.
    aViewport = NitrousGraphicsManager.GetActiveViewportSetting()
    aViewport.AmbientOcclusionRadius = 0.001
    
  • Joost
    Offline / Send Message
    Joost polycount sponsor
    Thanks Monster, that's exactly what I was after!
    For future reference, where/how did you find that command?

    It's a pretty pointless script but I made a rollout for it if anyone's interested.
    (
    Rollout ChangeAORadius "SSAO"
    
    (
    spinner AORadius "AO Radius" range:[0.001,10,0.05] type:#float scale:0.005
    
    	on AORadius changed val do
    	(
    	aViewport = NitrousGraphicsManager.GetActiveViewportSetting()
    	aViewport.AmbientOcclusionRadius = val
    	)
    	
    spinner AOIntensity "AO Intensity" range:[0,10,1] type:#float 
    
    	on AOIntensity changed val do
    	(
    	aViewport = NitrousGraphicsManager.GetActiveViewportSetting()
    	aViewport.AmbientOcclusionIntensity = val
    	)
    )
    
    CreateDIalog ChangeAORadius
    )
    
  • monster
    Offline / Send Message
    monster polycounter
    Honestly, I've just been MaxScripting for 15+ years. When new versions of Max come out I study the What's New page for MaxScript and the SDK.

    From there, I was made aware of the NitrousGraphicsManager, so I did the following command to find the active viewport settings.
    showInterface NitrousGraphicsManager
    

    Finally, the flollwing command to get the ambient occlusion setting:
    aViewport = NitrousGraphicsManager.GetActiveViewportSetting()
    showInterfaces aViewport
    

    Note showInterface and showInterfaceS are different commands.
  • Joost
    Offline / Send Message
    Joost polycount sponsor
    Bit beyond my limited scripting skills, but thanks a lot for the explanation!
Sign In or Register to comment.