READY - Rendering daz studio scenes as skyballs ( equirectangular / spherical images )

124»

Comments

  • RAMWolffRAMWolff Posts: 10,155
    edited December 1969

    So cool!

  • mCasualmCasual Posts: 4,604
    edited December 1969

    version 3 will have some visual feedback
    so you can see what's going on during the stretching process

    lets recap how this will work

    - install imagemagick
    - install the new mcjSqueeze.exe utility in the same folder as imagemagick's convertexe
    - create and select a camera in DS
    - launch mcjSphericalCam
    - click the auto-focus button
    - click the Animate camera button
    - exit
    - render the 72 or 128 tiles
    - launch mcjSphericalCam
    - click the create Stretcher.bat button
    - select one of your 72 rendered images
    - click the Run Stretcher.bat button
    - watch the 72 tiles being stretched, takes about a minute
    - click the create montage.bat button
    - click the Run montage.bat button
    - watch the 72 stretched tiles being assembled by imagemagick into one big 6000x3000 or 8000x4000 panorama (takes a few seconds)

    poap.jpg
    1280 x 720 - 113K
  • RAMWolffRAMWolff Posts: 10,155
    edited December 1969

    Could you by chance just package up all the needed modules you mentioned above in one zip?

  • mCasualmCasual Posts: 4,604
    edited June 2015

    RAMWolff said:
    Could you by chance just package up all the needed modules you mentioned above in one zip?

    i prefer not to distribute imagemagick's software
    i understand it would be convenient, but this way i don't have to deal
    with versions, platforms (32bit 64bit ... someday windows10) and copyrights
    which exist in some form even on freeware and open source

    btw, i'm in the process of uploading the new version and adjusting the manual page

    Post edited by mCasual on
  • RAMWolffRAMWolff Posts: 10,155
    edited June 2015

    OH.. I thought it was something you coded. Sorry sir. I'll be quiet then! lol

    OK.. Googled, found, downloaded, installed! :-)

    Post edited by RAMWolff on
  • mCasualmCasual Posts: 4,604
    edited July 2015

    it's Ready !! it's Ready !! it's Ready !! it's Ready !! it's Ready !! ( i hope )

    https://sites.google.com/site/mcasualsdazscripts5/mcjsphericalcam

    ( if you downloaded the script on July 2 before 9 am eastern,
    you may have the version that will fail the stretcher.bat phase
    so get the new one that was posted a few minutes later )

    Post edited by mCasual on
  • mCasualmCasual Posts: 4,604
    edited July 2015

    step by step, today's session

    - i have convert.exe, montage.exe and mcjSqueeze.exe in c:\imagemagick
    - i set up a non-animated scene in DS4.8
    - create a camera at 0, 105, 0
    - i iselect the camera
    - i launch mcjSphericalCam
    - i click the "Location of image magick convert.exe" button and select my c:\imagemagick\convert.exe file
    - i set the Horizontal Tiles slider to 12
    - i set the resolution slider at 256 pixels
    - i click the Auto-Focus Button (61mm)
    - i click the Animate Camera Button
    - i exit mcjSphericalCam
    - i render frame 0 to 71 in 3Delight 256x256 in C:\Users\Public\Documents\SkyBalls\ds48v3 the root name is pic.png
    - i launch mcjSphericalCam
    - i click the "Create Stretcher.bat" button
    - i select C:\Users\Public\Documents\SkyBalls\ds48v3\pic000.png ( one of my renders )
    - i specify i want the batch file to be C:\Users\Public\Documents\SkyBalls\ds48v3\stretcher.bat
    - i click the "Run Stretcher.bat" button
    - i watch the 72 image getting processed, takes a few seconds
    - i click the "Create mcjMontage.bat" button
    - i select out_pic000.pg, ( one of the 72 images that were stretched a moment ago ! )
    - as the mosaic/panorama output image, i chose the name July.png
    - the script didnt ask me and chose montage_out_pic.bat as the batch file name, it will be in the same folder as the images
    - i click the "Run mcjMontage.bat" button
    - and a few seconds later, it's there ! a nice 3072x1536 panorama of the mcjCastle

    so it works

    ( if you downloaded the script on July 2 before 9am eastern, you may have the version that will fail the stretcher.bat phase so get the new one that was posted a few minutes later )

    july.jpg
    2000 x 1000 - 198K
    Post edited by mCasual on
  • RAMWolffRAMWolff Posts: 10,155
    edited December 1969

    This is awesome. I'll get it and hope that I have some time this weekend to play! THANKS Casual!

  • mCasualmCasual Posts: 4,604
    edited July 2015

    RAMWolff said:
    This is awesome. I'll get it and hope that I have some time this weekend to play! THANKS Casual!

    welcome,
    it has to work it has to work
    i hope it works :)
    yah it will
    i 'm pretty sure
    chances are !

    in fact i already put the castle skyball to good use for the mcjTeleBlender thread

    allchromey.jpg
    536 x 536 - 53K
    Post edited by mCasual on
  • josejonesfilmsjosejonesfilms Posts: 2
    edited December 1969

    So i chimed in a few pages ago looking forward to seeing your final results. So I'm about to start trying to figure this out, pretty new to 3D modeling and animating. I'm very interested in this in use for 360 content for AR or VR, I've been doing a lot of stuff in UNITY and UNREAL engine while playing in pre-rendered stuff like this as well.

    I'd like to try using this new workflow you guys have come up with for some animation tests, but I've noticed you never render out with your models. Are you using the photosphere that you create stitching multiple images together just for enviroments and backgrounds? I ask because I've yet to see a spherical image rendered with a model in it.

    I have found using Cycles Render in BLENDER you can set camera to Equirectangular, but you need a LOT of light...which is tough since you are able to see everywhere in the image. I know DAZ really well, as it is what I learned on, just now figuring out BLENDER and it is great and tough at the same time, so if i could do 360 renders in DAZ that would be great.

    With your script can I move the camera and animate?

    Here is a still of my first render I did in blender (with cycles and equirectangular camera)

    image

    And here is a 60fps animation I did shortly after

    http://webmshare.com/play/YLMn0

    I can then use the equirectangular or spherical image inside of a VR headset, or on a 360 video/photo player.

    0068.jpg
    1920 x 1080 - 110K
  • mCasualmCasual Posts: 4,604
    edited July 2015

    .... I've noticed you never render out with your models.

    ... BLENDER you can set camera to Equirectangular, ...

    With your script can I move the camera and animate?

    ....

    the mcjSphericalCam script is indeed intended to create non-moving panoramic images
    those images when applied to the surface of giant spheres make good backgrounds
    the illusion is maintained as long as the camera doesnt move too far from the center of the giant sphere
    rotations ( looking around ) doesnt break the illusion

    in the Daz Studio IRay renderer and in Blender Cycles, there is an "environment" image ( called world environment in Blender )
    if you use one of the images found on the net or created using mcjSphericalCam
    you can get the same 360 degrees background illusion as you get when applying it to a giant sphere object
    and the panoramic image serves as lighting in the scene
    so if your panoramic image contains the bright-white sun, there will be light coming from that direction illuminating the scene

    sometimes the panoramic images are distributed in HDR format
    and it may be preferable to use the HDR image for lighting purposes

    the equirectangular Camera ( not the same as the world ) lets you render your Blender scene as an equirectangular panorama in one shot - so it does what mcjSphericalCam does, but without the complicated mosaic Building

    so, recently, i used an equirectangular panorama as the Blender World Environment
    it's an image of a warehouse i got from the sIBL archive

    and i rendered a Daz Studio scene of a character walking .... in Blender
    ( i used my mcjTeleBlender script to do the daz studio to Blender ttransfer )

    and i used Blender's Equirectangular camera to render my scene at a 4000x2000 resolution
    and posted it at youtube, I had to use the special youtube program to "mark" the video as being a Youtube-360 video


    https://www.youtube.com/watch?v=kJaiETGp9b8

    on my youtube and on my web site there's a lot more examples of using the equirectangular images as background and lighting

    ----
    image below : rendered in BlenderCycles, the environment sphere is using an equirectangular/spherical image as the visible backdrop and for lighting - i probably added a sun light also

    toot.jpg
    1920 x 1200 - 698K
    Post edited by mCasual on
  • grinch2901grinch2901 Posts: 1,246

    Hi Casual. This looks very cool but when I get to the step where I run the stretcher.bat I get errors and no images are created.  Here are a few lines of the errors popping up., any idea why?  I do have the mcjsqueeze in the same directory as convert.exe and I did point the script to that path as first step.  Thanks!

    warning/module.c/GetMagickModulePath/674.

    convert.exe: NoDecodeDelegateForThisImageFormat `TGA' @ error/constitute.c/ReadImage/501.

    convert.exe: UnableToOpenBlob `out_Fancy': No such file or directory @ error/blob.c/OpenBlob/2699.

    convert.exe: NoDecodeDelegateForThisImageFormat `' @ error/constitute.c/ReadImage/501.

    convert.exe: NoImagesDefined `Closet071.jpg' @ error/convert.c/ConvertImageCommand/3230.

  • mCasualmCasual Posts: 4,604

     it sounds like imagemagick's convert is separated from the other files that come when you install imagemagick

    possibly .dll files

    or the way you installed it, windows was not told where to look for those

    one of the messages seems to indicate something fails when looking for imageMagick's support files

    read/writing TGA files is probably no part of the barebones convert.exe

     

    the short version is, you could re-install imagemagick, a recent version

    they call them "binaries" when they are packaged for end-users

    http://www.imagemagick.org/script/binary-releases.php

     

    then make sure the skyball batch files refer to that fully installed convert.exe

     

    Hi Casual. This looks very cool but when I get to the step where I run the stretcher.bat I get errors and no images are created.  Here are a few lines of the errors popping up., any idea why?  I do have the mcjsqueeze in the same directory as convert.exe and I did point the script to that path as first step.  Thanks!

    warning/module.c/GetMagickModulePath/674.

    convert.exe: NoDecodeDelegateForThisImageFormat `TGA' @ error/constitute.c/ReadImage/501.

    convert.exe: UnableToOpenBlob `out_Fancy': No such file or directory @ error/blob.c/OpenBlob/2699.

    convert.exe: NoDecodeDelegateForThisImageFormat `' @ error/constitute.c/ReadImage/501.

    convert.exe: NoImagesDefined `Closet071.jpg' @ error/convert.c/ConvertImageCommand/3230.

     

  • grinch2901grinch2901 Posts: 1,246

    I don't think that's it Casual. I installed ImageMagick from the binary distribution just last week so it's current and complete.  I wanted to give this a shot but it's not going well so far. Will keep trying.

  • mCasualmCasual Posts: 4,604
    edited October 2015

    wild guess : maybe if the image filename is toto.TGA instead of toto.tga ...

    the message about "NoDecodeDelegateForThisImageFormat "

    sounds like there's a missing element in your imagemagick

     

    in windows installations, often, programs like imagemagick install environment variables

    for example, it sets a variable named IMAGEMAGICK to the complete path to where imagemagick is installed

    when my .bat script calls convert.exe, the program convert .exe may ask windows "where is "IMAGEMAGICK" because it needs to use a TGA decoder (delegate) located there

    if during the installation the variable setting was blocked by windows security or even virus scanner, window may answer "no idea what you're talkin about"

    --

    if you google for imagemagick delegate

    or the other error messages you may find the reason

     

    http://www.imagemagick.org/discourse-server/viewtopic.php?t=20599

     

     

     

    I don't think that's it Casual. I installed ImageMagick from the binary distribution just last week so it's current and complete.  I wanted to give this a shot but it's not going well so far. Will keep trying.

     

    Post edited by mCasual on
  • Luv LeeLuv Lee Posts: 230
    mCasual said:

    Quick question -- I was aksed to create a VR video--can this camera be used to create an animated VR relaity video in DAZ?  If not, do you know of a way to create the camera dimesions in IRAY/DAZ  for equirectangualar video making?

     

     

     

     

    so .... friday

    because i want to figure if it's inevitable or not that the image has cracks ( or bad photo stitchings if you will )

    well actually i suspect it's because my camera's Field of view is not precisely 30 degrees ) when the focal length is 65 mm

    i think it may be 45 degrees when it's 35mm ... i have a long study of the matter .... in the old forum i guess

    to quote myself

    "about the focal lengths - in Daz Studio the focal length is relative to the vertical aperture of the camera for a backplate 35 mm tall"

    so tan( fov / 2 ) = 17.5mm / 65mm

    fov/2 = arctan( 17.5mm / 65mm ) = 15.0684882 degrees

    so FOV = 30.1369763 degrees degrees

    there you have it,

    not 30 degrees

    hence the cracks

    --------

    tan(15 degrees) = 0.26794919243

    17.5mm / 0.26794919243 = 65.3108891 millimeters

    we set the camera Focal length at 65.3108891 mm

    well .... that's not quite it yet

    ( the 3d scene in this case is a 100 meters 24x24x24 Cube centered at 0,0,0 )

    -----


    Fig 2 - when applied on a sphere it looks perfect!!!!!!

    see that's amy 100 metes down and away seen from the center of the cube ... oops, that's the real cube, not the sphere :D


    Fig 3 - uhhhh that's not as glorious as Fig 2 :|

     

    mCasual said:

    https://sites.google.com/site/mcasualsdazscripts5/mcjsphericalcam

     

     

    ( if you downloaded the script on July 2 before 9 am eastern,
    you may have the version that will fail the stretcher.bat phase
    so get the new one that was posted a few minutes later )

     

     

    the script animates your camera, over, say, 72 frames

    you render those 72 frames

    this render covered the entire environment sphere

    then using the script, the mcjSqueeze and imagemagick utilities, it assembles a mosaic/panorama

    You then apply this as the texture on giant spheres and you get great fake backdrops/lighting for your scenes !


    i added a few skyBall props as obj files, to be imported using Daz Preset ( scale = 100% )

    those spheres have a 1 Km radius

    their normals and UV mapings are ready for equirectangular panoramas

    this is from the initial posting
    it gives a good idea of the way the camera is animated

     

    var cam = Scene.getSelectedNode( 0 );var xr = cam.getXRotControl();var yr = cam.getYRotControl();for( var y = 0; y < 6; y++ ){ var XRotAng = 75 - y * 30 for( var x = 0; x < 12; x++ ) {  var YRotAng = x * 30;  Scene.setFrame( y * 12 + x )  xr.setValue(XRotAng);  yr.setValue(YRotAng); }}

     

     

  • mCasualmCasual Posts: 4,604
    edited July 2016

    HOW TO convert your spherical renders into FaceBook 360 VR images

    Lets say you succesfully created a spherical image which looks like this and is 6000x3000 pixels

    get exiftool.exe http://www.sno.phy.queensu.ca/~phil/exiftool/

    lets say your image is named pikachunettes.jpg

    and you placed it in the same folder as exiftool.exe

    open notepad

    type

    exiftool -Make="RICOH" -Model="RICOH THETA S" pikachunettes.jpg

    save this as a textfile named chuuuuuu.bat in the same folder as exiftool.exe and pikachunettes.jpg

    Run chuuuuuu.bat by double-left-clicking on it in your windows Explorer

    there you have it, your pikachunettes.jpg image will now be accepted by facebook as a 360 degrees panorama  !

    your friends will be able to look around

     

     

    amalltexasb.jpg
    800 x 400 - 99K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,604
    edited July 2016

    360 IMAGE IN FACEBOOK

    though 360 images dont seem to work on android with chrome

    CAT.jpg
    518 x 652 - 66K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,604
    edited July 2016

    New Trick !!

    If you render as PNGs with no environment/backdrop, you get PNGs with transparencies

    if you use my script to "massage" the tiles, and use the png format, your tiles have their transparencies preserved

    BUT

    for now, the montage batch file does not produce PNGs with a transparency

    so !

    use my script to generate montage.bat

    open montage.bat in notepad

    replace

    "C:/imagemagick/montage.exe" -geometry +0+0 -tile 12x6 out_texas00.png out_texas01. ... ... ...

    with

    "C:/imagemagick/montage.exe" -background none -geometry +0+0 -tile 12x6 out_texas00.png out_texas01. ... ... ...

    and you'll get your spherical render with an alpha layer

    which you can then composite over any spherical environment map

    smalnunuhardwaremontage_out_texas.png
    800 x 400 - 19K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,604
    edited July 2016

    Note

    i did a new mosaic render ( no environment-background = important ) Daz Studio Hardware render

    and rendered my tiles as 12x6 500x500 pixels tiles PNGs,

    which gave me a 6000x3000, PNG Photosphere ... with transparency layer ( using the aforementioned modification to the montage.bat file )

    so in Paintshop i was able to composite it on top of an equilateral environment map from sIBL archive

    BUT i accidentally ended with a 6000x3012 jpg image, and after tagging it with exiftool  Facebook didnt accept it as a 360 degrees VR image

    re-BUT i cropped it to 6000x3000, metatagged it and this time FB accepted it

     

    fbfb.jpg
    514 x 596 - 81K
    Post edited by mCasual on
  • RAMWolffRAMWolff Posts: 10,155

    Are you on Facebook?  If so I'd like to connect with you there if possible..

    You can find me under Rich Wolffie McCormick

  • mCasualmCasual Posts: 4,604
    edited July 2016

    to make this post a a legal Freebies post, here's a free script to zero the position and rotations of the currently selected node

    if( node = Scene.getPrimarySelection() ) for( i = 0; i < 6; i++ ) node.getProperty( i ).setValue( 0 );

     


     

     

    Hi there

    my facebook is Jacques Squerre

    almost all of my posts are public

    i only have 12 facebook friends and i think that's all my sociability can handle

    one place where you can follow my 3d/daz activities day by day is here: http://mcasual.deviantart.com/gallery/

    and my gallery is so safe-for-the-workplace, i think DA will one day ban me ( kidding )

     

    RAMWolff said:

    Are you on Facebook?  If so I'd like to connect with you there if possible..

    You can find me under Rich Wolffie McCormick

     

    Post edited by mCasual on
  • RAMWolffRAMWolff Posts: 10,155

    It's too bad you don't have your page set up to allow "Followers" on Facebook.  I rarely go to DA, it's just one more stop to plug into my brain while I'm a Fb nut and am on multiple times a day..... I found you but yea, no "follow" button... :-( 

  • mCasualmCasual Posts: 4,604

    thanks i didnt know about the fact i was unfollowable :)

    i opened it !

    recently i was showing how to make FaceBook 360 images using tmy mcjSphericalCam script and exifTool

    https://www.facebook.com/photo.php?fbid=10155014246764746&set=rpd.595934745&type=3&theater

     

    RAMWolff said:

    It's too bad you don't have your page set up to allow "Followers" on Facebook.  I rarely go to DA, it's just one more stop to plug into my brain while I'm a Fb nut and am on multiple times a day..... I found you but yea, no "follow" button... :-( 

     

  • RAMWolffRAMWolff Posts: 10,155

    Awesome.  Now following!  :-)

Sign In or Register to comment.