#Moonshine - a general purpose GPU ray traced renderer

1 messages Β· Page 1 of 1 (latest)

cursive socket
#

I've been working on this on and off for two years now and I finally got it into a presentable state, so I figured I'd make it public.

https://github.com/ashpil/moonshine

It's a general purpose (meaning I'm hoping to eventually support both interactive stuff like games and headless rendering) ray tracer. Currently it can render most real-world scenes somewhat well, supporting mesh lights, environment lights, and a couple different materials, all sampled with multiple importance sampling.

Now that the basics are done I think I will spend some time on making it a bit more interactive, as although one can currently render into a window one can't really do anything there other than manipulate camera settings. Also I need to write a custom scene file format, as glTF puts a limit on how interesting scenes can be.

GitHub

A physically based ray tracing render engine built with Vulkan + Zig - GitHub - ashpil/moonshine: A physically based ray tracing render engine built with Vulkan + Zig

#

Moonshine - a general purpose GPU ray traced renderer

glad mist
#

Some light reading

I see what you did there 😁

cursive socket
#

As light as it gets, unfortunately

pulsar belfry
#

This is excellent, thanks a ton for sharing!

cursive socket
#

No eyes but mine have looked at this yet, so if people have comments on code style/algorithms/anything I'd be very happy to hear them (though I'm there are parts of it that I wrote ages ago and now don't remember or agree with).

patent star
#

This is great!

#

VK KHR raytracing right?

cursive socket
livid star
#

Super cool! Awesome to see someone doing fancy graphics stuff with Zig :)

cursive socket
cursive socket
#

also, finally updated this to latest zig after months of inactivity, trying to get back into the swing of things

#

hoping to experiment with two major things in the near future:

  • adding the ability to use moonshine as a hydra delegate
  • start using restir
abstract nova
#

Sorry for asking but I don't know how I can run this code
zig build is working but exe file doesn't exists..
How can I test this code?

cursive socket
#

You can do zig build run-offline -- <scene> <skybox> <output file> or zig build run-online -- <scene> <skybox>

#

You have to have a raytracing supporting GPU

abstract nova
#

I'm using RTX 3080Ti laptop GPU and got this error..
`(base) PS E:\Zig\Projects\moonshine> zig build run-online -- DamagedHelmet.glb OutdoorHDRI024_4K-HDR.exr
shaders: error: In file included from E:\Zig\Projects\moonshine\shaders/hrtsystem/main.hlsl:1:
In file included from E:\Zig\Projects\moonshine\shaders/hrtsystem/bindings.hlsl:93:
In file included from E:\Zig\Projects\moonshine\shaders/hrtsystem/camera.hlsl:3:
In file included from E:\Zig\Projects\moonshine\shaders/hrtsystem/../utils/random.hlsl:3:
E:\Zig\Projects\moonshine\shaders/hrtsystem/../utils/math.hlsl:52:37: error: select intrinsic function unimplemented
float3 p_i = asfloat(asint(p) + select(p < 0.f, -of_i, of_i));
^
E:\Zig\Projects\moonshine\shaders/hrtsystem/../utils/math.hlsl:54:12: error: select intrinsic function unimplemented
return select(abs(p) < origin, p + n * float_scale, p_i);
^

shaders: error: the following command exited with error code 5:
dxc -HV 2021 -spirv -fspv-target-env=vulkan1.3 -fvk-use-scalar-layout -Ges -WX -T lib_6_7 E:\Zig\Projects\moonshine\shaders/hrtsystem/main.hlsl -Fo E:\Zig\Projects\moonshine\zig-cache\shaders\utcxCQTxNwPtZsrHS45_IuZmtOnP-Zp4wLOREC0hWIuxVBbwjTubYqlsRibw2EX8
Build Summary: 6/11 steps succeeded; 1 failed (disable with --summary none)
run-online transitive failure
└─ run online transitive failure
β”œβ”€ zig build-exe online Debug native transitive failure
β”‚ └─ shaders failure
└─ install online transitive failure
└─ zig build-exe online Debug native (+8 more reused dependencies)
error: the following build command failed with exit code 1:
E:\Zig\Projects\moonshine\zig-cache\o\bea46d100ec192d3230a21c222662fe3\build.exe C:\Zig\Zig-Compiler\zig.exe E:\Zig\Projects\moonshine E:\Zig\Projects\moonshine\zig-cache C:\Users\Jungmin-WOPC\AppData\Local\zig run-online -- DamagedHelmet.glb OutdoorHDRI024_4K-HDR.exr`

#

fyi, if there are files with different letter cases, windows still consider these are the same files.

cursive socket
cursive socket
#

also i haven't tested the windows version recently, you might have to jump through some more hoops in order to get it to build

#

but theoretically it should work

cursive socket
#

these two files probably shouldn't be called the same thing anyway, i'll update

cursive socket
#

done

quiet lynx
#

fancy seeing you here @cursive socket

#

say hi to the other A for me pls :)

cursive socket
#

hey I’ve been here for a while

quiet lynx
#

yep yep, just completely forgot and found it cool to discover your project post :3

cursive socket
#

Been a while since I posted an update here. I've been working on making Moonshine a Hydra render delegate. This means I can hook it up to Blender or Houdini and use it as the preview renderer in place of their default.

#

Here's Moonshine rendering a scene in Blender.

#

I like what Hydra lets me do but as an API it's a little annoying -- it's all C++.

glacial urchin
#

Looks really nice!

cursive socket
#

Improved the importance sampling a bit