mcjTeleBlender:Daz Studio scenes/animations w/Blender's Cycles Engine

1356732

Comments

  • 3dOutlaw3dOutlaw Posts: 858
    edited December 1969

    OK so there is no Toggle System Concole option in the help menu, but the command window is up in the background and it looks like the below:

    cmd.jpg
    677 x 342 - 42K
  • mCasualmCasual Posts: 3,101
    edited October 2012

    3doutlaw said:
    OK so there is no Toggle System Concole option in the help menu, but the command window is up in the background and it looks like the below:

    it may mean you forgot to dump the python scripts from mcjTeleBlender's kit in the modules folder of your newly installed Blender

    on my PC that's the

    C:\Program Files\Blender Foundation\Blender\2.63\scripts\modules 

    Post edited by mCasual on
  • 3dOutlaw3dOutlaw Posts: 858
    edited December 1969

    Yep your right, they were in an old version directory, thanks!

  • rayerarayera Posts: 2
    edited December 1969

    Thanks for this tool :-)

    I have a problem, I'm using Daz Studio 4.5 and blender 2.64 as you can see texture cordinate node conect from Normal and not UV for all textures, this happend in Cycles renderer, Poser internal expert correctly

    blender.jpg
    927 x 611 - 41K
  • 3dOutlaw3dOutlaw Posts: 858
    edited December 1969

    Yep, you are right. I got similar results in 2.63. I upgraded to 2.64a and same thing.

  • 3dOutlaw3dOutlaw Posts: 858
    edited December 1969

    Found it! To fix this, modify mcjAddMappersToTexImgs.py, and change this line:

    links.new( texCoordNode.outputs[1], mappingNode.inputs[0] )

    to this:

    links.new( texCoordNode.outputs[2], mappingNode.inputs[0] )

    Then UV is used, and not Normal.

  • rayerarayera Posts: 2
    edited December 1969

    Tanks a lot 3doutlaw!! great :-)

  • mCasualmCasual Posts: 3,101
    edited December 1969

    3doutlaw said:
    Found it! To fix this, modify mcjAddMappersToTexImgs.py, and change this line:

    links.new( texCoordNode.outputs[1], mappingNode.inputs[0] )

    to this:

    links.new( texCoordNode.outputs[2], mappingNode.inputs[0] )

    Then UV is used, and not Normal.

    i will make a new version where the script identifies the UV output by name instead of by index-number

    it was a risky way of doing it anyway

  • mCasualmCasual Posts: 3,101
    edited December 1969

    3doutlaw said:
    Found it! To fix this, modify mcjAddMappersToTexImgs.py, and change this line:

    links.new( texCoordNode.outputs[1], mappingNode.inputs[0] )

    to this:

    links.new( texCoordNode.outputs[2], mappingNode.inputs[0] )

    Then UV is used, and not Normal.


    2 interesting things:

    i'm not totally fluent in python, so i didn't know we could do things like

        ntree.links.new(input=texCoordNode.outputs['UV'], output=imgTexNode.inputs['Vector'])

    which i found on a forum post about a minecraft-generator script for Blender

    right over here
    http://blenderartists.org/forum/showthread.php?237105-Mineblend-Blender-importer-add-on-for-Minecraft-worlds/page5

  • 3dOutlaw3dOutlaw Posts: 858
    edited December 1969

    That sure makes it easier to understand, and more robust! :) Nice find!

    (I am not a good Python programmer either, but as a software manager, I have become OK at debugging code)

  • mattiascibienmattiascibien Posts: 107
    edited October 2012

    I was testing the plugin with the last DAZ studio 4.5 and I am getting the wrong UVs using Genesis.

    EDIT: Was the bug regarding the 1 for a 2

    Also.. How can I fix white eyes using Genesis

    Post edited by mattiascibien on
  • mCasualmCasual Posts: 3,101
    edited October 2012

    ~ Update ~~ Update ~~ Update ~~ Update ~~ Update ~~ Update ~~ Update ~~ Update ~~ Update ~~ Update ~~ Update ~


    Thanks to rayera and 3doutlaw for pointing out an incompatibility that appeared with version 2.64 of Blender/Cycles

    i modified the mcjAddMappersToTexImgs.py module which is part of the mcjBlendbot package named mcjBlendBot_October_18_2012.zip

    so you simply have to download it from my site and unzip it in your ....\Blender\2.64\scripts\modules folder

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

    namedIOs.jpg
    1280 x 480 - 101K
    Post edited by mCasual on
  • mattiascibienmattiascibien Posts: 107
    edited December 1969

    Working fine,... But still White iris and pupil. What am I doing Wrong?

  • mCasualmCasual Posts: 3,101
    edited October 2012

    gravity0 said:
    Working fine,... But still White iris and pupil. What am I doing Wrong?

    if you create a small entirely black image, and apply it as an Opacity map to the cornea of the eye,

    you will obtain a fully transparent cornea as seen in Daz Studio and as rendered in Blender/Cycles

    sometimes there's a transparency map for the cornea, but due to export issues, the image cannot be found

    or the transparency map is part of the color map, and that's not compatible with mcjTeleblender

    so replacing it with a simple black image , like the one below, does the trick

    black.jpg
    256 x 256 - 668B
    Post edited by mCasual on
  • mattiascibienmattiascibien Posts: 107
    edited October 2012

    Going to try after dinner :) Also, sometimes when using hair i got glowing ones since the texture was a emitting map. Do not know in new versions.

    Post edited by mattiascibien on
  • mCasualmCasual Posts: 3,101
    edited December 1969

    gravity0 said:
    Going to try after dinner :) Also, sometimes when using hair i got glowing ones since the texture was a emitting map. Do not know in new versions.

    i tested the basic Genesis, and for the transparency of the cornea, they set Opacity to 0%, but that's ignored during the export//import phases, so you can fix this by applying an all-black image to the opacity channel of the cornea and they will be transparent in Blender too.

    when an object in the scene has an image map applied to the Ambient Color, mcjTeleblender makes this object emissive. Usually you'd use that feature as area lights

    xpame3b.jpg
    589 x 800 - 57K
  • mattiascibienmattiascibien Posts: 107
    edited October 2012

    Sorry I am not an expert of Cycles, how can I add the black image as a opacity map?

    EDIT: Made from DAZ and everything worked.

    Post edited by mattiascibien on
  • mCasualmCasual Posts: 3,101
    edited December 1969

    ~~ moderately important update ~~ ~~ moderately important update ~~ ~~ moderately important update ~~
    ~~ moderately important update ~~ ~~ moderately important update ~~ ~~ moderately important update ~~
    ~~ moderately important update ~~ ~~ moderately important update ~~ ~~ moderately important update ~~

    i modified the script mcjTeleblender,

    ---- the batch file created when you press the "Export/open current frame" button

    can now be used to (re) launch the render process of that one frame.

    ( i removed the -b option which made Blender run in UI-less mode )


    ---- when exporting animations, the surface smoothing options were not enforced,

    resulting in very faceted bodies, maybe this became an issue only in DS4

    or it goes to show that very few use mcjTeleblender for animations :)

    i mean the results were so scary one could lose his or her 3d permit!


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

    novelty.gif
    320 x 640 - 611K
  • 3dOutlaw3dOutlaw Posts: 858
    edited December 1969

    I made a 1-click Python script for Poser based on your framework. Still missing the Camera and Lights of course, but it makes it easier.

    I say "made", but its more of a hack.

    Click here for the post over at the other site

  • mCasualmCasual Posts: 3,101
    edited December 1969

    3doutlaw said:
    I made a 1-click Python script for Poser based on your framework. Still missing the Camera and Lights of course, but it makes it easier.

    I say "made", but its more of a hack.

    Click here for the post over at the other site

    reading those scripts is a great introduction to poser-python

  • 3dOutlaw3dOutlaw Posts: 858
    edited December 1969

    I am working on the camera part now. I've got the camera parameters from Poser for the Current camera, now I just need to translate them to Blender, so I can put the camera part into the python for your framework. Workin' on it now.

  • mCasualmCasual Posts: 3,101
    edited December 1969

    3doutlaw said:
    I am working on the camera part now. I've got the camera parameters from Poser for the Current camera, now I just need to translate them to Blender, so I can put the camera part into the python for your framework. Workin' on it now.

    when i made mcjTeleblender and the script for VooDoo camera tracking
    i had to really understand well how focal lengths, filmback size and aspect ratios worked in poser/Studio/Carrara

    if you want to read it, it's here http://forumarchive.daz3d.com/viewtopic.php?t=175284

  • 3dOutlaw3dOutlaw Posts: 858
    edited December 1969

    Tempest! said:

    If you want to export an object from Blender in Poser scale you have to scale it down to 0,41 times (rounded) its Blender size.

    In reverse that means to if you export an obj from Poser into Blender, you'll have to scale it up to 2,439 times it's original size.
    For example, this way Vicky4 will be 1,73 Blender units (equivalent of 173 cm) tall, which seems about right.

    So after you import your scene as an OBJ, make sure it's selected and type S (for "scale") and 2,439 for the ratio.

    In DS there are presets for OBJ export scaling.

    DS: 1 unit = 1cm
    Blender: 1 unit = 50cm
    Poser: 1 unit = 8ft

    So if you export on the Blender preset, and the Poser preset (or export from Poser), you need to scale the Poser export around 4.878, to get a similar OBJ size as the DS to Blender preset.

    ...but in Blender, if you consider every Unit to be 1M, then this makes V4 around 11.5ft tall.

    Is the DS to Blender preset just off? Shouldn't the Blender preset be 1 unit = 100cm, thus making it more like the 2.439, thus making V4 around 5ft 9in (which is still a pretty tall lady, but at least realistic?)

  • mCasualmCasual Posts: 3,101
    edited October 2012

    about scaling factors

    the bizarre scaling factors in Poser are derived from
    1 unit = 8ft
    so, 1 unit = 8 * 12 * 2.54 = 243.84 cm
    and 1 / 243.84 = 0.00410104986

    so, a 2 meter tall character exported from Poser with a scale factor of 1, will be

    200/243.84 = 0.82020997375 units tall in the obj file

    Blender uses 1 unit in the obj file = 50 cm in the Blender world

    the character which was 2 meters tall in Poser is now

    0.82020997375 * 50cm = 41.0104986877 cm in the Blender world

    so the export scale or the import scale factor to use, to obtain a 2 meters tall character in Blender's world is

    200/41.01= 4.8768

    the more direct way to obtain this factor is

    ( 8 * 12 * 2.54 cm ) / 50 cm = 4.8768

    ----

    unless i goofed somewhere :)

    Post edited by mCasual on
  • Tempest!Tempest! Posts: 0
    edited October 2012

    3doutlaw said:
    Tempest! said:

    If you want to export an object from Blender in Poser scale you have to scale it down to 0,41 times (rounded) its Blender size.

    In reverse that means to if you export an obj from Poser into Blender, you'll have to scale it up to 2,439 times it's original size.
    For example, this way Vicky4 will be 1,73 Blender units (equivalent of 173 cm) tall, which seems about right.

    So after you import your scene as an OBJ, make sure it's selected and type S (for "scale") and 2,439 for the ratio.

    Is the DS to Blender preset just off? Shouldn't the Blender preset be 1 unit = 100cm, thus making it more like the 2.439, thus making V4 around 5ft 9in (which is still a pretty tall lady, but at least realistic?)


    I reckon the scale of the DS to Blender preset is just off. You might as well use the 3DSMax presets when exporting to Blender, I guess.

    In Blender, if you switch the the units from "None" (the Blender default) to metrics or imperial you get 1 unit = 100cm or 1 unit = 3.281ft respectively.

    Post edited by Tempest! on
  • 3dOutlaw3dOutlaw Posts: 858
    edited December 1969

    Nah, it was right. I keep thinking the Unit in Blender is 1M cause it starts with a 1M cube, but if you look at the units scale, there is 2 units for each side of the cube (i.e. 50cm), so the 4.878 (or 4.8768) was/is correct.

  • Tempest!Tempest! Posts: 0
    edited December 1969

    I wonder where I got the 1.73 units though... that's not right at all. I probably must have mistyped the scale factor in Blender because otherwise the calculations make sense.

  • mCasualmCasual Posts: 3,101
    edited October 2012

    ~ minor Update ~~ minor Update ~~ minor Update ~~ minor Update ~~ minor Update ~~ minor Update ~
    

    i used mcjTeleblender for months before encountering this issue but ....

    if you loaded a daz scene into a pre-existing .blend scene

    and this scene contained non-applied modifiers ( for example, a subdivision modifier )

    mcjBlendBot failed ( while applying smoothing )

    this resulted in a scene with no textures.

    so i posted on my site a new version of mcjBlendbot which corrects this

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

    ------
    see the wall with round holes, it had a non-applied subdivision modifier

    goldenyears.jpg
    1280 x 800 - 130K
    Post edited by mCasual on
  • Tempest!Tempest! Posts: 0
    edited December 1969

    3doutlaw said:
    Nah, it was right. I keep thinking the Unit in Blender is 1M cause it starts with a 1M cube, but if you look at the units scale, there is 2 units for each side of the cube (i.e. 50cm), so the 4.878 (or 4.8768) was/is correct.

    Ah, we're crossposting.

    The default cube is 2 meters across, not 1m. So, no, 4.878 is not correct.
    If you switch to metric system in Blender (under Units in the Scene tab), you will clearly see that 1 unit equals 1 meter when using 1.0 scale.

  • mCasualmCasual Posts: 3,101
    edited October 2012

    units

    here i made a 1 unit by 1 unit plane in an obj file and imported it in Blender

    Aiko was added to the scene using mcjTeleblender

    so it was exported with Daz Studio's scale for Blender which is stated to be 2% or 1 unit = 50cm

    in Daz studio Aiko3 is about 170cm


    in the screen capture you can see the cube is said to be of dimension 2 x 2 x 2

    and is 2 times the width of the 1-unit plane

    ---------

    indeed as Tempest was saying, if we go in the Scene Panel and set the units to Metric, we see the cube is 2 meters x 2m x 2m

    ---

    so when we export from Daz Studio we should use

    Scale = 1% ( 1 unit = 100cm ) instead of 2% ( 1 unit = 50 cm )

    --

    and the Poser scale to use would be

    ( 8 * 12 * 2.54 cm ) / 100 cm = 2.4384

    --

    second picture

    i scaled Aiko with a factor of 0.5,

    and she is now less tall than the 2meters cube, which makes sense !

    then i exported Aiko from Poser 7 and she's too tiny

    -----

    third picture i scaled up the Poser7 Aiko using the factor 2.4384

    and she now is her real size

    okok.jpg
    600 x 600 - 32K
    toosmal.jpg
    1280 x 720 - 116K
    example.jpg
    1198 x 590 - 77K
    Post edited by mCasual on
Sign In or Register to comment.
Rocket Fuel