…The script creates the scene.obj and scene.mat files
along with the scene.bat and scene.py files…
…
Any thoughts?
What I do is, open Blender; then, in a Text Editor window,
bring in the scene.py file and Run that. That’s it!
As for the Km ignored, yes, I get that too.
What effect does it have? Dunno!
OK...I tried to run the py script from the Blender text editor and it seems to be failing on this line which occurs elsewhere in the script also. It is definitely appears to be a mat node setup issue:
my guess is you have shaders in your scenes like iray or uber or AoA
and that material has a bizarre specular channel, maybe one with no glossiness slider
when mcjTeleBlender inquires about the glossy strength, it gets and answer like "NaN"
so, the short term solution would be to replace all the "NaN" in the scene.py file by 0 or 1
or
convert the materials in your scene to the DS Default shader, which on my computer is in the same folder as the iray shader folder
also possible that in mcjTeleBlender's panels you set the default glossy or roughness to a value like o.5 or O,5 .... not a number
----
if you can tell me which shaders have the problem, maybe i can add something so mcjTeleBlender will detect this and work around the source of the NotANumber
------
if there's an imagemap on the one of the specular channels of that surface, you can try removing it
maybe i didnt design mcjTeleBlender to have an image map on that channel
…The script creates the scene.obj and scene.mat files
along with the scene.bat and scene.py files…
…
Any thoughts?
What I do is, open Blender; then, in a Text Editor window,
bring in the scene.py file and Run that. That’s it!
As for the Km ignored, yes, I get that too.
What effect does it have? Dunno!
OK...I tried to run the py script from the Blender text editor and it seems to be failing on this line which occurs elsewhere in the script also. It is definitely appears to be a mat node setup issue:
Thanks for looking into this issue Jacques. That is quite interesting. I'm sure it is a materials issue. This project just has materials on top of materials for each object. I think I'll just build everything from scratch to the extent that I need to use this resource in Blender. Teleblender is still dong a nice job of getting the OBJ files into Blender. I think the material that I used in that short light tube inner was actually and IRAY ceramics shader. I'm not sure becuase the objects are renamed from the DAZ project. As alwyas, thatnks for your reeponse.
Thanks for looking into this issue Jacques. That is quite interesting. I'm sure it is a materials issue. This project just has materials on top of materials for each object. I think I'll just build everything from scratch to the extent that I need to use this resource in Blender. Teleblender is still dong a nice job of getting the OBJ files into Blender. I think the material that I used in that short light tube inner was actually and IRAY ceramics shader. I'm not sure becuase the objects are renamed from the DAZ project. As alwyas, thatnks for your reeponse.
i added image maps to everything that looked like a specular glossy channel
and it didnt cause problems
--
you could check in TB3's "Auxiliary options" panel and make sure "Gloss factor" and "Roughness" have valid numbers as their value
also you could try resetting teleblender using the "Restore defaults" button
then set the path to Blender.exe if it needs to be, and set the .obj output folder to somewhere else than the default which is something like c:\
WOW...thanks again Jacques. You are always so responsive. I know this takes a lot of time. I will do some more experimenting on my end. It appears like you've got mcjTeleBlender performing quite stable, even with the IRAY shaders!
i added image maps to everything that looked like a specular glossy channel
and it didnt cause problems
--
you could check in TB3's "Auxiliary options" panel and make sure "Gloss factor" and "Roughness" have valid numbers as their value
also you could try resetting teleblender using the "Restore defaults" button
then set the path to Blender.exe if it needs to be, and set the .obj output folder to somewhere else than the default which is something like c:\
WOW...thanks again Jacques. You are always so responsive. I know this takes a lot of time. I will do some more experimenting on my end. It appears like you've got mcjTeleBlender performing quite stable, even with the IRAY shaders!
Hello .. Starting using your excelent plugin mcjTeleBlender3 Beta with G2F, the issues I am getting is the purple figure of despair which is easily fixed within Blender.. file\external data\find missing files etc. But the main issue is when in Daz Studio surfaces/textures that are nested in a tree e.g face\specular\primary-secondary-all .. these textures do not get extracted\exported .. ?
I just solved the issue of missing textures when trying to collect all maps by unticking 'collect maps' then utilizing Blender.. file\external data\unpack all into files...
hyphens in path/file names could be a source of problems
note that there's 2 ways the path/filenames are tranfered from Daz Studio to Blender
1 - in the .mtl file, and it's Daz Studio's exporter services that does it - then depending on your mcjTeleBlender settings,
the mtl file may be re-processed by mcjTeleBlender, that's the "Fix .mtl for Blender" checkbox
2 - for images on channels not handled by Daz Studio's .obj/.mtl exporter, the paths and filenames are passed through the scene.py ( if your exported scene is scene.obj/scene.mtl)
Scene.py can be opened and edited in notepad, the lines of code related to texture images are easy to spot
for example, the bump map strengths may be transmitted this way
Hello .. Starting using your excelent plugin mcjTeleBlender3 Beta with G2F, the issues I am getting is the purple figure of despair which is easily fixed within Blender.. file\external data\find missing files etc. But the main issue is when in Daz Studio surfaces/textures that are nested in a tree e.g face\specular\primary-secondary-all .. these textures do not get extracted\exported .. ?
Thanks for the info mCasual, much appreciated .. I have stumbled upon another issue regarding the texture seams of the figure being very noticable within Blender.
Hey Casual, I sent you a PM... not sure you got it. Was wondering if you have a PMD to DS script or can make one for the current version of DS? There is a merchant that is frustrated that she can't get her custom morphs over to DS as they are all saved to PMD files. Sorry for the OT!
in mcjTeleBlender3's options, there's an option called "TB2" that's the old way mcjTeleBlender did things
in TB2 mode the brightness of the "specular color" channel is the only thing you have to control glossiness per material
this brightness along with the mcjTeleBlender's factors called "Gloss Factor" and Roughness are used to build the materials in Blender Cycles
----
when you're in TB3 mode ( TB2 option off ) then the specular strength and glossiness factors are taken into consideration
so you have full per-surface control
---
mcjTeleBlender's "Gloss mix" option also has a big influence on how the glossiness will appear
when gloss-mix option is OFF, in Blender, the output glossy node is ADDed to the diffuse (matte) node
when gloss-mix option is ON, , in Blender, the output glossy node is MIXed with the diffuse (matte) node, in this case (if i remember well) the specular strength controls the mixing
Hey Casual, I sent you a PM... not sure you got it. Was wondering if you have a PMD to DS script or can make one for the current version of DS? There is a merchant that is frustrated that she can't get her custom morphs over to DS as they are all saved to PMD files. Sorry for the OT!
Hint: The directroy string must be terminated with a trailing "\\". If you do not do that, then you always get an error "not a library". I also found that you only need to supply filename and directory, which makes some sense:
At one point there was a script for DS but it was never updated to work in the newer ones when the SDK changed so we have been without that functionality. I kinda thought DS had it internally at this point but perhaps not. It was just to read and implement what ever was writting into the PMD file. So if you loaded up a cr2 that had a PMD file with external morph info then the PMD script would automatically kick in and read and apply the morph info during the import iirc....
Comments
OK...I tried to run the py script from the Blender text editor and it seems to be failing on this line which occurs elsewhere in the script also. It is definitely appears to be a mat node setup issue:
mcjBlendBot.loadfix( "Z:/DAZ 3D/temp/scene.obj", "CYCLESMATS", "C:/matLib.blend", True )
setMatGloss2('short_light_8', 'tube_outer', '', 0, 0.1, 0.1, 0.1, 0.05 )
setMatGloss2('short_light_8', 'tube_inner', '', NaN, 0.1, 0.1, 0.1, 0.05 )
my guess is you have shaders in your scenes like iray or uber or AoA
and that material has a bizarre specular channel, maybe one with no glossiness slider
when mcjTeleBlender inquires about the glossy strength, it gets and answer like "NaN"
so, the short term solution would be to replace all the "NaN" in the scene.py file by 0 or 1
or
convert the materials in your scene to the DS Default shader, which on my computer is in the same folder as the iray shader folder
also possible that in mcjTeleBlender's panels you set the default glossy or roughness to a value like o.5 or O,5 .... not a number
----
if you can tell me which shaders have the problem, maybe i can add something so mcjTeleBlender will detect this and work around the source of the NotANumber
------
if there's an imagemap on the one of the specular channels of that surface, you can try removing it
maybe i didnt design mcjTeleBlender to have an image map on that channel
Thanks for looking into this issue Jacques. That is quite interesting. I'm sure it is a materials issue. This project just has materials on top of materials for each object. I think I'll just build everything from scratch to the extent that I need to use this resource in Blender. Teleblender is still dong a nice job of getting the OBJ files into Blender. I think the material that I used in that short light tube inner was actually and IRAY ceramics shader. I'm not sure becuase the objects are renamed from the DAZ project. As alwyas, thatnks for your reeponse.
a first test, all the 46 iRay shaders bundled with DS4.8
no errors reported
note that since teleblender was in TB2/Legacy mode maybe it helped avoid problems
right now i'll try TB3 mode
--
if your scene had image maps applied to the specular/glossy channels, this may be the cause of the "crashes"
--
ok second test, all the 46 default iRay shaders
teleblender3 in TB3 mode ( not in TB2 mode )
and everything's as it should be
of course the materials dont look like the iRay-rendered versions, since nothing forces them to
So, next i'll try adding image maps on the glossy/specular channels of the iRay shaders
ok second test, all the 46 default iRay shaders
teleblender3 in TB3 mode ( not in TB2 mode )
and everything's as it should be
of course the materials dont look like the iRay-rendered versions, since nothing forces them to
So, next i'll try adding image maps on the glossy/specular channels of the iRay shaders
i added image maps to everything that looked like a specular glossy channel
and it didnt cause problems
--
you could check in TB3's "Auxiliary options" panel and make sure "Gloss factor" and "Roughness" have valid numbers as their value
also you could try resetting teleblender using the "Restore defaults" button
then set the path to Blender.exe if it needs to be, and set the .obj output folder to somewhere else than the default which is something like c:\
WOW...thanks again Jacques. You are always so responsive. I know this takes a lot of time. I will do some more experimenting on my end. It appears like you've got mcjTeleBlender performing quite stable, even with the IRAY shaders!
welcome
it's something i had to do someday anyway, since apparently figures and props will start to be distributed with iRay shaders
maybe maybe i'll make a script that goes through a scene and switches all the shaders to DS Default
for the shoes below i changed the glossy part of the BlenderCycles material to BSDF Velvet light gray and the Diffuse part was made black
didnt need to go in the node editor to do this, i used the material pannel
Hello .. Starting using your excelent plugin mcjTeleBlender3 Beta with G2F, the issues I am getting is the purple figure of despair which is easily fixed within Blender.. file\external data\find missing files etc. But the main issue is when in Daz Studio surfaces/textures that are nested in a tree e.g face\specular\primary-secondary-all .. these textures do not get extracted\exported .. ?
Daz Studio 4.8
Blender 2.76
Thanks Graeme
I just solved the issue of missing textures when trying to collect all maps by unticking 'collect maps' then utilizing Blender.. file\external data\unpack all into files...
hyphens in path/file names could be a source of problems
note that there's 2 ways the path/filenames are tranfered from Daz Studio to Blender
1 - in the .mtl file, and it's Daz Studio's exporter services that does it - then depending on your mcjTeleBlender settings,
the mtl file may be re-processed by mcjTeleBlender, that's the "Fix .mtl for Blender" checkbox
2 - for images on channels not handled by Daz Studio's .obj/.mtl exporter, the paths and filenames are passed through the scene.py ( if your exported scene is scene.obj/scene.mtl)
Scene.py can be opened and edited in notepad, the lines of code related to texture images are easy to spot
for example, the bump map strengths may be transmitted this way
setBumpMapStrength2('C:/Program Files (x86)/DAZ/Studio/content/Runtime/textures/DAZ/Hair/MitsuHairWhite.jpg', 'A3_Mitsu_Hair', 'Hair', 0.019999999552965164 )
so i could go in that folder and make sure that file exists
if the path or filename is bizarre and contains rarely seen characters, say, like french or spanish accents, it may be the source of the problem
the .mtl file are also editable using a plain-text editor
.mtl lines look like
map_Kd C:/Program Files (x86)/DAZ/Studio/content/Runtime/textures/DAZ/Characters/Aiko/Aiko3/Aiko3BodyM.jpg
Kd is for the diffuse map
so here too you could go see if there indeed is a file named Aiko3BodyM.jpg in that folder
note that some older versions of Blender refused to accept that type of path without the use of quotation marks
but other versions of Blender proscribe them !
there's an option in mcjTeleBlender to turn the quotation marks on or off
Thanks for the info mCasual, much appreciated .. I have stumbled upon another issue regarding the texture seams of the figure being very noticable within Blender.
Seems to be the normal map nodes that offset the smooth interaction between neighbouring textures.. once disabled all is fine.
Hi,
Forgive me if this has been asked or answered before. There is a lot of info here to go through...
Is it able to interpret and convert the individual specular/glossy settings from Daz into Blender, or do they all have to be the same?
Thanks.
Hey Casual, I sent you a PM... not sure you got it. Was wondering if you have a PMD to DS script or can make one for the current version of DS? There is a merchant that is frustrated that she can't get her custom morphs over to DS as they are all saved to PMD files. Sorry for the OT!
in mcjTeleBlender3's options, there's an option called "TB2" that's the old way mcjTeleBlender did things
in TB2 mode the brightness of the "specular color" channel is the only thing you have to control glossiness per material
this brightness along with the mcjTeleBlender's factors called "Gloss Factor" and Roughness are used to build the materials in Blender Cycles
----
when you're in TB3 mode ( TB2 option off ) then the specular strength and glossiness factors are taken into consideration
so you have full per-surface control
---
mcjTeleBlender's "Gloss mix" option also has a big influence on how the glossiness will appear
when gloss-mix option is OFF, in Blender, the output glossy node is ADDed to the diffuse (matte) node
when gloss-mix option is ON, , in Blender, the output glossy node is MIXed with the diffuse (matte) node, in this case (if i remember well) the specular strength controls the mixing
i always shied away from looking into them PMD files
maybe they are like PZ2 morph injectors
i'll check it out tomorrow
today i hope ( again ) to complete the new shoes for Aiko3
Thanks Casual, I appreciate it. The shoes look awesome!
Hi,
Need help,
"Use mat-lib"
Fail again with Blender 2.76-cr2 64 bits.
OS=Windows 7 Pro 64 bits
Thank you,
there's tools for morphs over here and maybe one of those can convert pmd to INJectors
http://d3d.sesseler.de/index.php?software=posertool
the more complete version of the manual is at
https://sites.google.com/site/mcasualsdazscripts/mcjteleblender-for-ds1-2-3-4
the ''use mat-lib'' section is titled
Using and re-using a (.blend) material library
i'll test it to see if it still works, it'a an option i rarely used, so it may be broken
0 - i installed Blender 2.76 64 bit release candidate
1 - i copy all the mcj______.py files from the folder
C:\Program Files\Blender Foundation\Blender\2.75\scripts\modules folder
to
C:\Program Files\Blender Foundation\Blender\2.76\scripts\modules
2 - in daz studio i create a plane and a sphere, i make the sphere red
3 - i start mcjTeleBlender3 and set the render mode to Cycles ( not mat-lib )
4 - i click mcjTeleBlender3's "export/open current frame" button
fig 1 - Blender Cycles render of the Daz Scene
5 - in Blender i completely modify the sphere's material
this material is attached to the object named Sphere and the material name is Default
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note that Daz Studio renames materials before exporting them, to avoid confusion
so for instance the material for the blue plane has been exported with the name "Default_Plane"
It's important to remember this, because ithe "use mat-lib" system uses the material names
so if you were to render anotherDaz Studio scene with a plane, that uses the material "Default"
but that material gets exported as "Default" or "Deault_Plane2" then the "use mat-lib" function will fail
because the mat-lib .blend file only contains a material named "Default_Plane"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fig 2. The completely modified Sphere material named 'Default'
6 - i save this scene as myseptember2015testmatlib.blend
7 - i close Blender
8 - back in Daz Studio, i still have mcjTeleBlender3 open, so i select the "use mat-lib" render option
9 - i click the "browse" button and select my myseptember2015testmatlib.blend
fig 3 - mcjTeleBlender ready to re-use the materials in the material library
and we have a ..
10 - So as you may know, mcjTeleBlender produces 4 files when exporting a daz scene
- the .obj/.mtl files which are in fact exported using Daz Studio's built in .obj exporter
though the .mtl file may be re-cooked by mcjTeleBlender to make it Blender compatible
- the .py file which contains a list of things Blender will be asked to perform following the scene import
- the .bat file which lets you do import/render in standalone mode
11 - i close Blender
12 - in windows explorer i double-left-click on the scene.bat file
and i get to see this very precious information from Blender's "console"
well actually there's no error message in here !
looks like mcjTeleBlender simply forgot to tell blender to do the use mat-lib tricks !
13 - i open scene.py in notepad++
the line of interest reads
mcjBlendBot.loadfix( "I:/tmptmp/scene.obj", "USEMATLIBLNK", "I:/z/myseptember2015testmatlib.blend_.blend", True )
( that's actually the .blend filename yes )
14 - in mcjBlendbot.py i see that the function mcjUseMatLib.switchToLibraryMaterials( matLibPath ) is called when the USEMATLIB option is on
so i open mcjUseMatLib and i add somecsode that will let me see if any action is taken ..
15 - looks like, up to that point everything's ok, switchToLibraryMaterials renames the scene materials to avoid material name clashes
then it builds a list of material names to import, then it calls the function that actually imports the materials
... continues in a minute ...
16 - now here's something interesting
same scene but, Blender 2.71 32 bit
AttributeError: Calling operator "bpy.ops.wm.link" error, could not be found
looks like i will need to improve backward compatibility on that point
17 - New Finding !!
when i try to manually Append myseptember2015testmatlib.blend_.blend
to a Blender scene i get the message "Not a library" !!!
but when i try to append from my old .blend files, it works
straindgeu isnt it?
so if we google for
Blender Append notalibrary in the last month
we get Gaia Clary saying
Hint: The directroy string must be terminated with a trailing "\\". If you do not do that, then you always get an error "not a library". I also found that you only need to supply filename and directory, which makes some sense:
Ladies and gentlemen, we got him
looks like the trailing / is no longer allowed !
last time i tried, "/Material/" was OK, but now it has to be "/Material"
that's in the mcjUseMatLib.py by the way
so.... i'll download mcjBlendBot from my site, to be sure i got the same as you
i'll delete 2 characters from mcjUseMatLib.py
and post an mcjBlendBot update on my site
and announce it here
UPDATE UPDATE UPDATE UPDATE mcjBlendBot V3.13 UPDATE UPDATEUPDATE UPDATE
The Use Mat-Lib functionality had stopped working for recent versions of Blender, but i fixed it today
thanks to tan_260_c11cf3e1e0 for pointing this out
only the mcjUseMatLib.py module for Blender needs to be updated
the mcjTeleBlender3 script for Daz Studio did not change
so get mcjBlendBot and unzip it into your folder, tyically
C:\Program Files\Blender Foundation\Blender\2.76\scripts\modules
the zip file is in the attachments section
https://sites.google.com/site/mcasualsdazscripts4/mcjteleblender3
or if you have trouble getting it there you can take it here
https://sites.google.com/site/mcasualsdazscripts4/mcjteleblender3/mcjBlendBot.zip?attredirects=0&d=1
Hi,
I've written Ralf to see if he can do something. All his freebies are for Poser so that's not going to help in DS. It's OK. No biggie....
i found talk about this by searching injpmd or was it pmdInj in the DAZ3D forum
http://www.daz3d.com/forums/discussion/13603/injectpmd-plugin-for-ds4-5
kuroyumes site doesnt seem to be live anymore
but the java Applet is still downloadable in the wayback machine
( maybe it doesnt really convert the PMD, maybe it just inserts lines of code that make Poser and Daz use the PMD upon loading the cr2 figure )
https://web.archive.org/web/20150402205051/http://www.kuroyumes-developmentzone.com/poser/freebies/
it's supposed to inject PMDs in the CR2 files if i (quickly) read correctly
At one point there was a script for DS but it was never updated to work in the newer ones when the SDK changed so we have been without that functionality. I kinda thought DS had it internally at this point but perhaps not. It was just to read and implement what ever was writting into the PMD file. So if you loaded up a cr2 that had a PMD file with external morph info then the PMD script would automatically kick in and read and apply the morph info during the import iirc....