2 - we run mcjTeleBlender and send this scene over to Blender
3 - we modify the cylinder material , so it looks real special,
a material we could not get from a simple material exported from daz studio,
and i named, the anisotropic shader node
4 - i rename this material "lib_ReallySpecial"
5 - i save this blender scene in my I:\z\ folder under the name lib_ReallySpecial.blend
6 - i render the cylinder, and save the image in my i:\z\ folder under the name lib_ReallySpecial.jpg
7 - i close blender
8 - in Daz Studio, i apply the image i:\z\lib_ReallySpecial.jpg to the diffuse color channel of the cylinder
9 - i make sure mcjTeleBlender's "Collect Maps" option is OFF
else the images would end up in a Maps folder instead of the i:\z folder,
and mcjBlendBot would not be able to know where to find lib_ReallySpecial.blend
10 - i transfer the scene over to Blender
and . . .
and ...
as expected it didnt work ... because ... Blender 2.76b changes ( i think )
so !
11 - close blender
12 - launch blender and our scene using the batch file that was created in step 10 ... in my case test0841pm02152016.bat
why? because this way we get access to Blender's "Console"
As Asphdubrov was saying, there are no Error messages from Blender, just normal warnings about the sound card and a log of what the obj importer did
the lib_ action should be happening in C:\Program Files\Blender Foundation\Blender\2.76\scripts\modules\mcjMatsFromFilename.py ( blender python script )
Wonderful, thanks. :) I was looking around those sections, but know almost nothing about Python so I wasn't making progress. Your effort is really appreciated.
Wonderful, thanks. :) I was looking around those sections, but know almost nothing about Python so I wasn't making progress. Your effort is really appreciated.
welcome ! it keeps mcjTeleBlender alive !
these days i use iRay a lot, but Blender-Cycles preview mode is more responsive, and Blender has all those other goodies to fix a scene
In 2016 i hope to find time to improve teleblender in relation to rigged figures and props
i'm not too experienced in python, so i never saw a * , which must mean "anything", and is possibly now ignored
under this i see the note
""" Called by the user interface or another script. load_obj(path) - should give acceptable results. This function passes the file and sends the data off to be split into objects and then converted into mesh objects """
Get the names and default values of a Python function’s arguments. A named tuple ArgSpec(args,
varargs, keywords, defaults) is returned. args is a list of the argument names. varargs and
keywords are the names of the * and ** arguments or None. defaults is a tuple of default
argument values or None if there are no default arguments; if this tuple has n elements,
they correspond to the last n elements listed in args.
Deprecated since version 3.0: Use signature() and Signature Object, which provide a
better introspecting API for callables.
i wont use the v3 functions, for fear of losing backward compat
res = inspect.getargspec( io_scene_obj.import_obj.load )
if( res.args[0] == 'operator' ):
print( "we'll do it the old school way" )
else:
print( "we'll do it the new school way" )
Cool, for some reason it's the first time I've got this to work.
With a caveat, the eyes have no textures on them, everything else does. I checked you suggestions in the post above; well, all were checked but for Collect Maps; checking the maps folder, the eye textures are in the export folder. And they seem to be applied correctly. Rendering grey.
Cool, for some reason it's the first time I've got this to work.
With a caveat, the eyes have no textures on them, everything else does. I checked you suggestions in the post above; well, all were checked but for Collect Maps; checking the maps folder, the eye textures are in the export folder. And they seem to be applied correctly. Rendering grey.
Cool, for some reason it's the first time I've got this to work.
With a caveat, the eyes have no textures on them, everything else does. I checked you suggestions in the post above; well, all were checked but for Collect Maps; checking the maps folder, the eye textures are in the export folder. And they seem to be applied correctly. Rendering grey.
Cool, for some reason it's the first time I've got this to work.
With a caveat, the eyes have no textures on them, everything else does. I checked you suggestions in the post above; well, all were checked but for Collect Maps; checking the maps folder, the eye textures are in the export folder. And they seem to be applied correctly. Rendering grey.
Thanks for looking, but with TB2 Legacy mode checked and unchecked, the eyes still render grey.
The lips rendered well; just redoing it, and I've added an HDRI to blender, so will be lighter.
Not done any rendering in Blender since the car in my profile, I don't think, so it has been a while. :) Ha just noticed I can add one via your script.
EDIT:
Add image.
Incidentally, any idea on why the hair renders like it does in places?
maybe you could go in Daz Studio's surfaces tab, and for the eye materials,
if the glossiness setting is at 100%, turn it down to 70%
the specular color should also be brought down to gray if it's full-white
you can also turn doen specular strength a bit
if one of the eye surfaces uses an opacity map, try replacing it by a simple opacity strength setting
or you could try to apply an all-black image as the opacity map for surfaces which need to be transparent
if one of the eye surfaces uses files of type .tif or even .png, this may be a source of problems, .jpg maps have more chances of surviving export
earlier i applied an image from my collected /maps/ folder on aiko's hair, and when i exported the scene a second time with the "collect Maps" option ON, it apparently destroyed the .jpg
though this may be related to Daz Studio's connect ... thing
-------
about the hair, maybe maybe , your Blender Cycles settings have a transparency rendering setting that is too low,
maybe also the surface has too much glossiness, not enough roughness
Comments
lets re-acquaint ourselves with the lib_ trick
1 - in Daz Studio, we create a cylinder
2 - we run mcjTeleBlender and send this scene over to Blender
3 - we modify the cylinder material , so it looks real special,
a material we could not get from a simple material exported from daz studio,
and i named, the anisotropic shader node
4 - i rename this material "lib_ReallySpecial"
5 - i save this blender scene in my I:\z\ folder under the name lib_ReallySpecial.blend
6 - i render the cylinder, and save the image in my i:\z\ folder under the name lib_ReallySpecial.jpg
7 - i close blender
8 - in Daz Studio, i apply the image i:\z\lib_ReallySpecial.jpg to the diffuse color channel of the cylinder
9 - i make sure mcjTeleBlender's "Collect Maps" option is OFF
else the images would end up in a Maps folder instead of the i:\z folder,
and mcjBlendBot would not be able to know where to find lib_ReallySpecial.blend
10 - i transfer the scene over to Blender
and . . .
and ...
as expected it didnt work ... because ... Blender 2.76b changes ( i think )
so !
11 - close blender
12 - launch blender and our scene using the batch file that was created in step 10 ... in my case test0841pm02152016.bat
why? because this way we get access to Blender's "Console"
As Asphdubrov was saying, there are no Error messages from Blender, just normal warnings about the sound card and a log of what the obj importer did
the lib_ action should be happening in C:\Program Files\Blender Foundation\Blender\2.76\scripts\modules\mcjMatsFromFilename.py ( blender python script )
my main suspects are hiding at line 81
at line 79 i insert
re-launching Blender .... yes ! we do get there, i mean, when importing the scene mcjBlendBot detects our lib_ image map ()
now in late 2015 we did make changes to the way the "use mat-lib" function was pulling materials from blend files
maybe we forgot to do the same thing about the "lib_ trick"
here is how the UseMatLib script does it
AH HA!
see the trailing slash character after the word "/Material" ?
no you dont
Solved !
so we had to change "/Material/" for "/Material" in mcjMatsFromFilename.py
else Blender is unable to locate our lib_ material in the blend file's sub-section named Material
=====================
i'll make sure i had/have the same version as everyone, fix the code and post the updated mcjBlendBot!
========================
mcjBlendBot UPDATE mcjBlendBot UPDATE mcjBlendBot UPDATE mcjBlendBot UPDATE
https://sites.google.com/site/mcasualsdazscripts4/mcjteleblender3
note you dont need to update the mcjTeleBlender script, just install the new version ( 14 ) of mcjBlendBlot
February 15th 2016 10PM
mcjBlendBot was updated to fix the lib_ ( material re-use ) trick
specifically, mcjNamedMatLib.py and mcjMatsFromFilename.py
had the path to the material subsection of blend files
changed from "/Material/" to "/Material"
Without this, Blender was unable to find the re-usable material
Wonderful, thanks. :) I was looking around those sections, but know almost nothing about Python so I wasn't making progress. Your effort is really appreciated.
welcome ! it keeps mcjTeleBlender alive !
these days i use iRay a lot, but Blender-Cycles preview mode is more responsive, and Blender has all those other goodies to fix a scene
In 2016 i hope to find time to improve teleblender in relation to rigged figures and props
OSX, Blender 2.76.11 with latest mcjBlendBot, DS 4.9.0.54
create scene in DS (simple sphere, for example), export with default mcjTeleBlender parameters, open it in Blender and...
strange error :(
windows 7 blender 2.76 here
when i look at the Blender-supplied file
C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_scene_obj\
at line 826
i find the definition of the load() function
it goes something like def load(operator, context, filepath,....
the error message you got seems to indicate that the import_obj.py
that comes with your Blender-for-MAC is different
The error message was complaining about the load() function expecting 2 values but being given 3
in my version of import_obj.py, as you can see the load() function expects 3 values, (operator, context, filepath)
so when mcjBlendBot supplies 3 values, my import_obj.py load() function is satisfied and doesnt complain
----
right now i'll see if there's a more recent version of Blender 2.76 than the one i got, install it and see if i can get the same problem
well my Blender for Windows was already at the latest version from November 2015 i think
i downloaded the MAC version and unzipped it
if i look at line 826 of the blender-supplied script import_obj.py
i see exactly the same thing in the MAC version as in the Windows version
def load(operator, context, filepath,.....
------
note that if you really really used the default TeleBlender settings it's almost sure it cant work
you must minimally change the path to the .obj file that will be exported to a folder that exists
and that teleblender-daz can write to, and that Blender can read from
another possibility is that you are using a non-standard or beta version of Blender with a custom .obj importer script (import_obj.py)
or that somehow Blender is told by, i dont know what, to use an import_obj.py which is not the one found in
2.76\scripts\addons\io_scene_obj
Thanks for your reply. I found a temporary solution - downgrade Blender to a latest official buld, 2.76b. And all worked great again :)
Remarkable!
So, what about Blender 2.77?
Hi,
I update to Blender 2.77, now mcjteleblender3 fail again, it open a empty scene in Blender.
All was working in Blender 2.76b
My OS is Windows 7 Pro 64 bits
Daz3d 4.9 64 bits
mcjTeleBlender3_v12
mcjBlenderBot_v14
Thank you,
I'll look into it this evening
first test result
note: mcjTeleblender produces a .bat file in the same folder as the .obj
when you launch the scene this way, you get access to the Blender Console and its important error messages
contrary to last time, i get the error message that Mac 2.76b had
wont take long to solve this
and i'll make sure not to break backward compatibility
( which mean i have to install 2.76 elsewhere )
here's the issue, the .obj importer service, used by my BlenderBot, but not written by me, changed
i'm not too experienced in python, so i never saw a * , which must mean "anything", and is possibly now ignored
under this i see the note
my script used to call this function like this
because the importer service was like ... lemme see
WHAT!!! Blender refuses to reinstall 2.76b just because i have 2.77!? not nice
but i have a 2.71
so ... the old loader was like
so, if i dont want to do this using the blender version number
my script needs to ~interrogate~ python to get the signature of the load() function
https://docs.python.org/3.5/library/inspect.html#inspect.getargspec
that must be it
inspect.getargspec(func)
Get the names and default values of a Python function’s arguments. A named tuple ArgSpec(args,
varargs, keywords, defaults) is returned. args is a list of the argument names. varargs and
keywords are the names of the * and ** arguments or None. defaults is a tuple of default
argument values or None if there are no default arguments; if this tuple has n elements,
they correspond to the last n elements listed in args.
Deprecated since version 3.0: Use signature() and Signature Object, which provide a
better introspecting API for callables.
i wont use the v3 functions, for fear of losing backward compat
this is the way we'll load the .obj when version 2.77 is detected
dont worry i wont make you program it !
if we're lucky it works with older versions
there ya go
import bpy
import inspect
import io_scene_obj.import_obj
res = inspect.getargspec( io_scene_obj.import_obj.load )
if( res.args[0] == 'operator' ):
print( "we'll do it the old school way" )
else:
print( "we'll do it the new school way" )
oops getargspecworks with 2.71 but not 2.77
i have to use getfullargspec()
well i solved the Blender 2.77 incompatibility
( i didnt upload it yet ! )
but, blender had trouble finding the my textures
i used the "Collect maps" option
this didnt work well either
so i opened the scene's .mtl file and changed all the
entries like
map_Kd /Maps/mitsuhairbrown.jpg
to
map_Kd Maps/mitsuhairbrown.jpg
and this works
so......
i'll address those issues before uploading the fix for Blender 2.77
maybe i'm simply using a too old version of mcjTeleblender3
next hour it should be ready !
that's my manually fixed render in Blender 2.77 BTW
there that should help
this way, if you use the "Collect Maps" option, and the brand new "No Leading / in .mtl File"
then the .mtl file, which by the way is created by Daz Studio's exporter, will be stripped of the leading / characters
and recent versions of blender will be happy and able to find your collected textures
----------
the new mcjBlendBot and the new mcjTeleBlender 3 will be released in the next 30 minutes
actually i'll see if i can fix the issue when you dont use "Collect Maps"
looking in the .mtl file
i had the "no quotation marks" option enabled
map_Kd C:/Users/*******/Documents/DAZ 3D/Studio/My Daz Connect Library/data/cloud/1_4394/runtime/textures/daz/hair/mitsuhairbrown.jpg
awh look at what the daz connect thing did, it captured my mitsuhair textures in its matrix
and Blender couldnt access it
lets try this time with quotation marks
still not working
but see? front Slashes ... this probably is OK for MACs and Linux but in Windows it can cause problems
and AH HA!!!! the "No Quotation marks" option was Off and ... no quotation marks in the .mtl file !!!
we're close Doctor Watson, the game's afoot
i get it now
Daz Studio 4.9 and maybe other versions does NOT add quotation marks to the Absolute Paths to texture images in the .mtl file
so, Not Removing quotation marks doesnt mean there will be quotation marks !!!
30 minutes
mnope actually it seems to be a problem with the length of paths
....
will we make it before midnight? it's 11:30
...
awwwh, the blender importer seems to refuse textures in folders with paths containing spaces !!! that's so sad !
and since it apparently refuses quotation marks that could solve this ...
short of modifying Blender's obj/mtl importer, all i can do is warn users about this
so we'll be stuck mostly with the "Collect Maps" option
i think the Blender programmers, modified the .obj loader for the needs of 3ds max users
here's a line from the current importer
if b'_' in imagepath:
image = load_image(imagepath.replace(b'_', b' '), DIR, recursive=recursive, relpath=relpath)
so, since the quotation marks are prohibited in the .mtl file
if i replace all the space characters in file paths with underscores, Blender's new importer will be happy
But older Blenders probably wont !
i'll see in Blender 2.71 ... ok the underscore trick is there ... in 2.62 too ! yay !
but i'll make it optional, since i think some people use mcjTeleBlender to export to Octane or others
....
the underscore works well but, yes there's a but, if the real path to the texture does contain underscores
then Blender will go "oh that must be a 3dsmax .mtl file, all the underscores must be replaced by spaces .... and that will fail
Unfortunatelym the Daz Connect contraption does create and use folder names with underscores,
so ... you'll have to use the "Collect Maps" feature of mcjTeleBlender
or only use texture files with nice normal paths and filenames
IMPORTANT UPDATE IMPORTANT UPDATE
March 24th 2016 1:24AM
mcjTeleBlender was updated - version 3.13
there's two new checkboxes in the Auxiliary Tab
- "No spaces in .mtl paths" will replace all the spaces in your texture image paths with underscores
with the current 2.77 version of blender this seems to be the only way to deal with paths containing spaces
But you can also use mcjTeleBlender's "Collect Maps" options and save yourself a lot of trouble
- "No leading slashes in .mtl paths" : When you use the "Collect Maps" option, your texture images are placed in a Maps folder
using this option, the paths to those images are declared as being in the Maps folder instead of the /Maps folder
that's enough to please Blender, else Blender wont find them and your actors will be purple
mcjBlendBot was updated - version 3.15
There was a substantial change in the Blender 2.77 addon used by mcjBlendBot to load .obj/.mtl scene files
The new mcjBlendBot will detect your version of the io_scene_obj.import_obj.load() function and act appropriately.
With current versions of Blender and Daz Studio 4.9
i suggest you use the following mcjTeleBlender settings
"Collect maps" ON - This works best because paths and filename dont get processed
"Fix .mtl file for Blender" ON
"No quotes in .mtl paths" ON ( needed for recent versions of blender since about 2.74 )
"No spaces in .mtl paths" ON when "Collect Maps" is OFF. Preferably OFF when "Collect Maps" is ON
"No leading / in .mtl Paths" ON ( this one is crucial for the "Collect Maps" option )
Cool, for some reason it's the first time I've got this to work.
With a caveat, the eyes have no textures on them, everything else does. I checked you suggestions in the post above; well, all were checked but for Collect Maps; checking the maps folder, the eye textures are in the export folder. And they seem to be applied correctly. Rendering grey.
hi there glad to see it mostly still works
here you see Aiko3 and Genesis Victoria 7
Note that mcjTeleBlender prefers DS Default materials instead of the more complex Shaders found on newer generations like Genesis
I'll do some more tests with Victoria 4 Genesis 1, 2, with and without "TB2 Legacy mode"
Oh, Jacques: you absolutely deserve our support!
Astounding.
this time with "TB2 Legacy mode" OFF
Aiko3 and Genesis Victoria7
wedGlossfactor 0.025
wedGlossRough 0.3
bUseSingleMtl false
bFixMtl true
bCollect true
bGlossMix false
bLegacy false
bNoQuotesInMtl true
bNoLeadingSlash true
bNoSpacesInMtl true
Thanks for looking, but with TB2 Legacy mode checked and unchecked, the eyes still render grey.
this time with "TB2 Legacy mode" OFF
Aiko3 and Genesis ( 1 or 2 ?) Aiko5-
now what's up with Gen's lips? ...
Err... Pass.
The lips rendered well; just redoing it, and I've added an HDRI to blender, so will be lighter.
Not done any rendering in Blender since the car in my profile, I don't think, so it has been a while. :) Ha just noticed I can add one via your script.
EDIT:
Add image.
Incidentally, any idea on why the hair renders like it does in places?
that's Victoria4
maybe you could go in Daz Studio's surfaces tab, and for the eye materials,
if the glossiness setting is at 100%, turn it down to 70%
the specular color should also be brought down to gray if it's full-white
you can also turn doen specular strength a bit
if one of the eye surfaces uses an opacity map, try replacing it by a simple opacity strength setting
or you could try to apply an all-black image as the opacity map for surfaces which need to be transparent
if one of the eye surfaces uses files of type .tif or even .png, this may be a source of problems, .jpg maps have more chances of surviving export
earlier i applied an image from my collected /maps/ folder on aiko's hair, and when i exported the scene a second time with the "collect Maps" option ON, it apparently destroyed the .jpg
though this may be related to Daz Studio's connect ... thing
-------
about the hair, maybe maybe , your Blender Cycles settings have a transparency rendering setting that is too low,
maybe also the surface has too much glossiness, not enough roughness
--------