Fix 'SDF Instance' issuse
In i.q.'s recent video, he used following foluma to implement infinite objects(trees) on the terrain:

The method is ok when instances are seperated from each other in a reasonale big distance.
But I found this method has?a problem when instance gets too close from each other:

This happens for each point P, because we only measure P's SDF in the nearest grid object.
When instances get closer,the min distance may come from the neighbourhood instance:

Since we are in a grid2D,a easy way is to measure 8 neighbourhood's SDF,and take the min:

Measure 8 neighbourhood may be expensive.We can measure neiboughs ?along the trace direction,and omit those 'must further SDF' neighbours:

Now problem solved,this 'Grid2D SDF Instance' is ok:

標(biāo)簽: