Collision free instance painting

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Collision free instance painting

Postby Bird » Wed Jan 19, 2022 4:39 pm

if you are going for broke, one thing that may help is setting to the max number of threads,
I usually only use thread equal the cores count, but the engine allows up to 16 threads.


I got Newton to work with up to 8 million particles with 16 thread, but after that it starts to crash. Pretty amazing. :)
Last edited by Bird on Wed Jan 19, 2022 4:53 pm, edited 2 times in total.
Bird
 
Posts: 636
Joined: Tue Nov 22, 2011 1:27 am

Re: Collision free instance painting

Postby Julio Jerez » Wed Jan 19, 2022 4:43 pm

You are now been ridiculous at 8 million :shock:
How much memory, it most be on the ten of gigabyte, it might be faling in malloc.

We can keep it at 4 million, I think.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Collision free instance painting

Postby Bird » Wed Jan 19, 2022 4:53 pm

I just downloaded the latest github and the particles are not rendering in the ndSandbox on my machine.

NVIDIA Geforce RTX 2070 SUPER with 8GB
Bird
 
Posts: 636
Joined: Tue Nov 22, 2011 1:27 am

Re: Collision free instance painting

Postby Julio Jerez » Wed Jan 19, 2022 4:54 pm

Oh Bird I know why is crash at 8 million.

The code has a define that implement two kind of hash
Small 64 bit
Large 128 bit.

The small hash used 24 bits for particle index, that's 2^24 = 16 million.
But it is an integer, so as soon as pass 8 million, start to get negative particle indices.

I never thought in my wildest dream, someone was going to try pass 1 million particles, but here we are.

Larger we can place that define in the cmake fir people like yourself how do that kind of stuff, for now let us keep it at 24 bits indices.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Collision free instance painting

Postby Julio Jerez » Wed Jan 19, 2022 5:02 pm

Bird wrote:I just downloaded the latest github and the particles are not rendering in the ndSandbox on my machine.

NVIDIA Geforce RTX 2070 SUPER with 8GB

I think is this //layout (depth_less) out float gl_FragDepth;

I just removed, that was a while guess. somewhere the say that this is support to be supported by all GL 4.20, but my GPU does no support shader features for that spec, so I limited to 330.
in any case that was a wild guess that I seriously doubt was going to do anything, but was a single line, I just removed. we do no need that level of complication at this time.

please try again.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Collision free instance painting

Postby Bird » Wed Jan 19, 2022 5:04 pm

Oh Bird I know why is crash at 8 million.


8 million works fine but when I started going further Newton started to crash I did try 1 billion but I think we'll have to wait a few more years for that to work. :mrgreen:
Bird
 
Posts: 636
Joined: Tue Nov 22, 2011 1:27 am

Re: Collision free instance painting

Postby Bird » Wed Jan 19, 2022 5:15 pm

Code: Select all
I think is this //layout (depth_less) out float gl_FragDepth;

I just removed, that was a while guess. somewhere the say that this is support to be supported by all GL 4.20, but my GPU does no support shader features for that spec, so I limited to 330.
in any case that was a wild guess that I seriously doubt was going to do anything, but was a single line, I just removed. we do no need that level of complication at this time.

please try again.


Yes, that fixed it!
Bird
 
Posts: 636
Joined: Tue Nov 22, 2011 1:27 am

Re: Collision free instance painting

Postby Julio Jerez » Wed Jan 19, 2022 5:15 pm

Bird wrote: I did try 1 billion but I think we'll have to wait a few more years for that to work. :mrgreen:

maybe for offline rendering.

if we get a very realistic solve, then some very movie quality demos rendering can be made.
very, very small particles, and iso surface, and some cool localized liquid and gaseous demos can be achieve, I think

the problem is that 1 million particle sound like a lot and people think they can make oceans,
them they start to see ship in water with wave that are about the same side of the ship or river of water flowing where the particles of water are the size of big watermelons. not sence of real scale whatsoever.
For this to look good, what have to set so that at least 3 or 4 particles define a real life drop of water.
them it is a whole new level of realism for localize effects.
water out of a facet, glass of water, splashes, bathtub, rain, water on wind shields, and things like that.

