Rhino 8 Feature: Native GPU procedural texture support

Hello!

I’ve been working on adding native GPU procedural texture support for Rhino. This means that Rhino’s procedural textures are evaluated on the GPU in real-time, which means they are always crisp, and updating the procedural parameters is much more responsive.

Previously Rhino needed to “bake” most procedurals into textures, which could often be slow and required large amounts of memory, especially if these procedurals were assigned to many individual objects. Baked textures could also sometimes look very pixellated, especially up-close. Native GPU procedural support aims to solve these problems.

Here’s a video showcasing the difference native procedural support can make:

And another video highlighting the improved responsiveness when changing procedural texture parameters:

In order to use the new native procedurals you don’t have to do anything differently - just create procedural textures like you’ve always done! Your old models will also automatically use the new procedurals.

In the currently available WIP, all procedural textures are evaluated on the GPU in Rendered mode, Raytraced mode and when doing production renders using Rhino Render, with the following exceptions:

  • On Windows, native procedural textures are currently only supported on NVIDIA GPUs. If you don’t have an NVIDIA GPU you can still enjoy native procedurals using CPU rendering with Raytraced and Rhino Render.
  • On Mac, certain older devices do not currently support native procedural textures.
  • When using Raytraced and Rhino Render, the following procedurals are currently not supported natively:
    • Dots texture
    • Resample texture
    • Gradient texture when using a custom gradient curve.

Check this link to see available procedural textures in Rhino.

Please test it out and let me know what you think!

17 Likes

This is how a procedural wood texture looks in Keyshot:

And here’s the same object in Rhino rendered viewport with Planar mapping:

And now with Planar (UVW) mapping:

Pretty cool!

Could any of these new procedural textures be used to create a Cutaway material?

2 Likes

Hi @martinsiegrist ,

Yes, it is pretty cool! You can use the procedural textures with a UVW planar map to create 3D procedurals (e.g. cutaway materials). The real advantage in v8 is that they show up crisp right away and there’s no waiting for them to bake in the viewport. This makes it a lot more fun to layer the possibilities.

3D_procedurals.3dm (752.5 KB)

2 Likes

Hi @BrianJ and @DavidEranen,

it’s great to see some work is done in regards to procedurals finally. The crispness is useful for color textures but have you tried to use these procedurals for displacements ? To get usable results, each procedural would need some kind of blur. Would it be possible to add this parameter to each of the procedural textures to get what the Resample texture shader was capable of ?

thanks,
c.

I’m not sure if we’re talking about the same?

In Keyshot I’m using a cutaway material to visualize holes in textured climbing wall panels.

The holes only exist as cylindrical objects. I’m using a block to keep model size as small as possible. The panel does not have any holes in Rhino.

Would something like this be possible in Rhino too?

Yes, that is something different. I don’t know what that would entail development wise to do in Rhino but it likely wouldn’t happen for 8. It looks like it uses an alpha image and then something else defining the mesh perpendicular to the visual holes. Maybe a separate post would be best so the idea doesn’t get lost within this thread. The closest approach possible now in Rhino would be by using PBR or object displacement but it would require a very dense render mesh.

I’d prefer the displacement property to have a blur option built in regardless of the texture map used.

Thanks Brian there’s already a request for a cutaway material in a post from 2020

https://mcneel.myjetbrains.com/youtrack/issue/RH-3952

Hi @BrianJ, yes the displacement modifier would benefit from it too. But i guess nobody is using this since it is somewhat slow even when you use the lowest setting and Refinement=0. It also does not weld properly…

The physical material’s normal displacement could benefit from a blur setting as well, but this is also unusable as it is impossible to control the displacement direction (it always displaces in both directions)…

Bottom line, we’re stuck with using images for displacement, blur them with photoshop and create the meshes ourself to displace them using custom code.

btw. are the gpu procedurals bakeable ?

_
c.

Okay thanks, that is on @stevebaer 's list for the future, he’d need to comment on the priority given other projects but it’s pretty old already.

1 Like

The color picker now has an Opacity value so you can make the white in say a dot texture completely transparent. That value will then not displace the objects render mesh.

I use object displacement myself but never set the refinement to 0, either the default on .5 or 1. You can alternately adjust it in other ways. I’d need to see the example showing the welding issues to help there.

Can you make a separate post for questions about displacement please? I may be able to help with some of the issues you mentioned but I don’t think they are connected to procedural textures not needing to get baked in v8.

What is the process if we want to modify or create a new procedural texture and add it to rhino? I found Shaderconverter.cs which describe the Procedural class and I found some idea to improve the Wood procedural adding some grain parametrically, and would like to test some Z noise to create modulation in the height of the wood, Is thee-re a simple way to create a new class and test it?

Thanks for your help