Digital Art Zone

 
   
8 of 41
8
mcjTeleBlender - render Daz Strudio scenes and animations using Blender’s Cycles Render Engine
Posted: 14 December 2012 11:37 AM   [ Ignore ]   [ # 106 ]
Power Member
Avatar
RankRankRank
Total Posts:  1921
Joined  2006-01-19
IsamuDyson - 13 December 2012 04:26 PM

Works nice, with the exception of GPU rendering. It keeps crashing blender. I have an evga gtx 260 superclocked with 896MB of memory. So, I think I’m running out of memory. I’ve got my eye on a gtx 660 superclocked with 4GB of memory. Hopefully I can pick up one, maybe two, within a couple of months. I can put up to 3 video cards at 16x each on my mobo. Although, I’ll have to up grade my power supply as well.

Also, I found this blog post by Blender Guru on some tweaks to speed up Cycles. In the comments, Thomas Dinges, gives tips on how to get a better looking render with lower samples. Lower samples = faster render times.

http://www.blenderguru.com/4-easy-ways-to-speed-up-cycles/

i only recently went for windows 7 64-bit and had the NVIDIA driver crashing
due to (i conclude)  Windows7 panicking because it sees the video driver become unresponsive
for more than x seconds during Blender-Cycles-GPU renders

so when my renders are large ( HD1080p ) or contains heavy geometry
i change blender cycles ’ render tiles to 4 tiles by 4 tiles, by default, it’s 1 tile
and this prevents crashes

i read somewhere that in windows’ registry there’s a timeout value you could change
so windows would not panic so early and crash the driver

the forum post was saying the ideal is to have 1 video card for
windows and 1 video card for rendering

——

the old-school way of crashing blender/cycles/gpu is when the scene contains a figure like victoria 4
which uses texture images like 4000x4000 pixels. Since Cycles ( i think ) transfers
all the images to the video card memory before rendering. The solution is to switch the texture images
to smaller ones (ex: 1024 x 1024). this can be done in daz studio or by using mcjTeleblender’s “collect maps”
option, closing Blender, resizing the collected maps in the /Maps folder then re-launching the render using the .bat file
produced by mcjTeleblender.

Profile
 
 
Posted: 16 December 2012 12:58 PM   [ Ignore ]   [ # 107 ]
Member
Avatar
Rank
Total Posts:  27
Joined  2009-09-25

I’ve already edited my registry to take care of this. But, the lowest I’ve set my tile size is 64x64. Strange thing is it renders fine when looking at the preview, but crashes when render it out for the final image. Maybe, I’ll bring this up on blenderartist. I know I’ve not had this problem in the past. Might even be an nVidia driver up date that’s causing problems. nVidia has written some bad drivers before.

Profile
 
 
Posted: 16 December 2012 01:30 PM   [ Ignore ]   [ # 108 ]
Power Member
Avatar
RankRankRank
Total Posts:  1921
Joined  2006-01-19
IsamuDyson - 16 December 2012 12:58 PM

I’ve already edited my registry to take care of this. But, the lowest I’ve set my tile size is 64x64. Strange thing is it renders fine when looking at the preview, but crashes when render it out for the final image. Maybe, I’ll bring this up on blenderartist. I know I’ve not had this problem in the past. Might even be an nVidia driver up date that’s causing problems. nVidia has written some bad drivers before.

you could remove all body/face texture images from your figures before exporting/rendering using mcjTeleblender
them and this way you’d know it that’s the issue.


on a related matter,  i think windows’ “magnifier” can cause DS4.5 crashes

also i disabled Aero’s transparencies, because it seemed to cause severe problems to Magnifier
and i suspected it uses video card memory

i also downgraded my nvidia driver to 197 instead of 304, but i’m not sure it did any good

i didn’t have recent problems with blender/cycles/gpu renderings, i set tiling to 2x2

note that your version of blender seems to be more recent than mine since you specify tile sizes

 

Profile
 
 
Posted: 21 December 2012 12:57 AM   [ Ignore ]   [ # 109 ]
Member
Avatar
Rank
Total Posts:  27
Joined  2009-09-25

I was able to GPU render a character using a basic setup and using “David’s Batch Processor” plug-in for Gimp to re-size the textures by 50%. Time to render - 1H:50M:13.64S. Settings used are in the image below.

Image Attachments
Daz-2-Blender_01.pngDaz-2-Blender_01_Setup.png
Profile
 
 
Posted: 21 December 2012 09:08 AM   [ Ignore ]   [ # 110 ]
Active Member
Avatar
RankRank
Total Posts:  635
Joined  2008-02-22

Irfanview also makes quick work of batch resize, conversions and many other batch options

 Signature 

+800 or so old forum posts, just so you know I’m not a newb!  tongue laugh

Profile
 
 
Posted: 22 December 2012 06:25 PM   [ Ignore ]   [ # 111 ]
Power Member
Avatar
RankRankRank
Total Posts:  1921
Joined  2006-01-19

if Blender Cycles with the non-negligible help of Windows 7 crashes with a message talking about the video driver having crashed
it’s due to the fact that windows7 and vista have a timeout of only 2 seconds, after this delay , it panic and do all sorts of disgraceful things

for Windows 7 i used this method, on the web

if you never used Regedit, dont try this solution, it’s too dangerous

personally i pumped up the TdrDelay to 16 seconds

I’ve just resolved this issue on my work PC - was getting driver Timeout and Detection Recovery when logging on to my work PC remotely, probably because of the longer response times for the GPU to update when using the remote connection.

I did the following to resolve it:
Resolve Timeout Detection and Recovery - WINDOWS 7 (32/64 bit)
Create a registry key in Windows to change the TDR settings to a higher amount, so that
Windows will allow for a longer delay before TDR process starts.
Open Regedit from Run or DOS.
In Windows 7 navigate to the correct registry key area, to create the new key:
HKEY_LOCAL_MACHINE>SYSTEM>CurrentControlSet>Control>GraphicsDrivers.
There will probably one key in there called DxgKrnlVersion there as a DWord.
Right click and select to create a new keyDWORD, and name it TdrDelay. The value assigned to it is the number
of seconds before TDR kicks in - it is currently 2 automatically in Windows (even though the reg. key value
doesn’t exist until you create it). Assign it with a new value (I tried 4
seconds), which doubles the time before TDR. Then restart PC. You need to restart the PC before the value will work.

Profile
 
 
Posted: 22 December 2012 10:26 PM   [ Ignore ]   [ # 112 ]
Member
Avatar
Rank
Total Posts:  27
Joined  2009-09-25
3doutlaw - 21 December 2012 09:08 AM

Irfanview also makes quick work of batch resize, conversions and many other batch options

Yeah, I was looking into that. But, when I found one that works within Gimp, I preferred that. If I can add more functionality to tools I already use, I will always go that route vs having yet another program to work with.

Casual - 22 December 2012 06:25 PM

if Blender Cycles with the non-negligible help of Windows 7 crashes with a message talking about the video driver having crashed
it’s due to the fact that windows7 and vista have a timeout of only 2 seconds, after this delay , it panic and do all sorts of disgraceful things

for Windows 7 i used this method, on the web

if you never used Regedit, dont try this solution, it’s too dangerous

personally i pumped up the TdrDelay to 16 seconds

My GPU usage always hovers between 40 and 60 percent. Once and a while it jumps to 83 percent. So, I don’t think my problem was the windows time out issue. I’ve had games push my card harder than Cycles.

If my render goes slightly higher in memory usage than my card, I get the out of memory error in the render window. The only time Blender crashes for me is if the memory usage spikes above what I have. My TdrDelay value is “10” in decimal “a” in Hexadecimal. And the crash for me is immediate as cycles calculates the render solution and the memory usage jumps up. But, shrinking the textures to fit within the video memory seems to be the fix for me until I get a better card.

I’m looking forward to seeing the memory issue in cycles resolved. Cycles seems to be the Blender Foundation’s main focus for now. Hopefully, they will come up with a fix to this and the lack of particle hair in cycles. As GPU computing grows I think we will see video cards begin to have expandable memory. There just isn’t enough demand currently for them to add this feature. Here are some things to look forward to in Cycles. http://www.blenderguru.com/is-it-in-blender-yet/

Also, Carrozza, gave these tips which I tried and it helped.

1a) Go into nvidia control panel > manage 3D settings > global settings >
> Multi Display/Mixed-GPU acceleration > set to either Single display performance
mode or Multiple display performance mode, depending on your setup

1b) Right under that is power management mode > set it to Prefer maximum performance
(that stops the downclocking)

1c) Now go down to Threaded Optimization > set to Off

http://blenderartists.org/forum/archive/index.php/t-235303.html?s=463be4b84df621486718d326694be2ff

Profile
 
 
Posted: 23 December 2012 07:18 AM   [ Ignore ]   [ # 113 ]
Power Member
Avatar
RankRankRank
Total Posts:  1921
Joined  2006-01-19
IsamuDyson - 22 December 2012 10:26 PM

. . . Irfanview . . .  TdrDelay . . . memory . .

recently i had a 20000 pixels wide image( Flatiron Building Equilateral Env. map ) that was hard to handle with PaintshopPro, and before that i had large HDR environment maps ( StudioHDR ) to resize.  I also had a not-so-large image that was freezing PaintshopPro.

I used the free command-line driven imagemagick and batch files.

The content of the .bat files i used

convert "Lips 01.jpg" -resize 2048x2048 lips2k.jpg 

or

c:\\imagemagick\convert "Lips 01.jpg" -resize 2048x2048 lips2k.jpg 
convert 14.hdr -resize 4096 014_4k.hdr 

or this one which works by dragging and dropping the image onto the .bat file—-and overwrites the original

convert %-resize 1024x1024 %

imagemagick can handle HDR and 16-bit Tiff ( sometimes used as bump maps

———-

about tdrdelay and blender cycles—since my Windows7 was using the default 2 seconds delay, if i tried rendering a full HD image in full global illumination, it never failed to crash smile not with 16 seconds life should be good

—-
for some images you can afford long render times, and i think (not sure) that if you set Cycles to CPU rendering, it wont mind the huge texture images.

my card has 2G DDR5 but i guess baseline for new rendering cards must be 4G

and ideally you’d have one card for Windows and one card for rendering

 

Profile
 
 
Posted: 27 December 2012 03:19 AM   [ Ignore ]   [ # 114 ]
Member
Avatar
Rank
Total Posts:  27
Joined  2009-09-25

I did a little turn table animation and posted on Youtube. Only 1500 passes, so it is a bit grainy.

http://www.youtube.com/watch?v=4Ez7t8hLsz4&feature=youtu.be

Profile
 
 
Posted: 22 January 2013 01:08 PM   [ Ignore ]   [ # 115 ]
Active Member
RankRank
Total Posts:  265
Joined  2010-07-08

Thanks for this tool!  I’ve been experimenting lately with Blender Cycles and learning more about using shaders and textures to achieve reasonably realistic surfaces.

However, I have some issues with the kind of nodes that this script produces for Blender.  First of all, it uses an ‘Add’ shader node to mix diffuse and glossy, which is a bad idea in my opinion.  Why not control the mix of diffuse, glossy, and transparency (when used) with ‘Mix’ shader nodes instead?  The B&W textures get plugged into the ‘factor’ input to vary the mix instead of controlling the color directly. 

With some experimentation I’ve come up with some custom node groups that I append to any file created by this script.  I have node groups for skin,  hair, eyes, mouth, cloth, tear, cornea, and eyelashes.  I export the scene with Blender Render option checked instead of Cycles.  Then I can append my custom node groups and go about assigning materials and textures for Cycles as I see fit. 

The script does the important job of getting the objects, UVs, and materials all linked in the scene in Blender.  I just wish it gave more options for how the nodes get set up.  My method wouldn’t be any good for animation, and unfortunately, I’m no coder.  If anyone’s interested, I can post pics of the nodes and results.

Profile
 
 
Posted: 23 January 2013 08:38 AM   [ Ignore ]   [ # 116 ]
Active Member
RankRank
Total Posts:  265
Joined  2010-07-08

Well, I decided that I would go ahead and post some more about my shader group nodes for Blender Cycles before I forget and move on to something entirely different.

I made a separate .blend file just for these materials.  I append this file into a scene that mcjTeleBlender exports to Blender.  Then it is just a matter of selecting objects and materials, setting up nodes, and matching up textures.  It’s not an automated process by any means, so it wouldn’t work for animators.  But I think it gives me more flexibility and control for still shots.  Perhaps some day I’ll get around to learning 3Delight in DAZ Studio, but I’m really used to the Blender interface now.

The group nodes have texture inputs on the left with names like DifTex (diffuse texture), TransTex (transparency texture), etc.  Below that are color (RGB/HSV)  inputs that can pretty much stay as they are unless one wants to tweak a particular material for effects.  Then there are value (float) inputs that can vary the roughness and amount of specularity in a material.  For instance, if a piece of clothing has shiny buttons, I can decrease the roughness setting and/or increase the specularity.  I might even change the specular color to something more ‘metallic’.

A skin node group can be assigned to one material of the torso, limbs, or face.  The textures for each area can then be added.  Then the material can be copied and pasted to other materials that use the same texture set.  For example, set up the material for the nostril, and then copy and paste that same material to the skin-face and lips.  Put a skin node group on a part of the torso, apply the textures, and copy/paste to all corresponding torso materials.  The only thing that actually needs to be done inside the node editor window is to manually connect the node group ‘bump’ output to the material displacement socket.  The rest can be handled in the properties window.

Image Attachments
DAZtoBlenderNodes.png
Profile
 
 
Posted: 23 January 2013 08:45 AM   [ Ignore ]   [ # 117 ]
Active Member
RankRank
Total Posts:  265
Joined  2010-07-08

Here is Justin/Aaron as an example of the node groups I described above.

Image Attachments
aaron-0.jpg
Profile
 
 
Posted: 23 January 2013 08:51 AM   [ Ignore ]   [ # 118 ]
Active Member
RankRank
Total Posts:  265
Joined  2010-07-08

Skin shader node group.  There isn’t a standard SSS shader for Cycles yet, and I haven’t found a ‘cheat’ that I really like.

Image Attachments
Screenshot_from_2013-01-22_17_27_50.png
Profile
 
 
Posted: 23 January 2013 05:03 PM   [ Ignore ]   [ # 119 ]
Power Member
Avatar
RankRankRank
Total Posts:  1921
Joined  2006-01-19
daveleitz68 - 22 January 2013 01:08 PM

Thanks for this tool!  I’ve been experimenting lately with Blender Cycles and learning more about using shaders and textures to achieve reasonably realistic surfaces.

However, I have some issues with the kind of nodes that this script produces for Blender.  First of all, it uses an ‘Add’ shader node to mix diffuse and glossy, which is a bad idea in my opinion.  Why not control the mix of diffuse, glossy, and transparency (when used) with ‘Mix’ shader nodes instead?  The B&W textures get plugged into the ‘factor’ input to vary the mix instead of controlling the color directly. 

With some experimentation I’ve come up with some custom node groups that I append to any file created by this script.  I have node groups for skin,  hair, eyes, mouth, cloth, tear, cornea, and eyelashes.  I export the scene with Blender Render option checked instead of Cycles.  Then I can append my custom node groups and go about assigning materials and textures for Cycles as I see fit. 

The script does the important job of getting the objects, UVs, and materials all linked in the scene in Blender.  I just wish it gave more options for how the nodes get set up.  My method wouldn’t be any good for animation, and unfortunately, I’m no coder.  If anyone’s interested, I can post pics of the nodes and results.

this started as scripts for my needs thrown together, and i didn’t put much research into how to handle glossiness, i chose “Add” but indeed in some cases ‘Mix’  and the other nodes like that give different results

there’s 2 ways to use your custom materials / nodes with mcjTeleblender,

open blender, create a blank .blend file, set the renderer to ‘cycles’,  that includes your materials ( since i dont have much experience with blender, i’d do this by applying materials to invisible objects ) , save this as “mylibrary.blend”

in daz Studio / mcjTeleblender, select “Scene File” as the render engine, and specify “mylibrary.blend” as your scene file

this would work for static scenes, where you then would apply your materials to the scene’s objects “manually”

—-

the second option is explained in the section of the manual titled “another way to re-use custom materials (.blend files )”

this method should work for animations

https://sites.google.com/site/mcasualsdazscripts/mcjteleblender-for-ds1-2-3-4

( i just hope it’s not broken in newer versions of blender or windows )

 

Image Attachments
aaa.jpg
Profile
 
 
Posted: 24 January 2013 08:32 AM   [ Ignore ]   [ # 120 ]
Active Member
RankRank
Total Posts:  265
Joined  2010-07-08

Thanks, I will try out those suggestions.  I did read at least part of the manual smile

I’ve also noticed that some textures don’t get included in the ‘Maps’ folder.  I still don’t fully understand all the material options included with characters in DS.  Some are designed to work with special kinds of lighting and others trigger 3Delight specific options like SSS.  I wonder if this is a character specific issue, or does it have to do with material options?  It’s not a problem for me since I just copy the files from my DAZ textures to the working directory for the .blend file and then see what I like best. 

So much to learn and do and so little time!!

My current ‘cloth’ shader node group:

Image Attachments
Screenshot_from_2013-01-22_17_26_55.png
Profile
 
 
   
8 of 41
8