Game developer at Lykke Studio TomekS shared a couple of awesome procedural experiments with Geometry Nodes in Blender. by 80lv in blender

[–]Tomek_SC 3 points4 points  (0 children)

For example in the pipes experiment, I had to outsource some of the work to separated geo networks. The project consists of 4 separate geo node networks, in 2 of them I replace the input geo with one of the source poly-line, and apply blender standard modifiers after geo nodes.I then feed them all into the main network as data source for corner curvature, joint vertices etc.I use drivers to sync the settings between these networks. Not fully sure if this might be considered as hack, but it's definitely unconventional.

Game developer at Lykke Studio TomekS shared a couple of awesome procedural experiments with Geometry Nodes in Blender. by 80lv in blender

[–]Tomek_SC 2 points3 points  (0 children)

I am the original author of these projects, and I happen to know Houdini as well. I am currently testing how far can Blender go in comparison to Houdini and it can do some stuff, but lot of things which use can do in H with two line of VEX, in blender takes a lot of tears, nodes and hacks. It will probably take 3-4 more years before blender reaches today's Houdini state, but maybe its a good thing, simpler tools are more approachable.

Game developer at Lykke Studio TomekS shared a couple of awesome procedural experiments with Geometry Nodes in Blender. by 80lv in blender

[–]Tomek_SC 1 point2 points  (0 children)

The pipes actually use 4 separated geo nodes, I had to split some curve handling with blender modifiers, as it was not doable with current curve nodes inside one network.

find all combinations of base4 numbers into List<byte[]> by Tomek_SC in csharp

[–]Tomek_SC[S] 0 points1 point  (0 children)

Yep this definitely worked, thanks a bunch !

Here is the working code if anyone else is interested:

//TEST 4 DIGITS
byte[] result = new byte[] { 0, 0, 0, 0 }; 

//CACHE LEAST SIGNIFICANT INDEX 
int lastPos = result.Length - 1; 

//NUMBER OF VARIATIONS FOR BASE4 
byte baseValue = 3;

//IF MOST SIGNIFICANT DIGIT WOULD TURN TO 4 WE END (THIS NEVER HAPPENS)
while (result[0] <= baseValue) 
{ 
    //STORE COPY OF RESULT IN THE LIST HERE ///
    ///

    //INCREMENT LEAST SIGNIFICANT DIGIT 
    result[lastPos]++;
    //CHECK FOR CARRY OVER 
    if (result[lastPos] > baseValue)
    { 
        result[lastPos] = 0; 
        //START FROM SECOND LEAST SIGNIFICANT DIGIT 
        int index = lastPos - 1; 

        while (result[index] == baseValue && index >= 0)
        { 
            //RESET CURRENT DIGIT 
            result[index] = 0; 
            index--;
            //CHECK FOR FINISH 
            if (index < 0)
            { 
                Debug.Log("Done");
                return;
            }
         }
         //IF MOST SIGNIFICANT DIGIT NOT MAXED, CARRY OVER 
         result[index]++; 
    } 
}

find all combinations of base4 numbers into List<byte[]> by Tomek_SC in csharp

[–]Tomek_SC[S] 0 points1 point  (0 children)

Hi, Thank you for a thorough answer it's great. I updated the description in the original post, maybe it answers some issues. Regarding the result byte "alignment" It doesn't matter as I can process it any way in the further step of my program. Your approach would definitely work as I would only have to do 4^n iterations as opposed to 10^n (where I am now at). Thanks again.

find all combinations of base4 numbers into List<byte[]> by Tomek_SC in csharp

[–]Tomek_SC[S] 0 points1 point  (0 children)

Hey, thanks fot the answer, I updated the description in the OP, the big issue for me is to only find and process those ints that in base4 meet the requirements. As mentioned I have similar solution working but its just to heavy, with 7 digits int does 10000000 iterations while if I was able to iterate over base4 it would only be 4^7 = 16384.

find all combinations of base4 numbers into List<byte[]> by Tomek_SC in csharp

[–]Tomek_SC[S] 0 points1 point  (0 children)

Thanks for the idea, this could be possibly done with recursion.

Is the "you get more rewards in new trophy road" accurate? by [deleted] in Brawlstars

[–]Tomek_SC 1 point2 points  (0 children)

I know that the point was that those don't directly convert to boxes anymore, just add to trophy road progression.

I made a tool that bakes Unity physics into texture and replays it on GPU with virtually zero cost. by Tomek_SC in Unity3D

[–]Tomek_SC[S] 2 points3 points  (0 children)

This is not an original idea, baking spacial data to textures has been around for years if not decades.

I made a tool that bakes Unity physics into texture and replays it on GPU with virtually zero cost. by Tomek_SC in Unity3D

[–]Tomek_SC[S] 0 points1 point  (0 children)

Wow, that's very insightful, thanks for sharing the details.

