More controls for Hardware OGL


#1

I am a big fan of Element 3D as a Broadcast designer, because it’s fast and for the type of work I do it really is a life saver. I like the Hardware Render in R19 but I’d love more control of how it renders. For instance it would be great to be able to control the distance of the AO and quality of shadows. Also when I render I have to turn everything off like axis and grids. It would be nice to have a control that just rendered polys and generators. As it is I keep having to turn everything off select a generator if using Mograph or Polys when using other geometry.


#2

You can control the viewport AO in R19.


#3

It is relatively easy to create a script that sets the filters in the viewport in one step just as you want them.
Here in Python:


import c4d
from c4d import gui


def main():
    bd = doc.GetActiveBaseDraw()
    bd[c4d.BASEDRAW_DISPLAYFILTER_NULL] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_POLYGON] = True
    bd[c4d.BASEDRAW_DISPLAYFILTER_SPLINE] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_GENERATOR] = True
    bd[c4d.BASEDRAW_DISPLAYFILTER_HYPERNURBS] = True
    bd[c4d.BASEDRAW_DISPLAYFILTER_DEFORMER] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_CAMERA] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_LIGHT] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_SCENE] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_PARTICLE] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_OTHER] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_GRID] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_HORIZON] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_WORLDAXIS] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_BOUNDS] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_HUD] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_SDS] = True
    bd[c4d.BASEDRAW_DISPLAYFILTER_HIGHLIGHTING] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_MULTIAXIS] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_OBJECTHANDLES] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_HANDLEBANDS] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_SDSCAGE] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_NGONLINES] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_HIGHLIGHTING_HANDLES] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_JOINT] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_ONION] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_GUIDELINES] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_GRADIENT] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_OBJECTHIGHLIGHTING] = False
    bd[c4d.BASEDRAW_DISPLAYFILTER_POI] = False # does not work?
    bd[c4d.BASEDRAW_DISPLAYFILTER_BASEGRID] = False
    #DELME_BASEDRAW_DISPLAYFILTER_BONE Bones.
    #DELME_BASEDRAW_DISPLAYFILTER_NULLBONES Null bones.

    bd[c4d.BASEDRAW_DATA_EDITOR_AXIS_POS] = c4d.BASEDRAW_AXIS_POS_OFF;
    #BASEDRAW_AXIS_POS_BL
    #BASEDRAW_AXIS_POS_TL
    #BASEDRAW_AXIS_POS_TR
    #BASEDRAW_AXIS_POS_BR
    
    c4d.EventAdd()


if __name__=='__main__':
    main()

You could even trigger the hardware openGL render from the script.


#4

Nice script. But it would be cool if viewport prefs could also be toggled by the take system o in the Hardware GL render settings.


#5

The AO settings are in your Configure Viewport attributes. Shift-V. There is an Enhanced OpenGL tab and the SSAO has a widget you can click to reveal the settings. I agree wit you about needing more controls of shadows and better filter controls to turn the things you want on and off without having to go through and click through them all repeatedly.


#6

Good tips. I will check them out. Python script looks good but why can’t we just have presets for viewport settings. Should be so simple surely.


#7

Anti Aliasing on the Alpha channel would be good too.


#8

The best method I’ve found so far is to assign anew viewport as the render view, either one of the 4 main ones or add in a new 5th viewport panel and assign that to render. Then in your viewport config, right click the settings you need to change to clean up the view, and set it to local instead of global. This way you can turn off all the grids, lines etc for just this one view.

You now essentially have a single clean opengl view suitable for rendering.


#9

That sounds good I think I will give that a try


#10

Sorry for being an idiot but how to I change a viewport to local and not global?


#11

Not the viewport, just the settings.

Go to View Settings, right-click on any parameter (label), use “Make Parameter Local” from the menu.
You can actually see what parameters are local/global because the global ones have a bold label.


#12

Thanks for that


#13

One other annoyance is when using a Cloner you get a little black dot on the axis of the cloner. This is really rather annoying. Only way to get rid of it is to try and offset the closer from the objects inside it. But it’s tiresome


#14

I think the best you can do is change the color of the dot via the “use color > display color” settings in the basic tab to a color that has less contrast with the enviro. If there is a way to get rid of the dot I’d like to know as well.

I’ve also had issues with deformers that are set to invisible in the falloff settings still being visible in the viewport when they are in the hierarchy of a render instance. In those cases you have to turn off the deformers visibility using the top red dot. Not terrible but took awhile to figure out why they were still visible.


#15

Which dot? If I clone up a cube, theres no extra dots visible from the cloner


#16

try a honeycomb array with a small cube in it. You’ll see it.


#17

That’s a great idea. But it would be great to be rid of it.


#18

you can use the viewport/render controls (dots) in the Object Manager to hide that dot.

Set the cloner’s visibility to red and the objects to be cloned to green


#19

it would be nice if there where just an option to not render any clutter. one switch. That is the first thing I needed in R19. Way too much flapping around trying to achieve what should be an obvious state/goal. My first thought was, make a plugin, but I should not need to.

Paul


#20

Yup. That would indeed be nice. For some work the Hardware render is sufficient for quick turn around.