help please GLSL bad issues

PadonePadone Posts: 3,700

Now I'm done with iray tests and I'm beginning to explore glsl capabilities.
I believe glsl could be a powerful option for fast animation of toons.

Unfortunately I met odd issues already at the very first simple render.
I searched the forum but wasn't able to find something useful. My fault for sure.
Below in the attached images you can see the g2f head rendered with different options.

- basic opengl
There are transparency issues with the hair.
May be basic opengl doesn't support multitexture this would explain the issue.

- intermediate opengl (no glsl)
It seems everything works fine.

- intermediate opengl with glsl
There are transparency issues with the hair and white eyes.
I tried fiddling around with various material parameters but wasn't able to get it working.

platform:
D|S 4.8 Pro + gf2 + default lights n shaders (nothing else installed)
nvidia 820M drivers updated

steps:
- load g2 female
- load toulouse hair
- render basic opengl
- render mid opengl
- render mid opengl + glsl

Note:
I have D|S 4.8 Pro and I only installed D|S + g2f + default lights n shaders.
Do I have to install something else for glsl to work ?

- nvidia 820m card, drivers updated, glsl works fine in Blender so I know the card works fine.
- I set all opengl fx to max values in D|S: edit > prefs > interface > opengl
- The rendering log file doesn't report any error (glsl render) see below

OpenGL features for current hardware:
 OpenGL provider: NVIDIA Corporation
 OpenGL renderer: GeForce 820M/PCIe/SSE2
 OpenGL version: 4.5.0
 Maximum number of lights: 8
 Number of auxiliary buffers: 4
 Number of texture units: 4
 Depth buffer bit resolution: 24
 Maximum OpenGL texture size: 16384 x 16384
 Current OpenGL Texture Quality Setting: Best Quality
 RGBA color bitplane resolutions: 8 8 8 0
 GLSL version: 4.50 NVIDIA
 Shadow mapping supported
 VBO supported

DAZ Studio Started
Creating Pixel Buffer
Pixel buffer - Width: 2048 Height: 2048
Compiling OpenGL Shader...
Fragment Shader:
Fragment Shader compiled successfully.
Linking Shader:
Shader Program successfully linked.

Rendering in OpenGL...
Compiling OpenGL Shader...
Vertex Shader:
Vertex Shader compiled successfully.
Fragment Shader:
Fragment Shader compiled successfully.
Linking Shader:
Shader Program successfully linked.

OGL ShadowMap size: 512 x 512
Loaded image SW_Toulouse_TR1.jpg
Loaded image SW_ToulouseT_Base_TR.jpg
Loaded image V5BreeLashes1.jpg
OGL ShadowMap size: 512 x 512
OGL ShadowMap size: 512 x 512
OGL ShadowMap size: 512 x 512
Saved image: C:\Users\me\AppData\Roaming\DAZ 3D\Studio4\temp\render\r.png
Finished Rendering
Total Rendering Time: 5.87 seconds
Loaded image r.png
Saved image: C:\Users\me\AppData\Roaming\DAZ 3D\Studio4\temp\RenderAlbumTmp\Render 1.jpg

 

opengl.jpg
1621 x 606 - 212K
Post edited by Padone on

Comments

  • PadonePadone Posts: 3,700
    edited September 2015

    .. for some reason the attached picture doesn't show up .. it is jpg 1600x600 200 kb .. seems small to me .. do I have to do anything special for the picture to show up ?

    edit: ok done now the pic is fine ..

    Post edited by Padone on
  • mjc1016mjc1016 Posts: 15,001

    Yes, OpenGL in DS has problems with transparency...never really bothered to figure out why, but lack of multitexture is a distinct possiblity.  The OpenGL shaders used by Studio are a very basic set.  Almost any 5 or more year old game has a better set.

    The eye problem is an opacity/transparency issue.   It probably goes back to the not so great shaders...otherwise try the Cornea or Eye Reflection and set the Opacity to 0. 

    The other thing is, the OpenGL in Studio doesn't handle anything, other than the default Studio shaders approaching anything close to correctly.  If it already is at 0, check the shader used on the Cornea.  I't probably omUberSurface, if it's a default G2F load...switch it to the Studio default (if you don't have one, make a primitive, don't load any textures or anything to it, make sure it is selected and the File > Save As >Shader Preset).

  • PadonePadone Posts: 3,700

    The trick of changing the shader type to DAZ Studio Default works great !! Thanks !!

    smileysmiley

    So it seems that the GLSL shaders only work with DAZ Studio Default materials. This sounds reasonable since the material must be compiled to glsl to work so may be they wrote compilers for the default shader only.

    Now, I see that when I load the default shader that I saved, it replaces the current material. This way I have a shader that works but I have to completely recreate the material from scratch. Is there a way to replace the shader with the default one, but maintaining the basic material properties ? So that I don't have to completely recreate the material ?

    For example, I see that when I change the shader to iRay Uber Base preset, the shader is changed but the material basic properties are mantained. I'd like to have the same but with the DAZ Default Shader instead. Is it possible at all ?

     

  • PadonePadone Posts: 3,700

    Ok, this is the g2f head converted to default shader, it renders perfect with glsl !

    To avoid recreating the materials I used copy and paste of materials. It seems to work fine enought to transfer material properties among different shaders. So I copy the material to a placeholder sphere, then change the shader to Default (here I loose the material), then copy back the material from the placeholder sphere. I don't know if there's a faster method any suggestion is welcome !

     

    glsl.jpg
    535 x 606 - 169K
  • mjc1016mjc1016 Posts: 15,001

    CTL-click on the preset, select Ignore (instead the default choice of Replace).

    That will keep the existing image files in the appropriate locations.

  • PadonePadone Posts: 3,700

    Thank you so much mjc ! You did it again the ctrl-click trick just works fine !! .. The only issue is that it only preserves textures, while copy and paste also preserves all the basic material properties such as color opacity specular etc that are lost with the ctrl-click. Anyway it is a very useful trick to know thank you again !

    smiley

  • Padone said:

    Thank you so much mjc ! You did it again the ctrl-click trick just works fine !! .. The only issue is that it only preserves textures, while copy and paste also preserves all the basic material properties such as color opacity specular etc that are lost with the ctrl-click. Anyway it is a very useful trick to know thank you again !

    smiley

    Try without any conversion at all. For me that works best most of the time.

     

  • PadonePadone Posts: 3,700

    hi Ronmolina, thank you for your reply

    As I said in the first post, unfortunately with out-of-the-box rendering I have issues. It seems that GLSL doesn't support transparency (opacity) in shaders other than the default one. So I do have to do conversions for it to work.

    So, are you saying that you can render the g2 female in GLSL without doing any conversion of shaders ? Don't you get any transparency issues ? If it is so, it would mean that it depends on card and drivers. So, what are your system specs please ? Please reply it would be very useful to know these infos.

Sign In or Register to comment.