A little play with Copernicus.

   645   8   0
User Avatar
Member
42 posts
Joined: 3月 2025
オフライン
If you're not yet a Copernicus fan, we're coming to you. Isn't it time to say goodbye to AE? Well, let's test it out, replicate the good old AE effect from Сopilot in Copernicus, and compare the build complexity.



Pros: OpenCL is truly fast and convenient. The node system is traditionally convenient. Great curves and math. The first half of the build is pure pleasure. Here we give upvotes and hearts.

Cons: No timeshift, which is very bad; it's essential for clipping and shifting animations. A switch node is an analogue for layer clipping, but shifting the animation start or disabling animations is a dead end. Changing everything globally immediately puts us in the red and misses timeshift. Blocks and invoke are very useful, but how do we pass parameter values? We can easily pass millions of pixels, but passing a couple of numbers is a very non-trivial task. KKnowing OpenCL, Python, VEX, and HScript to be able to pass the number "5" as a parameter is a fundamental flaw. There's no motion blur, and creating a streak blur isn't possible either.
The "lamp" needs to be redesigned; I made several variations to simulate metal and good highlights. The glow is very bad; I also had to test several variations using blur and resizing, vacillating between speed and quality.
The equalizer is very slow for animation; I had to figure out OpenCL and do a two-step pass to calculate the min and max values, which resulted in an almost 10x increase over the native node and made it suitable for animation. It's a long process, but these are things we can fix.
The fundamental problem was where I least expected it to be.
Ratserize is very slow, but that's half the problem. There's already a solution, and we're just waiting for the next version. For now, let's save it to a file and read it. The cache in PIC format is only 80 MB, 1 frame is 600 KB. It's negligible. BUT the file node immediately dropped the FPS to 12-14 for PIC and 7-8 for EXR. SSDs deliver from 500 MB/sec to 3 GB/sec, dozens of processor cores, tens of gigabytes of memory, and tens of thousands of GPU cores. How can you read a file at 5-7 MB/sec? What's going on here? I honestly don't understand. We cache all output from "files," but the cache works very strangely. Sometimes it works, sometimes it doesn't. The performance monitor shows that the file node is eating up more than half the time, even though it's covered in caches like a Christmas tree with toys. But sometimes the caches don't work. The FPS fluctuates between 20 and 2. Although a couple of times I got the expected 60 FPS. No explanation. But with 5-6 caches for tiny footage from 8 MB to 80 MB with all frames, it was possible to get 1 frame every 3 seconds and consume all 16 GB of video memory. And clearing the entire cache, like in AE, doesn't seem to be possible. Basically, the File node is currently a solid tombstone for the idea of ​​comfortably composing footage. What's the point of optimizing anything if the very first "file" sends the FPS to the bottom? And this second half has ruined all the fun, speed, and convenience of the first half. Alas, we can't say goodbye to AE just yet, but we eagerly await the next version of Copernicus. If they optimize loading and caching, it will be a blast.
Image Not Found
Edited by Gaalvk - 2026年2月27日 03:03:47

Attachments:
copilot.jpg (568.2 KB)
copilot_srgb.mp4 (14.9 MB)

User Avatar
Member
396 posts
Joined: 8月 2018
オフライン
I think it would be well worth sending the file and your write up to Sidefx via the report a bug / RFE page:
https://www.sidefx.com/bugs/submit/ [www.sidefx.com]
That's the best way to make sure they see this.
Edited by Mike_A - 2026年2月27日 09:14:47
User Avatar
スタッフ
6862 posts
Joined: 7月 2005
オフライン
It is sad when a play suddenly turns into a tragedy....

But it is important to hear this stuff, so thank you very much for both pushing Copernicus and reporting where things broke down.

If you can, please do submit the offending .hip so we can better understand how things failed. Because while I've seen this, I can only hope that our planned solutions to those pain points will work... I don't want to find out we fixed the wrong problem.

