Digital Art Zone

 
   
26 of 47
26
mcjTeleBlender - render Daz Strudio scenes and animations using Blender’s Cycles Render Engine
Posted: 17 September 2013 08:37 AM   [ Ignore ]   [ # 376 ]
Power Member
Avatar
RankRankRank
Total Posts:  2030
Joined  2006-01-19

mix shader add shader

all the Cycles node-trees built by mcjTeleblender/mcjBlendBot

have a node which combines the matte/color component and the glossy/shiny component

at one point in the history i was using a “Mix Shader” node to do this and at another point i used an “Add Shader” node

this feature was not introduced properly, to be frank

..... so .... the new upcoming version will have a new checkbox

which will let you chose that node

—-

As you can see below there’s a noticeable difference

Image Attachments
addmix.jpgglossyisSharp.jpgrough0.jpg
Profile
 
 
Posted: 17 September 2013 08:46 AM   [ Ignore ]   [ # 377 ]
Addict
Avatar
RankRankRankRank
Total Posts:  8035
Joined  2009-05-14

and if you add another Mix Shader node between the Glossy and Mix Shader nodes you can control the glossiness even more. wink

 Signature 

Pete

Somethings to Consider when starting to learn CG

My Gallery

My Render Thread and Tutorials

Proud member of the Bald Wizards Club and Co-operative

Profile
 
 
Posted: 17 September 2013 09:15 AM   [ Ignore ]   [ # 378 ]
Power Member
Avatar
RankRankRank
Total Posts:  2030
Joined  2006-01-19
Szark - 17 September 2013 08:46 AM

and if you add another Mix Shader node between the Glossy and Mix Shader nodes you can control the glossiness even more. wink

but i must be careful and not get into skin shader design else i’ll never be able to get back to the mcjShrinkWrap script/plugin project ! smile


i like that one

http://www.blendswap.com/blends/view/43717

 

see see ? already i’m there’ googling about blender skin shaders, it’s a trap! smile

 

Profile
 
 
Posted: 17 September 2013 09:35 AM   [ Ignore ]   [ # 379 ]
Addict
Avatar
RankRankRankRank
Total Posts:  8035
Joined  2009-05-14

Sorry I didn’t mean for skin but for genrall Diffuse/Glossy surffaces. I rendered this using your excellent script but I had to adjust the nodes to what I said above.

But your settings are a good base the expand on.

Image Attachments
Glass_King9a.jpg
 Signature 

Pete

Somethings to Consider when starting to learn CG

My Gallery

My Render Thread and Tutorials

Proud member of the Bald Wizards Club and Co-operative

Profile
 
 
Posted: 17 September 2013 10:31 AM   [ Ignore ]   [ # 380 ]
Member
Rank
Total Posts:  176
Joined  2003-10-09

The mix/add checkbox is a great idea.  I always modify mcjMakeCyclesNodes to give me a mix shader instead of an add shader.

Lately, I have been examining the .mtl files and the Bender materials handling routine.  It appears that the information exported by DS4.6 to the .mtl file is inadequate.  Also, parameters like nS (specular roughness) are not getting read correctly.  It might be best to find another way to export material information from DS4.6.

Profile
 
 
Posted: 18 September 2013 10:09 AM   [ Ignore ]   [ # 381 ]
Power Member
Avatar
RankRankRank
Total Posts:  2030
Joined  2006-01-19
nakamuram002 - 17 September 2013 10:31 AM

The mix/add checkbox is a great idea.  I always modify mcjMakeCyclesNodes to give me a mix shader instead of an add shader.

Lately, I have been examining the .mtl files and the Bender materials handling routine.  It appears that the information exported by DS4.6 to the .mtl file is inadequate.  Also, parameters like nS (specular roughness) are not getting read correctly.  It might be best to find another way to export material information from DS4.6.

part of the incomplete transfer is due to the fact that in Blender i use the bundled .obj importer
you can see it in the log window rejecting the Km parameter

i didn’t want to create a modified version of Blender’s semi-official importer

if you followed mcjTeleblender earlier this summer i added the transfer of the bump map parameters and the UV maps tiling.

since the early versions the gloss component is controlled globally through the mcjteleblender daz script’
and through the color ( and gray level intensity ) of each surface

maybe next time i’ll have a per-surface roughness parameter transferred the same way i transfer bump map strength i.e. through the python script export ( though that method slows things down a little when dealing with animations )

also see the recent post where i discussed ....sort’of importing/exporting Blender shaders in Daz

 

Image Attachments
blockyworld2.png
Profile
 
 
Posted: 18 September 2013 12:48 PM   [ Ignore ]   [ # 382 ]
Member
Rank
Total Posts:  176
Joined  2003-10-09

Does you maps/tiling export work only for bump maps?  Or does it work for other kinds of maps?

I think that exporting materials from DS as an Open Shader Language file might be the best approach.  Since OSL works for CPU Cycles only, someone would have to implement OSL for GPU Cycles or an OSL to Nodes converter.

Profile
 
 
Posted: 19 September 2013 05:16 AM   [ Ignore ]   [ # 383 ]
Power Member
Avatar
RankRankRank
Total Posts:  2030
Joined  2006-01-19
nakamuram002 - 18 September 2013 12:48 PM

Does you maps/tiling export work only for bump maps?  Or does it work for other kinds of maps?

I think that exporting materials from DS as an Open Shader Language file might be the best approach.  Since OSL works for CPU Cycles only, someone would have to implement OSL for GPU Cycles or an OSL to Nodes converter.

the color, specular, opacity and bump maps are transferred through the .mtl file

materials with active bump maps have the strength parameter transferred through the blender python file using

mcjBlendBot.setBumpMapStrength(‘mcjSofiSofa’, ‘mat2’, 0.024000000417232492 )

tiling is transferred using

mcjBlendBot.setTiling(‘mcjSofiSofa’, ‘mat2’, 4, 0, 3, 0 )

the “offset” part of the tiling may be faulty ... which will be ascertained and fixed some day

i don’t foresee changing the way materials are handled
with the use-mat-lib and the other material lib_ mechanism i think it’s practical the way it is

one thing i’d like to try is, to have a blender script which exports a finalized node-tree as a Daz Material Preset, which would be a basic Daz Default material but with sliders and image map selection for each node and parameter in the Blender node-tree

so if you develop a good skin shader, you could apply it to a different figure, swap the textures and tweak colors and channel strength

when exported for rendering, mcjBlendBot would import the node-tree ( noodel actually, for 1 material )  which would probably be in a .blend file, then apply all the settings from the daz scene material

 

 

 

Profile
 
 
Posted: 20 September 2013 10:40 AM   [ Ignore ]   [ # 384 ]
Power Member
Avatar
RankRankRank
Total Posts:  2030
Joined  2006-01-19

my softlight lighting setup - the environment intensity pas turned down to 0.6
and i have a large hemi-tube floating in the air with an inthensity of 40

it’s one of my Amy Dreamer renders inspired by Army Dreamers by Kate Bush
https://www.youtube.com/watch?v=QOZDKlpybZE

image 3 and 4 are there to test the robustness of your optical nerves

Image Attachments
softlight.jpgin_a_gist.jpg193504.jpgpixelbits.jpg
Profile
 
 
Posted: 20 September 2013 06:18 PM   [ Ignore ]   [ # 385 ]
Member
Rank
Total Posts:  176
Joined  2003-10-09

Casual,

I have tweaked mcjBlendBot, mcjMakeCyclesNodes, and Blender’s import_obj, to “improve” transparency handling and to make use of the Specular Roughness parameter.  I also replaced your Diffuse/Glossy Add Shader with a Mix Shader.  While my modifications will not take us from DS4 to a final “ready-to render” Bender scene, I fell they will make the journey easier.

Picture 1 shows how transparency with no map is handled.  This address the “solid white eyes” problem with DAZ and Dawn characters.  The “d” parameter in the .mtl file is used to set the transparency level, which is the “Fac” parameter in the Mix Shader.  Example is Dawn’s EyelashesLarge material, which is usually set to fully transparent (Opacity Strength=0).

Picture 2 show how tranparency with a map is handled—like it is in “normal” mcjMakeCyclesNodes, except that a Math Multiply node whose “Value” is set to “d” (from .mtl), is inserted between the Texture and MixShaders.  This gives us the ability to use the DS “Opacity Strength” with a map.  Example is Dawn’s Eyelashes material.

Picture 3 shows how the “Ns” or “Glossiness” (specular roughness or reflection quality) parameter from .mtl is used to give us better control over reflections.  “Ns” is scaled by my modified import_objDS to be an 0<=Integer<=511.  It is down-scaled by my modified mcjMakeCyclesNodes to be a 0<=Real<=1, subtracted from 1, and used to set the “Roughness” of the GlossyBSDF Shader (1-“Ns”.)  mcjTeleBlender’s “Gloss Factor” is used to set the “Fac” of the Diffuse/Glossy Mix Shader.  In this way, we can use “Ns” to control the glossiness or reflection quality.  In the real world, there is no “Glossiness”, just reflection quality.  “Glossiness” is just a shortcut used by 3D Software to simulate low-quality reflection.  Example is Dawn’s Iris material.

May I post these modifications on shareCG, please?  I will be glad to send you my code for your review.

Image Attachments
1DawnEyelashesLarge.jpg2DawnEyelashes.jpg3DawnIris.jpg
Profile
 
 
Posted: 21 September 2013 04:47 AM   [ Ignore ]   [ # 386 ]
Power Member
Avatar
RankRankRank
Total Posts:  2030
Joined  2006-01-19
nakamuram002 - 20 September 2013 06:18 PM

Casual,

I have tweaked mcjBlendBot, mcjMakeCyclesNodes, and Blender’s import_obj, to “improve” transparency handling and to make use of the Specular Roughness parameter.  I also replaced your Diffuse/Glossy Add Shader with a Mix Shader.  While my modifications will not take us from DS4 to a final “ready-to render” Bender scene, I fell they will make the journey easier.

Picture 1 shows how transparency with no map is handled.  This address the “solid white eyes” problem with DAZ and Dawn characters.  The “d” parameter in the .mtl file is used to set the transparency level, which is the “Fac” parameter in the Mix Shader.  Example is Dawn’s EyelashesLarge material, which is usually set to fully transparent (Opacity Strength=0).

Picture 2 show how tranparency with a map is handled—like it is in “normal” mcjMakeCyclesNodes, except that a Math Multiply node whose “Value” is set to “d” (from .mtl), is inserted between the Texture and MixShaders.  This gives us the ability to use the DS “Opacity Strength” with a map.  Example is Dawn’s Eyelashes material.

Picture 3 shows how the “Ns” or “Glossiness” (specular roughness or reflection quality) parameter from .mtl is used to give us better control over reflections.  “Ns” is scaled by my modified import_objDS to be an 0<=Integer<=511.  It is down-scaled by my modified mcjMakeCyclesNodes to be a 0<=Real<=1, subtracted from 1, and used to set the “Roughness” of the GlossyBSDF Shader (1-“Ns”.)  mcjTeleBlender’s “Gloss Factor” is used to set the “Fac” of the Diffuse/Glossy Mix Shader.  In this way, we can use “Ns” to control the glossiness or reflection quality.  In the real world, there is no “Glossiness”, just reflection quality.  “Glossiness” is just a shortcut used by 3D Software to simulate low-quality reflection.  Example is Dawn’s Iris material.

May I post these modifications on shareCG, please?  I will be glad to send you my code for your review.

yes no problem you can post modified versions

i’ll probably implement them too, just not sure yet if i want the opacity and glossy parameters to be handled by a modified blender-python -obj-importer though this has the advantage of being compatible with obj/mtl files from poser , carrara etc

 

 

Profile
 
 
Posted: 21 September 2013 03:07 PM   [ Ignore ]   [ # 387 ]
Member
Rank
Total Posts:  176
Joined  2003-10-09

Thanks Casual!!  I hope you can incorporate my modifications.  I learned a lot in making them.  Please realize that Blender’s import_obj.py has been left unaltered.  My new module is called import_objDS.py.  References in mcjBlendBot and mcjMakeCyclesNodes have been changed.

My modifications are now available to everyone at: http://www.sharecg.com/v/72122/view/8/Script/Mods-for-mcjTeleblender-DAZ-Studio-to-Blender.

Profile
 
 
Posted: 25 September 2013 09:03 AM   [ Ignore ]   [ # 388 ]
Member
Rank
Total Posts:  74
Joined  2006-12-11
Casual - 17 September 2013 08:37 AM

mix shader add shader

all the Cycles node-trees built by mcjTeleblender/mcjBlendBot

have a node which combines the matte/color component and the glossy/shiny component

at one point in the history i was using a “Mix Shader” node to do this and at another point i used an “Add Shader” node

this feature was not introduced properly, to be frank

..... so .... the new upcoming version will have a new checkbox

which will let you chose that node

—-

As you can see below there’s a noticeable difference

Your work and progress (along with other’s experimentation) on node configurations looks wonderful.  You mentioned a new version implementing these improvements.  I am looking forward to that!!!  I haven’t forgot my contribution promise…waiting on a paycheck!  (smile)

Thanks for keeping mcjTeleBlender on your development radar.

 

Profile
 
 
Posted: 25 September 2013 01:27 PM   [ Ignore ]   [ # 389 ]
Power Member
Avatar
RankRankRank
Total Posts:  2030
Joined  2006-01-19
dcmphoto - 25 September 2013 09:03 AM

...
Thanks for keeping mcjTeleBlender on your development radar.

i’m in a bit of a lull but i’ll get back to it

integrate the ideas/code by nakamuram002
which adds opacity strength ( so that materials with 0% opacity in Daz are transparent in Blender , and per-surface gloss control

played with solid physics in Blender it’s so easy https://www.youtube.com/watch?v=QYNxH9DcucI

 

 

Image Attachments
promo.jpg
Profile
 
 
Posted: 28 September 2013 04:21 PM   [ Ignore ]   [ # 390 ]
Member
Rank
Total Posts:  74
Joined  2006-12-11
Casual - 25 September 2013 01:27 PM
dcmphoto - 25 September 2013 09:03 AM

...
Thanks for keeping mcjTeleBlender on your development radar.

i’m in a bit of a lull but i’ll get back to it

integrate the ideas/code by nakamuram002
which adds opacity strength ( so that materials with 0% opacity in Daz are transparent in Blender , and per-surface gloss control

played with solid physics in Blender it’s so easy https://www.youtube.com/watch?v=QYNxH9DcucI

 

Casual… That’s so cool ...you’re animations and music are always so fun and great illustrations. 
Very impressive.
I’m surprised more people aren’t all over the DAZ - blender interphase.

Profile
 
 
   
26 of 47
26