Surfacing... just a nightmare

Oh I’ll let @stevebaer reject it out of hand for me. I don’t even know if it’s possible in a shader language to create a functionally equivalent mesher. You’d have to basically convert a huge chunk of Rhino core code from C++ into GLSL. That’s a very different thing than switching to a different OS but still using (roughly) the same language.

What might be possible is creating a much, much simpler meshing algorithm. However since I won’t be the one doing that I really don’t want to be the one saying it can or can’t be done.

OK. Understandable. It’ll be interesting to hear what Steve has to say, should he choose to respond.

The only reason to have computation code run on the GPU is to take advantage of the large number of processors available. These processors aren’t faster than the CPU, there just happen to be a lot of them.

Moving code to work on a GPU isn’t the issue, it’s about rewriting code with entirely different concepts to take advantage of multiple processors when it makes sense to improve performance.

1 Like

Yes! old and new running in parallel together. One (red mesh in shader language {meshlets mesh shader??}) in real-time with low precision for visualization only, other (Grashopper → C++) for double-checking and baking
To resume, I know about shaders but not how to use the tensor core side other than configure and use it for training them. There is also some lag between pasing info from the CPU and the GPU. GPU is slow but now or soon you got the pointer directly connected by passing the CPU. For few points can work well (I presume). In game dev we make mashes on the fly in GPU.

Having 9 surfaces connected together as shown in the screenshot above sharing a total of 49 points. At the moment there is too much (Rhino-Grasshopper) code around, and take time to update just that simple mesh.
Putting aside on the complex part of logic on how to maintain them in tangent when moving one point.
I think that several orders of magnitude improvement can be achieved. Moving 1 point and updating must take a few ms and not seconds. I agree is not for Grasshopper 2.
A Concept Scripting can be handy to sniff if possible and learn.
A 9 point input Shader that calculates inside Nurbs equation surface and build the red mesh. Just to test.
I know I can do that in Unity and ship compatible with different OS and I try that before

That is the reason I also ask shifting to Unity somehow. Now that Unity and Rhino can talk(via scripting). A concept is possible.

I misunderstood what you were asking. Yes it is possible to color pixels on the screen with raw polysurface data and GPU shaders. I would say possible, but also very hard to implement (and make work on the majority of graphics cards out there).

I’m sure there are a number of research projects that attempt to draw shaded polysurfaces entirely through GPU shaders. I know some applications use tessellation shaders to draw SubDs which is a significantly simpler thing to do. We use tessellation shaders to draw curves and have found them to work great for 90% of our Windows users (they don’t work well on Mac). Just drawing curves in a shader is complicated and required a lot of time to handle weird driver issues. Handling trims on a polysurface would be so much more complicated. We don’t have plans to do this, but if someone else implemented this in a plug-in I would love to see it work and would consider figuring out a way to integrate it with core Rhino.

1 Like

I don’t believe that video is what I was trying to explain.

2 Likes

3 posts were split to a new topic: GPU Calculation Support

This x 100.

Too many today open their laptop without actually understanding the formal aesthetics of what they are designing, and then developing a suitable patch layout. Deceptively simple looking things like high end faucets or gardening tools, for example, can be very demanding, but once the designer has figured out the patch layout - even sort of crude physical mock-ups allow you to literally draw patch layout ideas on - incredibly helpful; or the ability to do good old 3D sketches on paper.

3 Likes

And starting with tessellation in GLSL?

Not sure if this one is relevant today but it helped me understand alot about surfaces i got the Pdf and the physical copy for free after helping the author out with some tasks like corrections on the book and modelling some parts for the 2014 audi r8 you can even see some renders I made if you scroll down

Its a more complete package step by step but its no walk in the park, cars just take hours to make even for the professionals and just double that time for interiors if you do 5 to 10 pages a day thats fine the idea is to learn and not overwhelm yourself.

If you only focus on automotive modelling then you will find it easier and faster to make the next because you will implement what you have learned.

And remember if you feel stuck and burnt out just save, step away and let the brain relax the solution will reveal itself once you have a more calm and collected mind

2 Likes

100 % - and I would like to add that this approach is also very efficient, when you focus in the meantime on other tasks. The solutions come funnily sometimes from unexpected places or situations. :grinning:

2 Likes

And most of the time it’s the easiest of solutions :laughing:

RH-58682 is fixed in Rhino WIP

1 Like