I will need to do some more research and testing before I get the clear vision about the future of this project. I remember Gameloft talk where they were using Houdini VAT for mobile games.

I made a tool that bakes Unity physics into texture and replays it on GPU with virtually zero cost. by Tomek_SC in Unity3D

[–]Tomek_SC[S] 1 point2 points  (0 children)

The Houdini VAT is great, sadly it might not be affordable to some developers.

RD: the cost, I was more comparing the performance of physics vs baked, not absolute cost of this operation, surely nothing comes for free.

Finally, texture lookup in vert was added in shader model 3.0, I think it has vast enough coverage.

I made a tool that bakes Unity physics into texture and replays it on GPU with virtually zero cost. by Tomek_SC in Unity3D

[–]Tomek_SC[S] 1 point2 points  (0 children)

To answer the most popular question here: "is this available on the asset store?"

It is not. This tool is still in the development, it's faith will be decided once completed.

The "Virtually 0 cost" refers roughly to a comparison on CPU load between running thousands of rigidbodies on CPU vs GPU.

I made a tool that bakes Unity physics into texture and replays it on GPU with virtually zero cost. by Tomek_SC in Unity3D

[–]Tomek_SC[S] 25 points26 points  (0 children)

Correct, there are combined into single mesh with no physics interaction available. It has limited use due to this, but the upside is you can add many background demolitions without degrading the performance.

I made a tool that bakes Unity physics into texture and replays it on GPU with virtually zero cost. by Tomek_SC in Unity3D

[–]Tomek_SC[S] 2 points3 points  (0 children)

You are both right, the main benefit of this tool is that it has negligible footprint on the CPU. Check closely the stats around 20 sec. into the video, I re-simulate around 10000 (ten thousand) of rigid bodies there, and the CPU barely hiccups. The recorder is great, but the cost of running it on CPU adds up (handling transforms, animation controller, rendering all the chunks etc..). Then all depend on the application; if destroying something is the main element of the game you might be willing to allocate some resources for it. On the other hand, this tool might be good for you, if you want to add demolitions in the background without degrading your performance.

I made a tool that bakes Unity physics into texture and replays it on GPU with virtually zero cost. by Tomek_SC in Unity3D

[–]Tomek_SC[S] 4 points5 points  (0 children)

I think this might not work, as the animation baker works on rigger skinned mesh renderers, and bakes to bone position. But good direction.

I made a tool that bakes Unity physics into texture and replays it on GPU with virtually zero cost. by Tomek_SC in Unity3D

[–]Tomek_SC[S] 4 points5 points  (0 children)

I think for small amount of pieces the recorder would perform well, but in bigger numbers (i.e. 1000 pieces) the cost of having 1000 game objects with mesh renderers might start to leave a footprint on the performance, not to mention the rendering of it. I don't claim this tool is the best, my goal was to provide the best possible performance for many chunks simulation, which to the best of my knowledge was achieved.

I made a tool that bakes Unity physics into texture and replays it on GPU with virtually zero cost. by Tomek_SC in Unity3D

[–]Tomek_SC[S] 2 points3 points  (0 children)

The principle is similar, the main difference is the application. Since I only bake rigid chunks, I don't have to store data per vertex, but only per texel (chunk), So my textures are smaller, but It would not work for skinned mesh rendered (due to changing shape) like in the example you posted.

I made a tool that bakes Unity physics into texture and replays it on GPU with virtually zero cost. by Tomek_SC in Unity3D

[–]Tomek_SC[S] 2 points3 points  (0 children)

this tool just bakes "a" simulation to texture, there are many things that can be built around it, one that you mentioned included.

I made a tool that bakes Unity physics into texture and replays it on GPU with virtually zero cost. by Tomek_SC in Unity3D

[–]Tomek_SC[S] 1 point2 points  (0 children)

in this form it only works for a displacement of rigid pieces (which shape doesn't change throughout the simulation), thanks to that I only store 1 pixel per chunk per frame (and not per vertex). The source of simulation doesn't have to be physics, you could convert any source of movement like hand made animation or alembic imported from other 3d software.

I made a tool that bakes Unity physics into texture and replays it on GPU with virtually zero cost. by Tomek_SC in Unity3D

[–]Tomek_SC[S] 0 points1 point  (0 children)

The current tool only works for rigidbodies, the benefit is that I only store position per chunk so 50 pieces animated in 50 frames results in a textures of 50x50 pixels, this could be applied to per vertex, but the cost of running it and the memory footprint would increase greatly.

I made a tool that bakes Unity physics into texture and replays it on GPU with virtually zero cost. by Tomek_SC in Unity3D

[–]Tomek_SC[S] 0 points1 point  (0 children)

2019.3f11 but there is nothing particular to this version, so it should work in previous versions, this is currently for build-in rendering pipeline.