Please include a link to this thread as well.
User Avatar
Member
42 posts
Joined: 3月 2025
オフライン
Let's continue playing with Copernicus. Refraction and reflection. We'll tweak a bunch of parameters and simulate water ripples. It's amazing how easy it is to set the desired parameters, and look at the responsiveness on a 2k x 2k texture – 20-30 fps. No caches or sequence loading. OpenCl is, of course, great, replacing dozens of nodes with a single snippet, making the algorithm clearer and faster. Interestingly, several blends with different operations running one after another suddenly cumulatively slowed down, but replacing these blends with a single snippet doubled the speed, so OpenCl really helps with animation responsiveness. Honestly, I'm incredibly happy with Copernicus and am grateful to sidefx for such convenience and speed. Copernicus is simply begging to be filled with different effects, and collecting them is easy.
Yes, I hope that refraction and reflection will be ready-made functions in OpenCl, like in VEX. It's not that difficult to assemble on my own, but I constantly confuse the vector's direction toward and away from the surface and make mistakes. It would be better to have such functions centralized, without the need for individual creativity.

Image Not Found
Edited by Gaalvk - 2026年3月5日 11:20:44

Attachments:
Screenshot 2026-03-05 183141.jpg (1.1 MB)
waves.mp4 (6.3 MB)

User Avatar
Member
42 posts
Joined: 3月 2025
オフライン
Need radial blur? Make it yourself with blackjacks, masks, and weights. OpenCL is amazing.

Attachments:
radial_blur.jpg (78.2 KB)

User Avatar
Member
42 posts
Joined: 3月 2025
オフライン
I discovered an interesting nuance in OpenCL. OpenCL requires constant specification of number types. Good. And type mismatches lead not only to compilation errors but also to OpenCL crashes. This needs to be monitored closely. In one code fragment, I had a seemingly innocuous line like int2 x = (int2) (0,0); But I accidentally made a very subtle typo: I used a period instead of a comma: int2 x = (int2) (0.0); This didn't cause any errors and worked fine, but after a while, OpenCL printed a bunch of read and write errors to the console on every node except the constant. It looked incredibly strange. The only thing that helped was restarting Houdini. And only for a while. It took me a long time to narrow down the suspects until I found this typo. And the fix fixed all the problems. So, guys, be very careful with data types.

And a message to the developers: it would be nice to solve this problem at compile time - not to skip lines like (int2) (0.0), where a floating point number is in the argument of the int2 function, because most likely this is a typo and will cause problems later.
Edited by Gaalvk - 昨日 09:15:42
User Avatar
スタッフ
6862 posts
Joined: 7月 2005
オフライン
Gaalvk
And a message to the developers: it would be nice to solve this problem at compile time - not to skip lines like (int2) (0.0), where a floating point number is in the argument of the int2 function, because most likely this is a typo and will cause problems later.

That is very worrying!

That should be legal, AFAIK, as 0.0 can coerce to 0...

Checking the opencl reference spec https://registry.khronos.org/OpenCL/specs/opencl-2.0-openclc.pdf [registry.khronos.org] page 13:
Operands are evaluated by standard rules for function evaluation, except that implicit scalar
widening shall not occur.

I believe from page 19 that the widening refers to scalar -> vector conversion, not float -> double. So it would seem this is entirely valid OpenCL code by the spec; but that doesn't stop a particular compiler from dying on it :<

Unfortunately, there is nothing we can do directly about this as the actual compilation is done by the driver.

Can you please submit a bug with a .hip file with this, along with your About Houdini so we can test against a similar OpenCL Driver?

Note that out of bound memory reads & writes can cause delayed errors that show up on other nodes. Those are usually the source of the "need to restart houdini".
User Avatar
Member
42 posts
Joined: 3月 2025
オフライン
Since I fixed everything, I haven't encountered this error again. I'll try to reproduce it again; I need to come up with some kind of test, because it didn't cause any errors right away, only after some time.
User Avatar
スタッフ
6862 posts
Joined: 7月 2005
オフライン
Gaalvk
Since I fixed everything, I haven't encountered this error again. I'll try to reproduce it again; I need to come up with some kind of test, because it didn't cause any errors right away, only after some time.

Okay, thank you for keeping an eye out for this. It is possible that an accidental out of bounds had put things in a bad state that only showed up later.... But I'm not discounting this as the cause either.
  • Quick Links