diva for gh+acceleradRT workflow

51 views
Skip to first unread message

luoza...@gmail.com

unread,
Jun 5, 2020, 3:22:37 AM6/5/20
to Accelerad Users
Hi Nathaniel, 

Thanks for developing such a dope tool that saves a lot of time. I just begin using this tool so I want creat a workflow in diva for GH connecting to the AcceleradRT for progressive rendering to get DGP value. What I expect is the view could sychronize with the camera in diva I set in advance, but I've tried many times and failed, the octree file seems only include geometry info. So could you give me a hint about how to achieve that?

Many thanks and have a good one.

Best,
Zhaoyang

Nathaniel Jones

unread,
Jun 5, 2020, 8:54:42 AM6/5/20
to Accelerad Users
Hi Zhaoyang,

DIVA for Grasshopper includes an Octree component for this purpose. The Octree that it builds will contain both the Rhino geometry and the sky defined with DIVA for Grasshopper's Sky component. The Octree component should update the geometry and sky in the octree as you make changes to them, which will be reflected live in AcceleradRT.

The camera coordinates can be transferred to AcceleradRT when you start it up. This can be done in Grasshopper C# is as follows:

RhinoViewport vp = Rhino.RhinoDoc.ActiveDoc.Views.ActiveView.ActiveViewport;
Vector3d direction = vp.CameraDirection;
Point3d location = vp.CameraLocation;

string args = string.Format("-vta -vh 180 -vv 180 -vp {0} {1} {2} -vd {3} {4} {5} -vu 0 0 1 -ab 3 -aa 0 -ad 1 -as 0 -lr 4 -lw .002 -x 512 -y 512 -s 10000 -log 3 -m 0.1 scene.oct",
      location.X, location.Y, location.Z, direction.X, direction.Y, direction.Z);

ProcessStartInfo processInfo = new ProcessStartInfo("AcceleradRT", args);
processInfo.CreateNoWindow = true;
processInfo.UseShellExecute = false;
Process process = Process.Start(processInfo);

There is already a Grasshopper file that does all of this for you. I can send it to you by private message.

Nathaniel
Reply all
Reply to author
Forward
Message has been deleted
0 new messages