Skip to main content
Tweeted twitter.com/StackMma/status/1150872763017695233
added 125 characters in body
Source Link
M.R.
  • 31.9k
  • 9
  • 103
  • 302

How to ray trace a Graphic3DGraphics3D with UnityLink?

In version 12, you can create a scene in Unity from 3d graphicsGraphics3D objects like this:

<< UnityLink`
project = FileNameJoin[{$UnityLinkResourceDirectory, "ExampleData", 
   "hello-world"}];
UnityOpen[%]
umaterial = CreateUnityMaterial["material", RandomColor[]]
sphere = CreateUnityGameObject["sphere", Graphics3D[Sphere[]]]
SetProperty[sphere, "SharedMaterial" -> umaterial]

enter image description here

Now, I'd like to raytraceray trace the scene - exporting it to ana high quality image?. But I can't see how. Is this not a fundamental feature of modern gaming engines?

How to ray trace a Graphic3D with UnityLink?

In version 12, you can create a scene in Unity from 3d graphics like this:

<< UnityLink`
project = FileNameJoin[{$UnityLinkResourceDirectory, "ExampleData", 
   "hello-world"}];
UnityOpen[%]
umaterial = CreateUnityMaterial["material", RandomColor[]]
sphere = CreateUnityGameObject["sphere", Graphics3D[Sphere[]]]
SetProperty[sphere, "SharedMaterial" -> umaterial]

Now, I'd like to raytrace the scene exporting it to an image? Is this not a fundamental feature of modern gaming engines?

How to ray trace Graphics3D with UnityLink?

In version 12, you can create a scene in Unity from Graphics3D objects like this:

<< UnityLink`
project = FileNameJoin[{$UnityLinkResourceDirectory, "ExampleData", "hello-world"}];
UnityOpen[%]
umaterial = CreateUnityMaterial["material", RandomColor[]]
sphere = CreateUnityGameObject["sphere", Graphics3D[Sphere[]]]
SetProperty[sphere, "SharedMaterial" -> umaterial]

enter image description here

Now, I'd like to ray trace the scene - exporting it to a high quality image. But I can't see how. Is this not a fundamental feature of modern gaming engines?

Source Link
M.R.
  • 31.9k
  • 9
  • 103
  • 302

How to ray trace a Graphic3D with UnityLink?

In version 12, you can create a scene in Unity from 3d graphics like this:

<< UnityLink`
project = FileNameJoin[{$UnityLinkResourceDirectory, "ExampleData", 
   "hello-world"}];
UnityOpen[%]
umaterial = CreateUnityMaterial["material", RandomColor[]]
sphere = CreateUnityGameObject["sphere", Graphics3D[Sphere[]]]
SetProperty[sphere, "SharedMaterial" -> umaterial]

Now, I'd like to raytrace the scene exporting it to an image? Is this not a fundamental feature of modern gaming engines?