1
$\begingroup$

I want to create a custom perlin noise node (NOT a node group, an actual scripted one), and be able to run it on GPU. Is this possible? OSL does not seem to be 100% supported on GPU, so is it still possible? The idea is essentially to create a node similar to the Noise Texture or Musgrave Texture. Could I do this without OSL, or somehow compile it so it is available on GPU? I think all the standard nodes are in OSL, so what makes them work on GPU?

$\endgroup$
1
$\begingroup$

As far as I am aware there is still no support for OSL on GPU - if you enable the Open Shader Language checkbox then you are limited to CPU.

Perhaps if you can describe what you want to achieve with your custom noise node then someone might be able to offer a suggestion that would not require OSL.

$\endgroup$
  • $\begingroup$ The idea is essentially to create a node similar to the Noise Texture or Musgrave Texture. Could I do this without OSL, or somehow compile it so it is available on GPU? I think all the standard nodes are in OSL, so what makes them work on GPU? $\endgroup$ – Rix Yarbrough Jan 30 '19 at 23:28
  • $\begingroup$ @RixYarbrough My understanding is that the 'standard' nodes are actually coded twice by the developers - once for the node and again for the GPU. To be able to convert arbitrary OSL code run on GPU is too complicated at present. The Noise and Musgrave textures are actually generated mathematically so in principle they should be able to be replicated using standard nodes - or you can also include the existing textures to produce more useful output. For example, you can extend Noise into a 5-dimensional musgrave with separate seed as described in blender.stackexchange.com/a/119604/29586 $\endgroup$ – Rich Sedman Jan 31 '19 at 0:09
  • $\begingroup$ My original plan was to create these algorithms in the node editor alone but ran into some problems with it that seemed like it would be better to just script it instead. Anyways, hopefully OSL support for GPU will be in the near future. Thanks for the help. $\endgroup$ – Rix Yarbrough Jan 31 '19 at 0:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.