[Radiance-general] 3D-360 video rendered with Radiance

Andy McNeil mcneil.andrew at gmail.com
Fri Jul 1 17:52:20 PDT 2016


I'm happy to share, though I think your cal file is more useful to others.
Especially since i didn't comment my script. The main difference between
what I did and the pseudo code in the pdf file linked was that I added
pixel jittering by adding a random number from 0 to 1 to the pixel position.

As for the viewer, I used mobile-vr-station (
https://itunes.apple.com/us/app/mobile-vr-station/id959820493?mt=8) on my
iphone with google cardboard viewer and your video worked perfectly. The
mobile-vr-station app itself is a pain in the rear, but I haven't found
anything better for downloading and storing VR images or videos on the
iphone.


here's the script I use:

#! /bin/bash

## Viewpoint Coordinates
vpx=4200
vpy=-1520
vpz=163

## Image Resolution
res=16384

## Octree file
oct=octs/octree.oct
amb=octs/ambient.amb

## Image filename
out=image.hdr

## distance between pupils (for different model units)
# #Inches
#  ipd=2.48031
# #Feet
# ipd=0.206693
# #cm
ipd=6.30
# #Meter
# ipd=0.063

halfres=$((res/2))

cnt $res $res | \
rcalc -of -e 'px=$2+rand(($2+1)*($1+3)); py=$1+rand(($2+1)*($1+3)*($1+2))' \
-e 'theta=px/'"${res}"'*2*PI-PI/2' \
-e
'phi=if(py-'"${halfres}"',PI/2-(py-'"${halfres}"')/'"${halfres}"'*PI,PI/2-py/'"${halfres}"'*PI)'
\
-e 'IPD='"${ipd}"'' \
-e 'scale=if($1-'"${halfres}"'+1,IPD/2,-IPD/2)' \
-e
'$1=scale*sin(theta)+'"${vpx}"';$2=scale*cos(theta)+'"${vpy}"';$3='"${vpz}"';$4=sin(theta-PI/2)*cos(phi);$5=cos(theta-PI/2)*cos(phi);$6=sin(phi)'
| \
rtrace -ffc -n 40 -ab 5 -ad 8000 -as 2000 -lw 5e-4 -af $amb -dj 1 -st 0 -ss
50  \
-x $res -y $res -ld- $oct | \
ra_rgbe -r - > ${out}


On Fri, Jul 1, 2016 at 2:21 PM, Mark Stock <mstock at umich.edu> wrote:

> Andy,
>
> I didn't see that document before I took on this project, but I think
> my method was pretty similar. If it wasn't, I'm not about to re-render
> this one. It'd be great if you shared your method to the list!
>
> Note that the Samsung Internet movie player (for playing YouTube
> movies on GearVR) expects your movie data to fill the 16:9 frame,
> otherwise it won't map correctly. The Oculus player (for movies
> downloaded to your phone+GearVR) is a little smarter, though, and will
> play both 3840x1920 (2:1) or 3840x2160 (16:9) just fine.
>
> Mark
>
> On 7/1/16, Andy McNeil <mcneil.andrew at gmail.com> wrote:
> > Mark! That is awesome!
> >
> > I've been playing around with 360 stereo renderings in Radiance too. I
> use
> > google cardboard and created an rcalc command for generating view rays
> > based on this:
> > https://developers.google.com/vr/jump/rendering-ods-content.pdf
> > I was planning to present some of my renderings at the workshop in
> August.
> > But your video puts my renderings to shame!
> >
> > Earlier this week I was looking at image.c to see what it would take to
> add
> > native support for equirectangular view types, including both mono and
> > over-under stereo. I think the awkward part would be specifying the pupil
> > spacing for stereo renderings. I think we could use the length of the
> > direction vector for pupil spacing, but this would prevent adding depth
> of
> > field blur.
> >
> > Andy
> >
> >
> > On Thu, Jun 30, 2016 at 9:16 PM, Mark Stock <mstock at umich.edu> wrote:
> >
> >> Folks,
> >>
> >> I thought I'd let you know about my recently-completed 4-minute 3D-360
> >> video that was rendered with Radiance. The subject is a dynamic
> >> triangle mesh from a computational fluid dynamics simulation of a
> >> sphere of fluid with a density discontinuity. (Lots of grey
> >> cylinders.)
> >>
> >> The original (2D rendering) video is here:
> >> https://www.youtube.com/watch?v=OShSC1VyBi0
> >>
> >> The new video (3D-360, for GearVR and other VR HMDs) is in multiple
> >> places:
> >> https://www.youtube.com/watch?v=zGFMqEKiAGM
> >> https://vimeo.com/173000788
> >> https://www.facebook.com/mark.stock/posts/10153805081796376
> >>
> >> I'll provide a direct download link for all you Radiance fans, who
> >> know how hard this actually was:
> >> http://markjstock.org/vr/MarkStock_SmokeWaterFire_UHDlo_360_TB.mp4
> >>
> >> The rendering took 8 months on a 4.4GHz, 8-core Intel Haswell chip.
> >> Each original frame was 11520x11520 (in HDR, of course), but reduced
> >> to 3840x3840 for storage, and further reduced to 3840x2160 for
> >> publishing. In all, almost 1 Terapixel of primary rays were traced.
> >> The directory takes up ~600 GB. I used an rcalc/rtrace trick to
> >> generate the 3D-360 frames. The command line for each frame looked
> >> like:
> >>
> >> cnt 11520 11520 | rcalc -f 3d360.cal -e
> >> "XD=11520;YD=11520;X=0;Y=0;Z=0;IPD=0.02;EX=0;EZ=0" | rtrace -ab 2 -aa
> >> 0 -ad 32 -as 0 -dj 0.7 -ds 0.06 -u+ -dv- -x 11520 -y 11520 -n 3 -fac
> >> scene0695.oct > img_0695temp.pic
> >>
> >> I attached the 3d360.cal file in case anyone else is interested.
> >>
> >> Have fun, and good night!
> >>
> >> Mark
> >>
> >> _______________________________________________
> >> Radiance-general mailing list
> >> Radiance-general at radiance-online.org
> >> http://www.radiance-online.org/mailman/listinfo/radiance-general
> >>
> >>
> >
>
> _______________________________________________
> Radiance-general mailing list
> Radiance-general at radiance-online.org
> http://www.radiance-online.org/mailman/listinfo/radiance-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20160701/c3c2e134/attachment-0001.html>


More information about the Radiance-general mailing list