Digital Art Zone

 
   
3 of 41
3
mcjTeleBlender - render Daz Strudio scenes and animations using Blender’s Cycles Render Engine
Posted: 07 August 2012 08:10 AM   [ Ignore ]   [ # 31 ]
Power Member
Avatar
RankRankRank
Total Posts:  1911
Joined  2006-01-19
sbuldan - 04 August 2012 04:14 AM

What i wonder know is, since 3dsmax is supporting python scripting, is it would be possible to make phyton scripts to use your daz generated scripts to create vray converted max scenes? Or the daz scripts should be altered, too?

I have no experience in daz scripting nor python scripting. But ihave a background of flash scripting. I bougth a python scripting book and it didnt look harder than acion script.

it would basically be a rewrite

an important part of the script is dedicated to building node-based materials which must be quite different in 3ds
then there’s a script which is a to-do list, for loading then discarding obj files, when rendering animations

a recent render

 

Image Attachments
promogif.gif
Profile
 
 
Posted: 07 August 2012 08:22 AM   [ Ignore ]   [ # 32 ]
Power Member
Avatar
RankRankRank
Total Posts:  1911
Joined  2006-01-19
sbuldan - 07 August 2012 12:21 AM

Hi, solved the problem if i use a empty default file BI set. It exports well with out problem.

wild speculation on my part - maybe you’d need to go in the user preferences and specify Cycles rendering options , then save the user preferences

 

 

Image Attachments
omaoma.gif
Profile
 
 
Posted: 14 August 2012 01:36 PM   [ Ignore ]   [ # 33 ]
New Member
Total Posts:  22
Joined  2012-02-14

I have quick look at your code, if i hadnt got it wrong you are doing most of the work in the blender side. You use daz script just to tell python what to do. Am i right?

Profile
 
 
Posted: 14 August 2012 02:46 PM   [ Ignore ]   [ # 34 ]
Power Member
Avatar
RankRankRank
Total Posts:  1911
Joined  2006-01-19
sbuldan - 14 August 2012 01:36 PM

I have quick look at your code, if i hadnt got it wrong you are doing most of the work in the blender side. You use daz script just to tell python what to do. Am i right?

on daz studio’s side, it exports the scene as .obj files

it then creates a blender-python file that will, later on, load the obj file, position the camera, add lights, go through the materials and create node-based materials

then it launches a batch file, which launches blender,
in the command-line that launches blender,
blender is told to launch the python script created by the daz script

the python script is basicaly a to-do list, and the parameters to use

i also wrote 5 or 6 python scripts, which never change, that do the actual work

 

Profile
 
 
Posted: 22 September 2012 04:08 PM   [ Ignore ]   [ # 35 ]
Active Member
Avatar
RankRank
Total Posts:  632
Joined  2008-02-22

Hey, I just saw this, and it looks cool, thanks!  Are the settings in the dialog saved with the DAZ scene file?

 Signature 

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

Profile
 
 
Posted: 22 September 2012 04:54 PM   [ Ignore ]   [ # 36 ]
Power Member
Avatar
RankRankRank
Total Posts:  1911
Joined  2006-01-19
3doutlaw - 22 September 2012 04:08 PM

Hey, I just saw this, and it looks cool, thanks!  Are the settings in the dialog saved with the DAZ scene file?

they are saved independently of the scene when you close the script

so nect time you use the script, you get the settings from the previous use


( unrelated image to decorate the pose )

 

Image Attachments
coracora.jpg
Profile
 
 
Posted: 22 September 2012 05:50 PM   [ Ignore ]   [ # 37 ]
Active Member
Avatar
RankRank
Total Posts:  632
Joined  2008-02-22

Wow!  This script rocks!  I am surprised there are not 30 pages of discussion here, versus 3.  Great Job!  Will post a render a little later on.

 Signature 

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

Profile
 
 
Posted: 23 September 2012 11:37 PM   [ Ignore ]   [ # 38 ]
Member
Rank
Total Posts:  84
Joined  2007-08-24
Ariaso - 05 July 2012 11:30 PM

Unfortunately, this doesn’t seem to work for me.  If I export the file from DAZ, it will boot Blender, but only give me a grey cube (my default scene), no figure.  Help?

If it’s any help, I installed the scripts in \Program Files\Blender Foundation\Blender\2.63\scripts\modules

This is still not working.  I’d kindly like an answer. smile

Profile
 
 
Posted: 24 September 2012 12:50 AM   [ Ignore ]   [ # 39 ]
Power Member
Avatar
RankRankRank
Total Posts:  1911
Joined  2006-01-19
Ariaso - 23 September 2012 11:37 PM
Ariaso - 05 July 2012 11:30 PM

Unfortunately, this doesn’t seem to work for me.  If I export the file from DAZ, it will boot Blender, but only give me a grey cube (my default scene), no figure.  Help?

If it’s any help, I installed the scripts in \Program Files\Blender Foundation\Blender\2.63\scripts\modules

This is still not working.  I’d kindly like an answer. smile

in the “Export” section of mcjTeleblender
it’s important to checkmark the “Export scene as obj” check-box
then click on the “browse button ( circled in red )
then browse up to a folder on your hard disk
and type in a name like “test.obj”

because, mcjTeleblender will export your scene as an obj and an mtl file
and it must do so in a folder that does exist on your hard disk

after you launch the render, you could go in this folder of yours and see if the obj and mtl files are indeed there
there should also be a .py file and a .bat file

if you check-marked the “collect maps” check-box, then there will me a folder named Maps containing all the texture images in your scene.

 

Image Attachments
ex.jpg
Profile
 
 
Posted: 24 September 2012 05:44 PM   [ Ignore ]   [ # 40 ]
Member
Rank
Total Posts:  84
Joined  2007-08-24
Casual - 24 September 2012 12:50 AM
Ariaso - 23 September 2012 11:37 PM
Ariaso - 05 July 2012 11:30 PM

Unfortunately, this doesn’t seem to work for me.  If I export the file from DAZ, it will boot Blender, but only give me a grey cube (my default scene), no figure.  Help?

If it’s any help, I installed the scripts in \Program Files\Blender Foundation\Blender\2.63\scripts\modules

This is still not working.  I’d kindly like an answer. smile

in the “Export” section of mcjTeleblender
it’s important to checkmark the “Export scene as obj” check-box
then click on the “browse button ( circled in red )
then browse up to a folder on your hard disk
and type in a name like “test.obj”

because, mcjTeleblender will export your scene as an obj and an mtl file
and it must do so in a folder that does exist on your hard disk

after you launch the render, you could go in this folder of yours and see if the obj and mtl files are indeed there
there should also be a .py file and a .bat file

if you check-marked the “collect maps” check-box, then there will me a folder named Maps containing all the texture images in your scene.

 

Well, the fun thing is, I’ve done this with every option combination imaginable.  It either doesn’t boot Blender, or boots it and leaves me with a gray box.  It DOES leave an Object, but it ends up with none of its materials assigned.

Profile
 
 
Posted: 24 September 2012 06:58 PM   [ Ignore ]   [ # 41 ]
Power Member
Avatar
RankRankRank
Total Posts:  1911
Joined  2006-01-19
Ariaso - 24 September 2012 05:44 PM

Well, the fun thing is, I’ve done this with every option combination imaginable.  It either doesn’t boot Blender, or boots it and leaves me with a gray box.  It DOES leave an Object, but it ends up with none of its materials assigned.

something else you could try is to go in File / User preferences and pick the “Compure Renderer” used by Cycles
then save those settings by clicking on “Save Default Settings”

also shown below,mcjTeleblender’s default settings

this should work in all cases since it will render using the CPU renderer

the setting i use is GPU CUDA since i have an NVidia CUDA card

if you have an ATI card then you’d pick GPU OpenCL

 

Image Attachments
saveme.jpgdefaults.png
Profile
 
 
Posted: 24 September 2012 07:19 PM   [ Ignore ]   [ # 42 ]
Active Member
Avatar
RankRank
Total Posts:  632
Joined  2008-02-22

Also, in your target folder (form the export section), you should have (if u collected maps) an OBJ file, a MTL file, a PY file, a BAT file..and a folders called MAPS (that should be filled with the materials collected from the scene).  probably good to see if you got that after running the script.

If that is all there, and Blender Launched, you may want to make sure you have set the factory Defaults for Blender, in the off chance that you had the scale set “off” and it is actually importing really, really small. (ya never know)

If that all looks good, then after import in blender, you can look in the top right, and it lists the objects that are in the scene,  You should have more than a Cube, lgiht and camera

 Signature 

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

Profile
 
 
Posted: 24 September 2012 09:02 PM   [ Ignore ]   [ # 43 ]
Power Member
Avatar
RankRankRank
Total Posts:  1911
Joined  2006-01-19

How to use mcjTeleblender’s kit of blender-python scripts to render a Poser scene

In blender you can import an obj file, for example a Poser7 scene which was exported as an obj/mtl file

but before rendering that scene using the wonderful Cycles engine you must create special materials

which can be very tedious

that’s one of the main purpose of the whole mcjTeleblender kit

You still need to install the mcjBlendBot part of the kit from mcjTeleblender’s web page.

Lets say i exported the default poser7 scene in my c:\test\ folder under the name poser7scene.obj

unfortunately poser was not nice enough to save the needed texture images

so i manually copy them from poser’s textures folders and paste them in the c:\test\ folder

i open notepad and type the following

import mcjBlendBot
mcjBlendBot
.setGloss0.050.15 )
mcjBlendBot.setImageSize1280720 )
mcjBlendBot.setCyclesSettings"EXPERIMENTAL""GPU""CUDA"1000 )
mcjBlendBot.setSmoothTrue )
mcjBlendBot.setEdgeSplitTrue )
mcjBlendBot.loadfix"c:/test/poser7test.obj""CYCLESMATS"""True 

i save this as poser7test.py in the c:\test\ folder

using Windows’s Start/Run or by running a batch file i do

"C:/Program Files/Blender Foundation/Blender/blender.exe" -"C:/test/poser7test.py" 

if all goes well, Blender will start, and just as ordered, it will run our poser7test.py
script which, in turn, will load the scene poser7test.obj, and create for us all the gazillions of special materials

We just have to add some lights, position the camera and render

Poser can use the alpha layer of a given image for transparent materials like the corneas, eyelashes, hair etc
but Daz and my scripts expect standalone transparency maps, so you will have to fix transparent materials.

if your PC is not equipped with an NVidia CUDA card (and recent drivers) but instead uses an ATI/AMD card with OpenCL
then replace the line that reads

mcjBlendBot.setCyclesSettings( “EXPERIMENTAL”, “GPU”, “CUDA”, 1000 )

by

mcjBlendBot.setCyclesSettings( “EXPERIMENTAL”, “GPU”, “OPENCL”, 1000 )

if your video card supports neither, replace it with

mcjBlendBot.setCyclesSettings( “EXPERIMENTAL”, “CPU”, “OPENCL”, 1000 )

 

Image Attachments
simon2.jpg
Profile
 
 
Posted: 24 September 2012 10:30 PM   [ Ignore ]   [ # 44 ]
Active Member
Avatar
RankRank
Total Posts:  632
Joined  2008-02-22

I will give this a try tomorrow.  Poser does have a CollectSceneInventory script, which will gather all the materials for you.  Thanks!

 Signature 

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

Profile
 
 
Posted: 25 September 2012 08:37 PM   [ Ignore ]   [ # 45 ]
Active Member
Avatar
RankRank
Total Posts:  632
Joined  2008-02-22

Did you have trouble with the figure scaling coming from Poser in the shot above?  My Poser OBJ export is very small…and I dont see a scale option out of Poser, and I don’t see a scale option coming into Blender?

One other question…I tried a V4 portrait from DS, but her eyes are black. 

So after reading some stuff earlier on here, I changed the cornea to a white Transparent BDSF, and the Tear to the same…but it looks like I still have some issues. (see pic)

Are there some “known” settings that go wrong for eyes (and eyelashes actually)

EDIT:  I also posted over at the Blender forum on Rendo to see if folks had some material setting tips as well.  Here is the link to the similar thread as this post:  LINK

Image Attachments
eyeball.jpg
 Signature 

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

Profile
 
 
   
3 of 41
3