imagine a kitchen where all liquid and gaseous ingredient are realistically simulated. :shock: :o 8) :D :wink: :shock:
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Collision free instance painting

Postby Bird » Wed Jan 19, 2022 5:19 pm

if we get a very realistic solve, they some very movie quality demos rendering can be made.
very, very small particles, and iso surface, and some cool localize fluid demos can be achieve, I think


There is some truly amazingly stuff being done and this was from 4 years ago
https://www.youtube.com/watch?v=nnv-95w ... l=RealFlow
Bird
 
Posts: 636
Joined: Tue Nov 22, 2011 1:27 am

Re: Collision free instance painting

Postby Julio Jerez » Wed Jan 19, 2022 5:36 pm

I assumed that being produced with render farms of few dozen of cpus, if not hundreds.

That what I said before, the reality of the simulation start to show as the few particle represent a unit of fluid.

But these real time solution make the particle sizes hundred if not thousand of time the size of a fluid unit.

If we settle for small localized effect I think we can archive that level of quality, at reasonably simulation rate.

The physic is the same. It is just the implementation that makes the difference.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Collision free instance painting

Postby Bird » Wed Jan 19, 2022 10:44 pm

Okay, here's the GPU based Flex with 1.3 million particles. I'm pretty amazed how well it looks without any meshing going on. Those are just tightly packed spheres.

With the performance you have already on the cpu, I'm sure you'll be able to do as well when you get to OpenCL

https://youtu.be/e_aNY9dkZNI
Bird
 
Posts: 636
Joined: Tue Nov 22, 2011 1:27 am

Re: Collision free instance painting

Postby Julio Jerez » Wed Jan 19, 2022 11:07 pm

is that 1.3 million or 3 millions? the video says 3 million.

also is that running Cuda GPU or CPU?

edit,
Oh I see you say is GPU.

I am no sure, but as it stands now, is this is GPU we are in the ballpark or very close, but we are I CPU.
of course they are doing way of a lot more, but I think we will get there.

they had perfected the particle rendering, a lot, I think that the method that the use several passes to Gaussian blur the image, to make smooth.

I would assume that 1.3 million particles will kill the GPU.
I think they might also have some novel occlusion trick to go around the depth buffer none sense.
I heard that to go around the dreadful way occlusion queries works
some people are going to the extreme of making software renderer that running compute shaders. some other people make octrees and do hierarchical depth test.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Collision free instance painting

Postby Bird » Wed Jan 19, 2022 11:18 pm

Julio Jerez wrote:is that 1.3 million or 3 millions? the video says 3 million.

also is that running Cuda GPU or CPU?


Yes that's running on a NVIDIA GPU not the CPU

That's 1.3 million particles in the video. Although I did try with 3 million too and got about the same result. If I tried any higher I ran our of GPU memory (8 GB). The renderer is GPU based so it's taking some GPU memory too
Bird
 
Posts: 636
Joined: Tue Nov 22, 2011 1:27 am

Re: Collision free instance painting

Postby Julio Jerez » Wed Jan 19, 2022 11:28 pm

I just try 1 million and it is indeed is slower than their

suspension.png
suspension.png (495.9 KiB) Viewed 12560 times


but not really but much, I get about 120 fps, but the generation of the mesh alone take 7 ms.
that's just summiting the mesh across the PCI.
at that level we really need GPU support, and I thong when we get that it will be trully real time at 1 million.
8) :D
the scene is something to behold.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Collision free instance painting

Postby Bird » Wed Jan 19, 2022 11:30 pm

they had perfected the particle rendering, a lot, I think that the method that the use several passes to Gaussian blur the image, to make smooth.


I'm doing the rendering with a pathtracing renderer I built myself using OptiX. There's nothing fancy going on. If you look closeup you can see it's just tightly packed spheres. I gave them a slightly reflective surface that seems to help them look smooth.
Attachments
packed_spheres.jpg
packed_spheres.jpg (34.03 KiB) Viewed 12560 times
Bird
 
Posts: 636
Joined: Tue Nov 22, 2011 1:27 am

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 56 guests

cron