when you click the script’s “Export” buttons, the script saves the entire scene as an .obj file
this obj file is accompanied by a .mtl file and a .bat file
after you render the scene in Blender and optionally save your blender scene file, you could brose to this location and delete the obj/mtl/bat/bpy files
the location of the .obj file can be anywhere on your hard disks ( if windows allows it )
the C:/scene.obj is basically a fake location and filename and should be replaced by something valid
using the “browse” button next to the “Export scene as obj” box
sometimes the issue is that Windows prevents non-administrators from writing in the C: root directory
other times it's just that c:/scene.obj or C://scene.obj is not a valid path for your Windows/Linus/Mac and needs to be replaced by something valid by using the "browse" button to select/specify the location of the .obj/mtl files
I want to thank you Casual for this great tool. I've been playing with it for a day or so and it works really well. Still trying to get my arms around Blender so I can do more (add lights, adjust the camera views, basic stuff that is frustratingly hard to figure out in Blender). None of that is the fault of your scripts, though.
The materials in particular are the toughest nuts. I don't quite know how one would do animations given the tweaking I've had to do to several surfaces in just one transfer. For example, take the render below. I had to adjust the glasses to a glass material, I had to reduce the gloss on the stockings and addded an anisotropic to blur it a little more like nylon does. Not hard but lots of individual surface domains to tweak. So if I was doing it frame by frame, wow. I think I ought to read the manual fully to see all the things I'm not doing right! But for a first pass render I'm impressed with it. Thanks again!
I want to thank you Casual for this great tool. I've been playing with it for a day or so and it works really well. Still trying to get my arms around Blender so I can do more (add lights, adjust the camera views, basic stuff that is frustratingly hard to figure out in Blender). None of that is the fault of your scripts, though.
The materials in particular are the toughest nuts. I don't quite know how one would do animations given the tweaking I've had to do to several surfaces in just one transfer. For example, take the render below. I had to adjust the glasses to a glass material, I had to reduce the gloss on the stockings and addded an anisotropic to blur it a little more like nylon does. Not hard but lots of individual surface domains to tweak. So if I was doing it frame by frame, wow. I think I ought to read the manual fully to see all the things I'm not doing right! But for a first pass render I'm impressed with it. Thanks again!
great looking scene and welcome
for animations with tweaked materials you just have to use mcjTeleblender's "use mat-lib" option
roughly it means
1 - export the first frame of the animation
2 - modify the materials in blender to your liking
3 - save this blender scene as a blender file, for example : mymatlib.blend
4 - enable mcjTeleblender's "use mat-lib" option and specify you want to use mymatlib.blend as the library
5 - export the animation
to add things like lights, and objects, you have to use mcjTeleblender's "scene file" option
1 - export the first frame of the animation
2 - add lights (normally i use cubes with an emissive material - it's a good idea to rename the light/cubes to something else than Cube")
3 - delete everything in the scene except your lights and added things
4 - save the blender scene as a blender file for example mydecor.blend
5 - enable mcjTeleblender's "blend scene" render option and specify mydecor.blend as the scene file to re-use
6 - export the animation
note : if there's lots of un-animated objects in your scene, don't delete them in Blender, but make them invisible in Daz Studio, this way Daz wont include them in the export process and it will re-use the ones in the blender scene file
Quick tip here for those going for comic book looks;
1) Get pwtoon and then add the shader, such as clean drawing, to all surfaces in DAZ
2) using mcjteleblender; Export as a scene file, set the materials process to blender fix, glass 0, rough 0, no gamma fix, current frame, collect maps, export a camera if you wish, etc.
3) When blender opens up, set up your lighting like you want.
4) Open up the text editor, hit new, copy & paste then run this script (either right click in the script window and select run script or hit ALT + P while your cursor is the script window) to do a blanket conversion of all textures to a toon with no specular (go ahead and fine tune this as you see fit, even add to it for more control if you want);
# import the Blender module
import bpy
#Iterate over all members of the materials
for item in bpy.data.materials:
#Change diffuse shader to toon
item.diffuse_shader = 'TOON'
#Set specular value
item.specular_intensity = (0.000)
#Set diffuse toon smooth value
item.diffuse_toon_smooth = (0.100)
#Set diffuse toon size value
item.diffuse_toon_size = (1.000)
5) Render it to see how things look, then tweek the material and texture settings to suit your needs. Its an easy flow to get a clean comic book render that is better IMHO than pwToon alone due to the amount of control given to the blender render engine.
To take the comic book look a step further, use freestyle in addition to the above steps.
Happy DAZ Blending!
mcj Teleblender already builds materials with a texture map and diffuse color,
and a node for glossiness, so by adding a mix-shader or two and a translucent node we
can get something similar quickly
here's a first render and the Blender node tree i made based on the Aiko3 skin
-----
if you search youtube you can find skin shader tutorials that use the "real" Subsurface scattering - if i'm not mistaken this works only for CPU-based cycles renders, not GPU accelerated oned
----
using the translucent node as a simili subsurface scattering has the advantage of working in GPU renders, but the jade effect is not as convincing as the real one -- also depending on the lighting we may go ..." hey the head is translucent!"
As some of you may know, the ability to use Cycles environment, to create a shadows, is not currently working in Blender. To get a shadow (when using an environment for lighting), you need to add a light in addition to your environment (and maybe a shadow catcher), as the environment is not included in the shadow pass.
If you want to voice your support for this feature, here is the bug tracker (there is no other way to voice support for a Todo I am aware of...?) entry:
Hi. I'm one of those "read-more-post-less" guys so this is my first post on a DAZ forum. I think this script is great! I'm wondering if anyone has encountered the problem seen in the following image? Notice the male figure's head and hands are the problem. I'm unsure if the problem is on the DAZ side or Blender side. I'm assuming the I'll have to reassign textures to the pistols. Any suggestions to fix this would be appreciated. I'm an abosulte newb to Blender if that explains anything.
Regards,
ML
p.s. How would one go about fixing the leathery/rubbery look on the clothes to where it's more like the fabric look we get in DAZ?
Hi. I'm one of those "read-more-post-less" guys so this is my first post on a DAZ forum. I think this script is great! I'm wondering if anyone has encountered the problem seen in the following image? Notice the male figure's head and hands are the problem. I'm unsure if the problem is on the DAZ side or Blender side. I'm assuming the I'll have to reassign textures to the pistols. Any suggestions to fix this would be appreciated. I'm an abosulte newb to Blender if that explains anything.
Regards,
ML
p.s. How would one go about fixing the leathery/rubbery look on the clothes to where it's more like the fabric look we get in DAZ?
looks like the transparency material used for the backdrop ended up assigned to the head
in blender if you select your figure node and click the little chrome ball button
you get to edit the materials, maybe in your case you could try changing the transparent material of the face to "diffuse" then make that black
or change the transparency color to black, or you could check the woman's face shader and see of you can modify the man's shader to be similar
the expert way to do this is to go in the Node Editor panel though
looks like the transparency material used for the backdrop ended up assigned to the head
in blender if you select your figure node and click the little chrome ball button
you get to edit the materials, maybe in your case you could try changing the transparent material of the face to "diffuse" then make that black
or change the transparency color to black, or you could check the woman's face shader and see of you can modify the man's shader to be similar
the expert way to do this is to go in the Node Editor panel though
Thank you for your reply, Casual. Unfortunately that didn't seem to do the trick. I will research the node editor.
I tried the plugin and it worked last night (came out good). But just today, I loaded an Aiko 3 figure and used the same plugin, but after the plugin is done, Blender loads and it got stuck not responding at start. I looked at the BAT file and I discovered that after it loaded, it got stuck at "1 0" why do I get this or I think there's a bug in blender?
I tried the plugin and it worked last night (came out good). But just today, I loaded an Aiko 3 figure and used the same plugin, but after the plugin is done, Blender loads and it got stuck not responding at start. I looked at the BAT file and I discovered that after it loaded, it got stuck at "1 0" why do I get this or I think there's a bug in blender?
I have DAZ 4.6 and Blender 2.69
you could try setting the location of the obj file elsewhere than c:\
Windows tends to prevent things from happening there
windows may prevent daz/teleblender to write files, it may even block Blender from reading
also try setting on or off mcjTeleblender's "collect maps" option, sometimes the obj exporter tells Blender to use a given .jpg file while in fact the image file is a png
you could try removing textured objects in the scene, to find out what's giving Blender problems
modern Genesis figures tend to have gigantic texture maps like 4000x4000 you could try changing the textures for down-sized copies of those textures - Normally big texture files dont prevent the loading of the scene file , but at render time they do
thanks and it works! But I'm not using genesis (unless if I know how to resize it WITHOUT destoying the UVs). I'm just using a prop for a scene is all.
Also, I really like the idea of this plugin. But I do have a suggestion. Would it be possible to export with multiple cameras? It can only export one in this version.
thanks and it works! But I'm not using genesis (unless if I know how to resize it WITHOUT destoying the UVs). I'm just using a prop for a scene is all.
Also, I really like the idea of this plugin. But I do have a suggestion. Would it be possible to export with multiple cameras? It can only export one in this version.
I was wondering why certain models use such ginormous amounts of RAM and e.g. Kelly with hair, underwear and stockings lets blender crash whenever I switch to 3D view (7+ GB RAM and I have only 8 in my rig :blank:) - as it turns out blender adds a new copy of the same texture for each of its entries in scene.mtl, which means that e.g. the stockings' texture gets loaded 23 extra times (!!! :roll:) as *.jpg.001, 002, 003, etc.
Saving and loading the .blend (without packing of course!) helps most of the time, and I created "clean" mat-libs for my favorite models (with shader node groups for easy tweaking - btw mat-lib ignores my bump-map-settings; I guess that's because it still reads them from scene.py?) anyways, but unlinking all those datablocks with the same textures but only different names (001, 002, 003, ...) is so much work it's crazy ... :sick:
Is there no way to tell blender "Hey, it's the same texture, you don't have to load it several dozen times!"? :)
I was wondering why certain models use such ginormous amounts of RAM and e.g. Kelly with hair, underwear and stockings lets blender crash whenever I switch to 3D view (7+ GB RAM and I have only 8 in my rig :blank:) - as it turns out blender adds a new copy of the same texture for each of its entries in scene.mtl, which means that e.g. the stockings' texture gets loaded 23 extra times (!!! :roll:) as *.jpg.001, 002, 003, etc.
Saving and loading the .blend (without packing of course!) helps most of the time, and I created "clean" mat-libs for my favorite models (with shader node groups for easy tweaking - btw mat-lib ignores my bump-map-settings; I guess that's because it still reads them from scene.py?) anyways, but unlinking all those datablocks with the same textures but only different names (001, 002, 003, ...) is so much work it's crazy ... :sick:
Is there no way to tell blender "Hey, it's the same texture, you don't have to load it several dozen times!"? :)
i was suspecting that it was working this way but was too afraid (kidding sort of ) to look into it.
but but i did intend to address the issue someday
so far i simply resized all texture images to 1Kx1K when rendering newer generation figures and their 4kx4k textures
most of the time the character in my scene is Aiko3
The initial loading of the images is done by Blender's built-in OBJ importer ( a python script )
this creates old school Blender-Render materials
then my blenderBot python script, creates material-node-trees for each blender-render-material and simply plugs the existing loaded textures on the input nodes of those trees
i could .... ( thinking ) ..... write a python script which would go through the node-trees ( they call them noodles i think )
and build a list of the textures images and reject the doubles
so all the nodes which were using image0001.jpg would use the same loaded texture image
the hope is that when you start a cycles-render, only the loaded-texture-images that are plugged- to a node-tree
are transfered to the video card memory
if we're not lucky, even the now-unconnected images are sent to the card
but it may be possible to destroy them instead of just un-plugging them from the material-node-trees
.... soon ...
the other thing i've been thinking about is, a script which would make all objects with identical materials share the same material
for example, all the limb materials in some figures often use the same texture, same diffuse color, same ...everything
so adjusting the materials for the limbs would be unified
----------------
figure 1 - test scene for texture-sharing blender-python script development
Unlucky :long:
Unlinked all .001, .002 etc. jpgs, assigned the correct ones*, switched to rendered view -> Blender 3.8 GB, VRAM (2 GB) out of memory error ...
Same procedure but file saved and reloaded: Blender 170 MB (!!!), in rendered view: Blender 1300, VRAM 1030 MB.
The same thing happens with my mat-lib, although the existing materials with the correct textures are used and the mcjmats which use 001, 002, etc. jpgs aren't even assigned to nodes and have 0 users. I can't believe that they're loaded into VRAM, they're not even cycles materials?! I can't believe that unassigned, user-less textures get loaded ... I have to test that again.
At least the mcjmats completely disappear once the file is saved and re-opened, because blender then removes stuff with 0 users, which is one and hopefully not the only way to destroy things in blender.
*I use image.user_clear() for everything in bpy.data.images that doesn't end with .jpg or .png (which isn't necessary but it makes them red so it's easier to see which ones have to be replaced), then go through all my materials and assign the correct .jpgs - manually :lol: It would be awesome to have a script which does that (i.e. just cut off the .001, .002, etc. from the image references in the nodes). That way one could just run the script, save the file and open it again and render :)
But is there really no way to prevent the OBJ importer from creating texture duplicates in the first place?
here's a Blender python script that goes through all mesh-material-nodes it memorizes the Image and image-file for each texture node if a texture-node is found to use the same file as a previously seen image the Image for this texture node is switched to the old one
i'm not an expert in Python or Blender-python but i think i must add a statement to delete or unlink or destroy/zap the Images that i am leaving dangling
( for anyone interested, to run a python script in Blender, you change one of Blender's panels ( area) to a Text Editor, load the python script (text) and click on the "run script button )
Note that when Blender is launched by DazStudio+mcjTeleblender, you dont have access to Blender's System console.
One way to remedy this is to close blender, open blender and do a "file/recover last session"
another way is to run the .bat file which was created by mcjTeleblender
#---------- processMat ----------
def processMat( mat, mydata ):
tree = mat.node_tree
if not tree:
return;
nodes = tree.nodes
links = tree.links
for node in nodes:
if( node.type in ['ShaderNodeTexImage','TEX_IMAGE'] ):
bIsnew = True;
for duet in mydata:
if duet[1] == node.image.filepath:
if node.image != duet[0]:
node.image = duet[0];
print( node.image.name, " >>> " , duet[0].name );
bIsnew = False;
break;
if bIsnew == True:
mydata.append( [ node.image, node.image.filepath ] );
#---------- processObject ----------
def processObject( o, mydata ):
materials = o.material_slots
for m in materials:
mat = m.material
if mat:
processMat( mat, mydata )
#---------- processAllMeshObjects ----------
def processAllMeshObjects():
objects = bpy.data.objects;
mydata = [];
for o in objects:
if o.type == 'MESH':
processObject( o, mydata );
n = len( mydata );
print( n, " unique images" );
processAllMeshObjects();
in the test shown below 64 objects use a 4096x4096 texture
which must use a lot of memory
my video card has 1G of ram
if the images are stored as 4 bytes per pixel
64 x 4k x 4k x 4 = 4 Gigabytes
so i'm starting to have doubts ...
i'm using Blender 2.69
maybe you're using an older version?
sometimes when i run out of memory for a render, usually a FullHD render
i uncheck Blender's "progressive" rendering option
so it renders 128x128 pixel tiles instead of the whole image
this seems to save enough memory to let the render proceed
when this is not enough i use mcjTeleblender's "collect maps" option
and i go in the Maps folder ( where images are collected )
and i resize anything larger than 1024x1024 to 1024x1024 pixels
when that's not enough i render in CPU mode instead of GPU
What the ...
I guess I was completely wrong - I think the errors were caused because the scene used up almost all of my RAM, and when activating rendered view blender ran out of RAM while still loading the scene into VRAM and spit out a CUDA error ...
So sorry that I bothered you when actually I was using a really badly chosen scene for testing :red:
Edit: Yes, unlucky, me thinking my CUDA error meant that the VRAM was full which wasn't the case ... :lol:
But thanks a lot for looking into this issue, because I would have kept searching and searching without your help. :-)
What the ...
I guess I was completely wrong - I think the errors were caused because the scene used up almost all of my RAM, and when activating rendered view blender ran out of RAM while still loading the scene into VRAM and spit out a CUDA error ...
So sorry that I bothered you when actually I was using a really badly chosen scene for testing :red:
oh it was not a bother since i too was worrying about this being the cause of some render problems
i know that GPU "programs" often want all the texture images uploaded to the video card memory
before the render starts -- i think that's the way Blender Cycles works ---
so the sum of your scene geometry and the texture images must fit on your card's memory
so the sum of your scene geometry and the texture images must fit on your card's memory
They fit - the scene is ~1.2 GB;
But when the data are copied to the GPU, they're also created in RAM, so e.g. blender.exe uses 200 MB and your scene will use 800 MB VRAM -> you activate rendered view -> blender.exe will now use 1000 MB RAM.
And I simply didn't have enough RAM left for blender.exe to be able to activate rendered view, which gave me the CUDA error and my first and wrong thought was: Not enough memory on the GPU :lol:
BTW I now save the exported files and reload them - in one scene I tested blender then uses just 200 MB instead of the 3.8 GB right after importing :-) (the GPU part is always the same)
for the record, the scene with 256 objects with textures based ob a 4096x4096 images did render in GPU mode
the geometry itself was a moderate 200000 triangles
Oh my Bob ! it's the flying spaghetti monster ... not
Still trying to get my arms around Blender so I can do more (add lights, adjust the camera views, basic stuff that is frustratingly hard to figure out in Blender).
We're in the same boat :lol:
I felt like a complete idiot ... everything's different in Blender ... even the default mouse keys :)
Here are the camera shortcuts - extremely helpful and can also be used to set up lights http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Camera
BTW I can't tell you how often Google sent me to forums with either sparcely sourced or even plain wrong information about Cycles ... it's crazy! Even the self-proclaimed "Gurus" sometimes post videos with node setups that are simply wrong ... Unbelievable!
It took me what felt like forever* to find out how to correctly set up ordinary specular maps ... they go into FAC of the mix node between diffuse map and glossy shader and can be controlled with a simple math node. [You can control the gloss itself with a map that's plugged into the glossy shader, but that would require a gloss map - that way you could create e.g. metal and leather on the same texture.]
And you don't set them to "non-color data" like almost everyone is suggesting. Very nice tutorial: https://vimeo.com/54131520
*The internet is flooded with posts (thanks, smartphones! >:( ) from people who neither double check nor really think about what they're publishing ... And even when they do ... they never come back and post a correction.
Today's test is Bree for V5 in the Ultimo Paradiso environment. Subsurface scattering is used, but I've tried to tone it down some more. I think I need just enough SSS to get rid of the plasticy look and provide a bit of backscatter when the lighting is just right. Still a work in progress, though. Bree comes with color subsurface textures for use in DS. From what I've learned, it may be better to let the subsurface shader determine the color of scattering via radius settings. Then a 'color' input, in this case a converted gray scale image, can determine the intensity of the subsurface. There are surely better ways, but this is where I'm at now.
daveleitz68, love the SSS work you did with Bree for V5 on the beach using the Ultimo Paradiso environment!
What kind of lighting is set up in that scene? Are you using any emissive area lights? Or any HDR lighting?
Hi guys, I hope everyone is doing well and is making the most out of Daz and Blender.
I've been getting some really great results out of using the teleblender script in conjunction with Blender, and I thought I'd start posting some of the tips and tricks I use.
Specifically, I posted a tutorial on my skin settings over on my site here:
Daz Studio spotlights will be (optionally ) exported as Blender Spotlights, including correct orientation and spread angle
Daz Studio DirectLights will be (optionally) exported as Blender Sun Lights including correct orientation
...point lights ... ... Blender point lights
Uber AreaLights .... as Blender Area Lights
also the Opacity strength of the surface/materials will be added to the material node trees as a transparency shader +mix shader
previously all transparencies were obtained using maps ( gray images )
this was because i didn't want to modify Blender's build-in obj importer, to avoid unforeseen problems down the road
the opacity strength is transfered from Daz Studio the same way texture tiling is : calls to a new function in blenderBot
Comments
when you click the script’s “Export” buttons, the script saves the entire scene as an .obj file
this obj file is accompanied by a .mtl file and a .bat file
after you render the scene in Blender and optionally save your blender scene file, you could brose to this location and delete the obj/mtl/bat/bpy files
the location of the .obj file can be anywhere on your hard disks ( if windows allows it )
the C:/scene.obj is basically a fake location and filename and should be replaced by something valid
using the “browse” button next to the “Export scene as obj” box
sometimes the issue is that Windows prevents non-administrators from writing in the C: root directory
other times it's just that c:/scene.obj or C://scene.obj is not a valid path for your Windows/Linus/Mac and needs to be replaced by something valid by using the "browse" button to select/specify the location of the .obj/mtl files
I want to thank you Casual for this great tool. I've been playing with it for a day or so and it works really well. Still trying to get my arms around Blender so I can do more (add lights, adjust the camera views, basic stuff that is frustratingly hard to figure out in Blender). None of that is the fault of your scripts, though.
The materials in particular are the toughest nuts. I don't quite know how one would do animations given the tweaking I've had to do to several surfaces in just one transfer. For example, take the render below. I had to adjust the glasses to a glass material, I had to reduce the gloss on the stockings and addded an anisotropic to blur it a little more like nylon does. Not hard but lots of individual surface domains to tweak. So if I was doing it frame by frame, wow. I think I ought to read the manual fully to see all the things I'm not doing right! But for a first pass render I'm impressed with it. Thanks again!
great looking scene and welcome
for animations with tweaked materials you just have to use mcjTeleblender's "use mat-lib" option
roughly it means
1 - export the first frame of the animation
2 - modify the materials in blender to your liking
3 - save this blender scene as a blender file, for example : mymatlib.blend
4 - enable mcjTeleblender's "use mat-lib" option and specify you want to use mymatlib.blend as the library
5 - export the animation
to add things like lights, and objects, you have to use mcjTeleblender's "scene file" option
1 - export the first frame of the animation
2 - add lights (normally i use cubes with an emissive material - it's a good idea to rename the light/cubes to something else than Cube")
3 - delete everything in the scene except your lights and added things
4 - save the blender scene as a blender file for example mydecor.blend
5 - enable mcjTeleblender's "blend scene" render option and specify mydecor.blend as the scene file to re-use
6 - export the animation
note : if there's lots of un-animated objects in your scene, don't delete them in Blender, but make them invisible in Daz Studio, this way Daz wont include them in the export process and it will re-use the ones in the blender scene file
Hello, hey! When I click download, all that appears is a page full of text. Where am I going wrong?
Sorry, have not visited this thread/script in a while, cause I went back to DS, and am doing more "toon" renders...
I added a tutorial, so that its easier to get running, If it does not work for anyone, let me know and I can try and fix it.
Quick dumb question... Will this run on a Mac?
i'm 99% sure that mac users have been using it - linux also
indeed just now i see this http://hype3d.com/better-daz-studio-renders-with-mcjteleblender2-and-blender-on-the-mac/
Quick tip here for those going for comic book looks;
1) Get pwtoon and then add the shader, such as clean drawing, to all surfaces in DAZ
2) using mcjteleblender; Export as a scene file, set the materials process to blender fix, glass 0, rough 0, no gamma fix, current frame, collect maps, export a camera if you wish, etc.
3) When blender opens up, set up your lighting like you want.
4) Open up the text editor, hit new, copy & paste then run this script (either right click in the script window and select run script or hit ALT + P while your cursor is the script window) to do a blanket conversion of all textures to a toon with no specular (go ahead and fine tune this as you see fit, even add to it for more control if you want);
# import the Blender module
import bpy
#Iterate over all members of the materials
for item in bpy.data.materials:
#Change diffuse shader to toon
item.diffuse_shader = 'TOON'
#Set specular value
item.specular_intensity = (0.000)
#Set diffuse toon smooth value
item.diffuse_toon_smooth = (0.100)
#Set diffuse toon size value
item.diffuse_toon_size = (1.000)
5) Render it to see how things look, then tweek the material and texture settings to suit your needs. Its an easy flow to get a clean comic book render that is better IMHO than pwToon alone due to the amount of control given to the blender render engine.
To take the comic book look a step further, use freestyle in addition to the above steps.
Happy DAZ Blending!
Skin shader experiment
over here : https://www.youtube.com/watch?v=jnX0ZDoUpy4
Lee Manning shows the skin shader he developed
mcj Teleblender already builds materials with a texture map and diffuse color,
and a node for glossiness, so by adding a mix-shader or two and a translucent node we
can get something similar quickly
here's a first render and the Blender node tree i made based on the Aiko3 skin
-----
if you search youtube you can find skin shader tutorials that use the "real" Subsurface scattering - if i'm not mistaken this works only for CPU-based cycles renders, not GPU accelerated oned
----
using the translucent node as a simili subsurface scattering has the advantage of working in GPU renders, but the jade effect is not as convincing as the real one -- also depending on the lighting we may go ..." hey the head is translucent!"
Aiko3 rendered using the aforementioned Skin Shader
3 area lights setup
As some of you may know, the ability to use Cycles environment, to create a shadows, is not currently working in Blender. To get a shadow (when using an environment for lighting), you need to add a light in addition to your environment (and maybe a shadow catcher), as the environment is not included in the shadow pass.
There was a bug report filed on this (a year ago), but it was designed that way, so it was moved out of a bug, into a "Todo" list. (http://wiki.blender.org/index.php/Dev:2.6/Source/Render/Cycles/ToDo)
If you want to voice your support for this feature, here is the bug tracker (there is no other way to voice support for a Todo I am aware of...?) entry:
https://developer.blender.org/T34272
Hi. I'm one of those "read-more-post-less" guys so this is my first post on a DAZ forum. I think this script is great! I'm wondering if anyone has encountered the problem seen in the following image? Notice the male figure's head and hands are the problem. I'm unsure if the problem is on the DAZ side or Blender side. I'm assuming the I'll have to reassign textures to the pistols. Any suggestions to fix this would be appreciated. I'm an abosulte newb to Blender if that explains anything.
Regards,
ML
p.s. How would one go about fixing the leathery/rubbery look on the clothes to where it's more like the fabric look we get in DAZ?
looks like the transparency material used for the backdrop ended up assigned to the head
in blender if you select your figure node and click the little chrome ball button
you get to edit the materials, maybe in your case you could try changing the transparent material of the face to "diffuse" then make that black
or change the transparency color to black, or you could check the woman's face shader and see of you can modify the man's shader to be similar
the expert way to do this is to go in the Node Editor panel though
looks like the transparency material used for the backdrop ended up assigned to the head
in blender if you select your figure node and click the little chrome ball button
you get to edit the materials, maybe in your case you could try changing the transparent material of the face to "diffuse" then make that black
or change the transparency color to black, or you could check the woman's face shader and see of you can modify the man's shader to be similar
the expert way to do this is to go in the Node Editor panel though
Thank you for your reply, Casual. Unfortunately that didn't seem to do the trick. I will research the node editor.
Sorry for the bump,
I tried the plugin and it worked last night (came out good). But just today, I loaded an Aiko 3 figure and used the same plugin, but after the plugin is done, Blender loads and it got stuck not responding at start. I looked at the BAT file and I discovered that after it loaded, it got stuck at "1 0" why do I get this or I think there's a bug in blender?
I have DAZ 4.6 and Blender 2.69
you could try setting the location of the obj file elsewhere than c:\
Windows tends to prevent things from happening there
windows may prevent daz/teleblender to write files, it may even block Blender from reading
also try setting on or off mcjTeleblender's "collect maps" option, sometimes the obj exporter tells Blender to use a given .jpg file while in fact the image file is a png
you could try removing textured objects in the scene, to find out what's giving Blender problems
modern Genesis figures tend to have gigantic texture maps like 4000x4000 you could try changing the textures for down-sized copies of those textures - Normally big texture files dont prevent the loading of the scene file , but at render time they do
thanks and it works! But I'm not using genesis (unless if I know how to resize it WITHOUT destoying the UVs). I'm just using a prop for a scene is all.
Also, I really like the idea of this plugin. But I do have a suggestion. Would it be possible to export with multiple cameras? It can only export one in this version.
here's mcjexportcamtoblender,
https://sites.google.com/site/mcasualsdazscripts/mcjexportcamtoblender-ds1-2-3-4
it even exports camera animations
I was wondering why certain models use such ginormous amounts of RAM and e.g. Kelly with hair, underwear and stockings lets blender crash whenever I switch to 3D view (7+ GB RAM and I have only 8 in my rig :blank:) - as it turns out blender adds a new copy of the same texture for each of its entries in scene.mtl, which means that e.g. the stockings' texture gets loaded 23 extra times (!!! :roll:) as *.jpg.001, 002, 003, etc.
Saving and loading the .blend (without packing of course!) helps most of the time, and I created "clean" mat-libs for my favorite models (with shader node groups for easy tweaking - btw mat-lib ignores my bump-map-settings; I guess that's because it still reads them from scene.py?) anyways, but unlinking all those datablocks with the same textures but only different names (001, 002, 003, ...) is so much work it's crazy ... :sick:
Is there no way to tell blender "Hey, it's the same texture, you don't have to load it several dozen times!"? :)
i was suspecting that it was working this way but was too afraid (kidding sort of ) to look into it.
but but i did intend to address the issue someday
so far i simply resized all texture images to 1Kx1K when rendering newer generation figures and their 4kx4k textures
most of the time the character in my scene is Aiko3
The initial loading of the images is done by Blender's built-in OBJ importer ( a python script )
this creates old school Blender-Render materials
then my blenderBot python script, creates material-node-trees for each blender-render-material and simply plugs the existing loaded textures on the input nodes of those trees
i could .... ( thinking ) ..... write a python script which would go through the node-trees ( they call them noodles i think )
and build a list of the textures images and reject the doubles
so all the nodes which were using image0001.jpg would use the same loaded texture image
the hope is that when you start a cycles-render, only the loaded-texture-images that are plugged- to a node-tree
are transfered to the video card memory
if we're not lucky, even the now-unconnected images are sent to the card
but it may be possible to destroy them instead of just un-plugging them from the material-node-trees
.... soon ...
the other thing i've been thinking about is, a script which would make all objects with identical materials share the same material
for example, all the limb materials in some figures often use the same texture, same diffuse color, same ...everything
so adjusting the materials for the limbs would be unified
----------------
figure 1 - test scene for texture-sharing blender-python script development
Unlucky :long:
Unlinked all .001, .002 etc. jpgs, assigned the correct ones*, switched to rendered view -> Blender 3.8 GB, VRAM (2 GB) out of memory error ...
Same procedure but file saved and reloaded: Blender 170 MB (!!!), in rendered view: Blender 1300, VRAM 1030 MB.
The same thing happens with my mat-lib, although the existing materials with the correct textures are used and the mcjmats which use 001, 002, etc. jpgs aren't even assigned to nodes and have 0 users. I can't believe that they're loaded into VRAM, they're not even cycles materials?! I can't believe that unassigned, user-less textures get loaded ... I have to test that again.
At least the mcjmats completely disappear once the file is saved and re-opened, because blender then removes stuff with 0 users, which is one and hopefully not the only way to destroy things in blender.
*I use image.user_clear() for everything in bpy.data.images that doesn't end with .jpg or .png (which isn't necessary but it makes them red so it's easier to see which ones have to be replaced), then go through all my materials and assign the correct .jpgs - manually :lol: It would be awesome to have a script which does that (i.e. just cut off the .001, .002, etc. from the image references in the nodes). That way one could just run the script, save the file and open it again and render :)
But is there really no way to prevent the OBJ importer from creating texture duplicates in the first place?
here's a Blender python script that goes through all mesh-material-nodes
it memorizes the Image and image-file for each texture node
if a texture-node is found to use the same file as a previously seen image
the Image for this texture node is switched to the old one
i'm not an expert in Python or Blender-python
but i think i must add a statement to delete or unlink or destroy/zap the Images that i am leaving dangling
but for now it seems to work for my test scene
i'll post the script on my google site in a few minutes and post the link here
-----------------
https://sites.google.com/site/mcasualsdazscripts3/mcjteleblender2/mcjShareTheTextures.py?attredirects=0&d=1
( for anyone interested, to run a python script in Blender,
you change one of Blender's panels ( area) to a
Text Editor, load the python script (text)
and click on the "run script button )
Note that when Blender is launched by DazStudio+mcjTeleblender,
you dont have access to Blender's System console.
One way to remedy this is to close blender, open blender and do a "file/recover last session"
another way is to run the .bat file which was created by mcjTeleblender
in the test shown below 64 objects use a 4096x4096 texture
which must use a lot of memory
my video card has 1G of ram
if the images are stored as 4 bytes per pixel
64 x 4k x 4k x 4 = 4 Gigabytes
so i'm starting to have doubts ...
i'm using Blender 2.69
maybe you're using an older version?
sometimes when i run out of memory for a render, usually a FullHD render
i uncheck Blender's "progressive" rendering option
so it renders 128x128 pixel tiles instead of the whole image
this seems to save enough memory to let the render proceed
when this is not enough i use mcjTeleblender's "collect maps" option
and i go in the Maps folder ( where images are collected )
and i resize anything larger than 1024x1024 to 1024x1024 pixels
when that's not enough i render in CPU mode instead of GPU
i'll repeat my test with 256 objects
What the ...
I guess I was completely wrong - I think the errors were caused because the scene used up almost all of my RAM, and when activating rendered view blender ran out of RAM while still loading the scene into VRAM and spit out a CUDA error ...
So sorry that I bothered you when actually I was using a really badly chosen scene for testing :red:
Edit: Yes, unlucky, me thinking my CUDA error meant that the VRAM was full which wasn't the case ... :lol:
But thanks a lot for looking into this issue, because I would have kept searching and searching without your help. :-)
oh it was not a bother since i too was worrying about this being the cause of some render problems
i know that GPU "programs" often want all the texture images uploaded to the video card memory
before the render starts -- i think that's the way Blender Cycles works ---
so the sum of your scene geometry and the texture images must fit on your card's memory
They fit - the scene is ~1.2 GB;
But when the data are copied to the GPU, they're also created in RAM, so e.g. blender.exe uses 200 MB and your scene will use 800 MB VRAM -> you activate rendered view -> blender.exe will now use 1000 MB RAM.
And I simply didn't have enough RAM left for blender.exe to be able to activate rendered view, which gave me the CUDA error and my first and wrong thought was: Not enough memory on the GPU :lol:
BTW I now save the exported files and reload them - in one scene I tested blender then uses just 200 MB instead of the 3.8 GB right after importing :-) (the GPU part is always the same)
Oh and I just ordered another 8 GB RAM ;-)
for the record, the scene with 256 objects with textures based ob a 4096x4096 images did render in GPU mode
the geometry itself was a moderate 200000 triangles
Oh my Bob ! it's the flying spaghetti monster ... not
We're in the same boat :lol:
I felt like a complete idiot ... everything's different in Blender ... even the default mouse keys :)
Here are the camera shortcuts - extremely helpful and can also be used to set up lights http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Camera
BTW I can't tell you how often Google sent me to forums with either sparcely sourced or even plain wrong information about Cycles ... it's crazy! Even the self-proclaimed "Gurus" sometimes post videos with node setups that are simply wrong ... Unbelievable!
It took me what felt like forever* to find out how to correctly set up ordinary specular maps ... they go into FAC of the mix node between diffuse map and glossy shader and can be controlled with a simple math node. [You can control the gloss itself with a map that's plugged into the glossy shader, but that would require a gloss map - that way you could create e.g. metal and leather on the same texture.]
And you don't set them to "non-color data" like almost everyone is suggesting. Very nice tutorial: https://vimeo.com/54131520
*The internet is flooded with posts (thanks, smartphones! >:( ) from people who neither double check nor really think about what they're publishing ... And even when they do ... they never come back and post a correction.
daveleitz68, love the SSS work you did with Bree for V5 on the beach using the Ultimo Paradiso environment!
What kind of lighting is set up in that scene? Are you using any emissive area lights? Or any HDR lighting?
Hi guys, I hope everyone is doing well and is making the most out of Daz and Blender.
I've been getting some really great results out of using the teleblender script in conjunction with Blender, and I thought I'd start posting some of the tips and tricks I use.
Specifically, I posted a tutorial on my skin settings over on my site here:
Good Looking Skin from Daz Studio to Blender
Obviously, everyone has their own methods, but I'm pretty happy with how my renders are turning out, and maybe someone would find this useful.
I'll attach a couple of examples to this post, and please hit me up with any questions...
* * * mcjTeleblender2 update coming up soon * * *
Daz Studio spotlights will be (optionally ) exported as Blender Spotlights, including correct orientation and spread angle
Daz Studio DirectLights will be (optionally) exported as Blender Sun Lights including correct orientation
...point lights ... ... Blender point lights
Uber AreaLights .... as Blender Area Lights
also the Opacity strength of the surface/materials will be added to the material node trees as a transparency shader +mix shader
previously all transparencies were obtained using maps ( gray images )
this was because i didn't want to modify Blender's build-in obj importer, to avoid unforeseen problems down the road
the opacity strength is transfered from Daz Studio the same way texture tiling is : calls to a new function in blenderBot