----
my test procedure was :
- in Daz Studio 4.6 build a scene with 2 planes and 2 spheres and a radio prop with 5 materials, 4 lights
- export to blender using mcjTeleblender, use-mat-lib option = off, renderer = Cycles
- in Blender save scene as test001_matlib.blend, delete everything except the lights, save scene as test001_scene.blend, close blender
- in Daz Studio 4.6modify the materials so that they differ from the ones in the matlib, add a clothed figure to the scene
- export to blender using mcjTeleblender, use-mat-lib option = on.
mat-lib file = test001_matlib.blend, renderer = use blend file = test001_scene.blend.
- successfully reproduced the failure !! yay i.e. the materials from the matlib have no name.
- fixed the python code : only rename materials to their old names if they "know" their old name.
OK...got it and it is working PERFECTLY!!!! THANK YOU...THANK YOU....THANK YOU. I've still got a couple of glitch materials but I suspect that is just the issues with moving DAZ material setups to Blender. You've already mentioned that there are some peculiarities.
On the issue of revising materials once one has exercised the matlib option, I see two possible paths.
1. Close Blender and open the Matlib.blend file and make your changes there for subsequent use by mcjTeleblender. OR
2. Make all the materials in the open blend project "local" since they are currently just "linked" to the matlib.blend file, make the material changes as required, save that file to something like matlib_replace.blend. Close Blender delete the old matlib and replace/rename it with the new file???
Am I missing some options here? I'm not sure how difficult it is to convert materials to "local" when you are working with a project with multiple objects and multiple materials on those objects. I know Blender has a make all local option but I suspect you can only do that one object at a time??
I'm attaching my node setup to convert bump maps to normals. I don't know if this is an improved way to do bump/normal mapping in Blender but it seems to be a good alternative if the project doesn't already have normal maps.
Obviously there needs to be a value in the multiply node to establish the amount of influence. This number is normally quite small for skin influence - .005
according to the documentation, the fact that i use "link=False" should make it a non-linked append !
so why is it linked?
is it?
so if i teleblend the scene with the use-mat-lib option turned on i save this blender scene i modify the matlib itself i reopen the saved scene ...
yes ! they are linked
so here again we're lucky the problem is reproducible
( i read somewhere that the linking works in some versions of Blender and not in others )
i'll see if i can force link breaks ... maybe i can break the links one by one after i import the list of materials
Casual...unless you see a real benefit to eliminating the linked files, don't work too hard on this. I'm actually experimenting with some work arounds. I wonder if it is possible to open the Matlib.blend file while the new project file, the one created with the "use matlib option" checked, is open? If so, changing the material settings in the matlib.blend file, should dynamically influence the materials in the open project file that is linked to it. (I have to test this)
If that works, there could be advantages to leaving the links in place, though I really don't see any disadvantages to opening each new project file with "local" not linked materials, as long as one can save the new settings back to the original matlib.blend file. I take it that the matlib.blend file can be overwritten as long as there are no active links at the time of the overwrite.
It may all come down to strategy and work flow. You have done an outstanding job of getting mcjTeleBlender2 to the point where you have it!
tomorrow i'll post a new version with improved use-mat-lib handling
i cooked my own append function and it looks like
#---------------------------------------------
def izin( value, list ):
try:
i = list.index( value );
return( True );
except ValueError:
return( False );
#---------------------------------------------
def myAppendMats( filePath, mats ):
lib = bpy.data.libraries.load( filePath );
with lib as ( data_from, data_to ):
for m in data_from.materials:
if( izin( m, mats ) == True ):
lib.materials.append( m );
Casual....you are AWESOME! Thanks for testing out the theory of dynamic influence with the linked materials. My other work around was simply going to be to limit the materials in the matlib.blend file to only those that I needed to adjust and then, with a smaller material set, manually make them "local" in the new blend project that is created using the matlib option. If you can/have figured out how to make those materials local on export after pulling the reference from the matlib.blend file, that will make the process of subsequent material tweaks a breeze. I feel like your life was easier before I came along but there must be other ambitious users out there that will benefit from these modifications to your script and the process.
quick question,
why are my models importing into blender with no textures when I render
Im using the default settings for this plugin.
DS4.6 64 WIn7
Blender 2.67 64
sometimes when the textures are .png images Daz Studio's obj/mtl exporter
"tells" Blender to look for .jpg images, so blender is unable to find the .png images.
To avoid this you can check-mark mcjTeleblender's "Collect Maps" option
this way .jpg copies of the texture images will be placed in a "Maps" folder
in the same folder as your exported scene files ( .obj .mtl .py .bat )
modern figures like Genesis use gigantic textures like 6000x4000 pixels
and the Blender-Cycles-GPU renderer tries to place them all in the memory of
your graphics card. If it cant, the render doesn't work.
the Blender/Cycles-CPU renderer will be able to render it though.
another solution is to use smaller resized copies of your textures
sometimes i shrink all textures to a maximum of 1000 pixels wide
---
maybe you are using other renderers?
---
in the folder where your scene file was exported ( the folder you specified in teleblender's "export scene as obj" section )
there's a .bat file, example: "myscene.bat", you can use it to launch Blender and load your scene -- the advantage is that you'll get the Blender Console window and be able to read error reports issued during the loading of your scene -- messages like "unable to find mariatexture.png"
---
if you left the "export scene as obj" file at "C:\scene.obj" it's preferable to change it to somewhere under Libraries/Documents
since linked material libraries can be useful or an annoyance
i'm making the finishing touches to a new version of mcjTeleblender
and the mcjBlendBot kit which lets you use the "use-mat-lib" option
with or without linking
( Amy Dreamer, test scene used during development )
quick question,
why are my models importing into blender with no textures when I render
Im using the default settings for this plugin.
DS4.6 64 WIn7
Blender 2.67 64
sometimes when the textures are .png images Daz Studio's obj/mtl exporter
"tells" Blender to look for .jpg images, so blender is unable to find the .png images.
To avoid this you can check-mark mcjTeleblender's "Collect Maps" option
this way .jpg copies of the texture images will be placed in a "Maps" folder
in the same folder as your exported scene files ( .obj .mtl .py .bat )
modern figures like Genesis use gigantic textures like 6000x4000 pixels
and the Blender-Cycles-GPU renderer tries to place them all in the memory of
your graphics card. If it cant, the render doesn't work.
the Blender/Cycles-CPU renderer will be able to render it though.
another solution is to use smaller resized copies of your textures
sometimes i shrink all textures to a maximum of 1000 pixels wide
---
maybe you are using other renderers?
---
in the folder where your scene file was exported ( the folder you specified in teleblender's "export scene as obj" section )
there's a .bat file, example: "myscene.bat", you can use it to launch Blender and load your scene -- the advantage is that you'll get the Blender Console window and be able to read error reports issued during the loading of your scene -- messages like "unable to find mariatexture.png"
---
if you left the "export scene as obj" file at "C:\scene.obj" it's preferable to change it to somewhere under Libraries/Documents
I'm using V4 I set up in Studio, then export with the plugin and it looks like the first time I go to render it actually works, but if I bring in the obj from the exporter plugin with "collect maps" checked it does not keep the materials. Or, if I use the first export that did render with the textures, join the figure to one mesh and append that mesh into a new scene I get no textures.
I've been modeling with Blender for just under a year so while I'm okay with making stuff I only recently starting figuring out how to use the camera and set up scenes so there may be very basic steps I'm missing,
I'm also saving to the desktop, my account, admin rights.
DS4.6 64, Blender 4.67, Win 7 Utl 64, 12GB RAM, 1GB VRAM, Intel i7
i loaded V4 and dressed her
i created a folder on the desktop named teleblend
i told mcjTeleblender to export the scene as scene.obj in the desktop/teleblend folder
i used the "collect maps option
as you can see in the image below, the texture images ( just copies of them, the originals are safe )
were placed in the desktop/teleblend/Maps folder
and the textures are huge !, see there's 4000x4000 pixel images
and the Blender-Cycles renderer indeed is unable to fit all that in the video card memory
so using photoshop, i open and resize all those images to 1024 pixels wide
this time the GPU (fast) render proceeds
the skin color looks bizarre
but you can see by the face makeup that the image textures are there
--
in Daz Studio, for each surfaces that was made transparent by having its "opacity strength" turned down to zero
you must apply a fully black texture image to their opacity channels. because (tele)Blender's transparencies work like that
motably the eye "tear" and eye "eyesurface" materials
for an unknown reason V4's skin is given a greenish tint, this must be change to white
and we get something that starts to be acceptable
next time you transfer a scene, all the textures you patiently resized will be replaced by 4000x4000 pixels images
so you need to do something about it
for example, in daz studio, you could re-texture V4 using shrunk copies of the originals
if you select an object and go in Blender's "Object" panel ( the icon for this panel is am orange'ish cube )
by un-checkmarking "Camera" you can make an object invisible, yet it continues to cast shadows
so if you add a white plane on the ground you can render the shadows
then you render the background
then you render your scene without the ground/shadow plane
in Blender's Render panel, you check-mark the "Film Transparent" option
and save the render as an RGBA .png images
after someone tweaks, builds and perfects a shader (node-tree) in Blender-Cycles
there would be a Blender (python) script to export the node-tree ( or noodle it's called )
as a Blend file (probably )
and
as a Daz Studio script, a material preset, with all the same parameters and texture paths as the node-tree
you could apply this material-preset to objects/figures in your Daz Studio scenes
mcjTelebBlender would recognize this type of material (marker) ,
and collect all the parameters and texture paths, and write them to
a special .mtl file (or an Open Shader file if i dare ).
On the receiving end, a Blender python script would rebuild the node-tree
and apply the parameters and textures to it
dont think i' will go the more complicated road of making the node-trees editable in shader-builder
and the image below isnt related to it - character design by Elie modeling by me
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.
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.
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
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.
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
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
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
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.</p>
May I post these modifications on shareCG, please? I will be glad to send you my code for your review.
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.</p>
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
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.
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.
...
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
...
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
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.
Comments
OK...got it and it is working PERFECTLY!!!! THANK YOU...THANK YOU....THANK YOU. I've still got a couple of glitch materials but I suspect that is just the issues with moving DAZ material setups to Blender. You've already mentioned that there are some peculiarities.
On the issue of revising materials once one has exercised the matlib option, I see two possible paths.
1. Close Blender and open the Matlib.blend file and make your changes there for subsequent use by mcjTeleblender. OR
2. Make all the materials in the open blend project "local" since they are currently just "linked" to the matlib.blend file, make the material changes as required, save that file to something like matlib_replace.blend. Close Blender delete the old matlib and replace/rename it with the new file???
Am I missing some options here? I'm not sure how difficult it is to convert materials to "local" when you are working with a project with multiple objects and multiple materials on those objects. I know Blender has a make all local option but I suspect you can only do that one object at a time??
I'm attaching my node setup to convert bump maps to normals. I don't know if this is an improved way to do bump/normal mapping in Blender but it seems to be a good alternative if the project doesn't already have normal maps.
Obviously there needs to be a value in the multiply node to establish the amount of influence. This number is normally quite small for skin influence - .005
here is the line of code i use to import the matlib
according to the documentation, the fact that i use "link=False" should make it a non-linked append !
so why is it linked?
is it?
so if i teleblend the scene with the use-mat-lib option turned on
i save this blender scene
i modify the matlib itself
i reopen the saved scene ...
yes ! they are linked
so here again we're lucky the problem is reproducible
( i read somewhere that the linking works in some versions of Blender and not in others )
i'll see if i can force link breaks ... maybe i can break the links one by one after i import the list of materials
here is the line of code i use to import the matlib
according to the documentation, the fact that i use "link=False" should make it a non-linked append !
so why is it linked?
is it?
so if i teleblend the scene with the use-mat-lib option turned on
i save this blender scene
i modify the matlib itself
i reopen the saved scene ...
yes ! they are linked
so here again we're lucky the problem is reproducible
( i read somewhere that the linking works in some versions of Blender and not in others )
i'll see if i can force link breaks ... maybe i can break the links one by one after i import the list of materials
Casual...unless you see a real benefit to eliminating the linked files, don't work too hard on this. I'm actually experimenting with some work arounds. I wonder if it is possible to open the Matlib.blend file while the new project file, the one created with the "use matlib option" checked, is open? If so, changing the material settings in the matlib.blend file, should dynamically influence the materials in the open project file that is linked to it. (I have to test this)
If that works, there could be advantages to leaving the links in place, though I really don't see any disadvantages to opening each new project file with "local" not linked materials, as long as one can save the new settings back to the original matlib.blend file. I take it that the matlib.blend file can be overwritten as long as there are no active links at the time of the overwrite.
It may all come down to strategy and work flow. You have done an outstanding job of getting mcjTeleBlender2 to the point where you have it!
when i tried modifying the matlib in one blender window while the scene linking to it is open did not dynamically modify its materials
looks like the "data" of the materials is loaded when you open the scene
--
if you look in the materials list, you can see the linked materials are listed with a capital L in front of the names
--
i wont obsess with it but i'll probably find the solution
tomorrow i'll post a new version with improved use-mat-lib handling
i cooked my own append function and it looks like
Casual....you are AWESOME! Thanks for testing out the theory of dynamic influence with the linked materials. My other work around was simply going to be to limit the materials in the matlib.blend file to only those that I needed to adjust and then, with a smaller material set, manually make them "local" in the new blend project that is created using the matlib option. If you can/have figured out how to make those materials local on export after pulling the reference from the matlib.blend file, that will make the process of subsequent material tweaks a breeze. I feel like your life was easier before I came along but there must be other ambitious users out there that will benefit from these modifications to your script and the process.
i have a scene with problematic materials so i should be able to fix the issues of that type you had
i think it's because Blender re-sorts the material list each time i modify it,
and it complicates the work my script does on that list
----
invisible guitar strap !
floating whammy bar and knobs !
quick question,
why are my models importing into blender with no textures when I render
Im using the default settings for this plugin.
DS4.6 64 WIn7
Blender 2.67 64
sometimes when the textures are .png images Daz Studio's obj/mtl exporter
"tells" Blender to look for .jpg images, so blender is unable to find the .png images.
To avoid this you can check-mark mcjTeleblender's "Collect Maps" option
this way .jpg copies of the texture images will be placed in a "Maps" folder
in the same folder as your exported scene files ( .obj .mtl .py .bat )
modern figures like Genesis use gigantic textures like 6000x4000 pixels
and the Blender-Cycles-GPU renderer tries to place them all in the memory of
your graphics card. If it cant, the render doesn't work.
the Blender/Cycles-CPU renderer will be able to render it though.
another solution is to use smaller resized copies of your textures
sometimes i shrink all textures to a maximum of 1000 pixels wide
---
maybe you are using other renderers?
---
in the folder where your scene file was exported ( the folder you specified in teleblender's "export scene as obj" section )
there's a .bat file, example: "myscene.bat", you can use it to launch Blender and load your scene -- the advantage is that you'll get the Blender Console window and be able to read error reports issued during the loading of your scene -- messages like "unable to find mariatexture.png"
---
if you left the "export scene as obj" file at "C:\scene.obj" it's preferable to change it to somewhere under Libraries/Documents
since linked material libraries can be useful or an annoyance
i'm making the finishing touches to a new version of mcjTeleblender
and the mcjBlendBot kit which lets you use the "use-mat-lib" option
with or without linking
( Amy Dreamer, test scene used during development )
sometimes when the textures are .png images Daz Studio's obj/mtl exporter
"tells" Blender to look for .jpg images, so blender is unable to find the .png images.
To avoid this you can check-mark mcjTeleblender's "Collect Maps" option
this way .jpg copies of the texture images will be placed in a "Maps" folder
in the same folder as your exported scene files ( .obj .mtl .py .bat )
modern figures like Genesis use gigantic textures like 6000x4000 pixels
and the Blender-Cycles-GPU renderer tries to place them all in the memory of
your graphics card. If it cant, the render doesn't work.
the Blender/Cycles-CPU renderer will be able to render it though.
another solution is to use smaller resized copies of your textures
sometimes i shrink all textures to a maximum of 1000 pixels wide
---
maybe you are using other renderers?
---
in the folder where your scene file was exported ( the folder you specified in teleblender's "export scene as obj" section )
there's a .bat file, example: "myscene.bat", you can use it to launch Blender and load your scene -- the advantage is that you'll get the Blender Console window and be able to read error reports issued during the loading of your scene -- messages like "unable to find mariatexture.png"
---
if you left the "export scene as obj" file at "C:\scene.obj" it's preferable to change it to somewhere under Libraries/Documents
I'm using V4 I set up in Studio, then export with the plugin and it looks like the first time I go to render it actually works, but if I bring in the obj from the exporter plugin with "collect maps" checked it does not keep the materials. Or, if I use the first export that did render with the textures, join the figure to one mesh and append that mesh into a new scene I get no textures.
I've been modeling with Blender for just under a year so while I'm okay with making stuff I only recently starting figuring out how to use the camera and set up scenes so there may be very basic steps I'm missing,
I'm also saving to the desktop, my account, admin rights.
DS4.6 64, Blender 4.67, Win 7 Utl 64, 12GB RAM, 1GB VRAM, Intel i7
i loaded V4 and dressed her
i created a folder on the desktop named teleblend
i told mcjTeleblender to export the scene as scene.obj in the desktop/teleblend folder
i used the "collect maps option
as you can see in the image below, the texture images ( just copies of them, the originals are safe )
were placed in the desktop/teleblend/Maps folder
and the textures are huge !, see there's 4000x4000 pixel images
and the Blender-Cycles renderer indeed is unable to fit all that in the video card memory
so using photoshop, i open and resize all those images to 1024 pixels wide
this time the GPU (fast) render proceeds
the skin color looks bizarre
but you can see by the face makeup that the image textures are there
--
in Daz Studio, for each surfaces that was made transparent by having its "opacity strength" turned down to zero
you must apply a fully black texture image to their opacity channels. because (tele)Blender's transparencies work like that
motably the eye "tear" and eye "eyesurface" materials
for an unknown reason V4's skin is given a greenish tint, this must be change to white
and we get something that starts to be acceptable
next time you transfer a scene, all the textures you patiently resized will be replaced by 4000x4000 pixels images
so you need to do something about it
for example, in daz studio, you could re-texture V4 using shrunk copies of the originals
fake ground shadows
if you select an object and go in Blender's "Object" panel ( the icon for this panel is am orange'ish cube )
by un-checkmarking "Camera" you can make an object invisible, yet it continues to cast shadows
so if you add a white plane on the ground you can render the shadows
then you render the background
then you render your scene without the ground/shadow plane
in Blender's Render panel, you check-mark the "Film Transparent" option
and save the render as an RGBA .png images
then you composite this using a paint program or with Blender
see http://blenderartists.org/forum/showthread.php?287240-Cycles-Composite-a-3D-Model-into-a-Photo-(Backplate)-HDRI
---
3rd image was done while working on the upcoming use-mat-lib update
i also want to add a way to select if the Blender-Cycle nodes use the "Mix" or the "Add" shader to combine the Diffuse and Glossy components
germ of an idea :
after someone tweaks, builds and perfects a shader (node-tree) in Blender-Cycles
there would be a Blender (python) script to export the node-tree ( or noodle it's called )
as a Blend file (probably )
and
as a Daz Studio script, a material preset, with all the same parameters and texture paths as the node-tree
you could apply this material-preset to objects/figures in your Daz Studio scenes
mcjTelebBlender would recognize this type of material (marker) ,
and collect all the parameters and texture paths, and write them to
a special .mtl file (or an Open Shader file if i dare ).
On the receiving end, a Blender python script would rebuild the node-tree
and apply the parameters and textures to it
dont think i' will go the more complicated road of making the node-trees editable in shader-builder
and the image below isnt related to it - character design by Elie modeling by me
that dawg is in my Iris movie :)
be viewer 761 !
http://www.youtube.com/watch?v=F0NWUmokRs4
one problem will be to figure which channel of the Blender node-tree becomes the diffuse channel .... the opacity channel ... in Daz Studio's material
hmm
so what you see in Blender would not really really be a preview of what will happen in blender
unless i add user intervention
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
and if you add another Mix Shader node between the Glossy and Mix Shader nodes you can control the glossiness even more. ;)
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 ! :)
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! :)
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.
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
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
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
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.</p>
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
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.
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.
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
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.