Shade3D 公式

12 Bezier Patch [ Shade Labo ]

After noticing that a free-form surface does not smoothly change across all angles, I was able to determine what causes the surface deformation and the precise angle where the deformation logic changes.
Please refer to the sample file:
testbild_sample2.shd (309。6 キロバイト)

Start with a square surface:

We have four handle pairs: In,LatOut, Out, & LatIn. Since the proprietary deformation system operates by handle pairs (e.g. In1, In2), we will also consider handles in pairs.

Let’s modify handle pairs (In) & (LatOut) (“testsurface0”)

bezier-invariant_6

In this example, ||In1||=||In2||, ||LatOut1||=||LatOut2|| and so on, so we obtain the same surface coordinate at s=t=0.5 using either the legacy or new patch interpolation method.

However, when the handles in a handle pair have unequal lengths, we activate the deformation system.
In that case:


When In1 is in the red zone, where asin(0.99)≤α≤(90+acos(0.99)), use deformation case 1. Otherwise, use case 2.

Now refer to the shape “testsurface1” and drag In1 along the X axis.

Notice how the deformation logic changes when the handle is moved outside of the red zone.

You can do the same with the shape “testsurface2”, where In1 instead lies on the left edge of the red zone.

Hi,

Can you verify that the deformation logic switch depends on the angle between the handles in a handle pair (e.g. In1, In2) using the Shade 17 patch interpolation method? I’ve never considered that it might be the angle between the vectors (P11-P10) and (P21-P20) that determines the deformation logic switch for surface subdivision at rendering.

レンダリング時の曲面の細分割は、ポリゴンメッシュへの曲面の細分割と同じように検証できます。

Surface subdivision at rendering can be verified as the same as surface subdivision to a polygon mesh.

sample 3.shd (84。4 キロバイト)
verify.zip (616 バイト)

上記のサンプルファイルでは、頂点モードを使用して自由曲面にSurface Replicatorをアタッチしています。 Surface Replicatorはレンダリング時にサーフェスの細分割を使用するため、ポリゴンメッシュへのサーフェスの細分割と異なるかどうかを簡単に確認できます。

In the above sample file, I have attached a Surface Replicator to the free-form surface using Vertex Mode. A Surface Replicator uses surface subdivision at rendering, so it would be easy to check if it is different to surface subdivision to a polygon mesh.

上記のzipファイルには、「polymesh_verify.py」と「replicator_verify.py」の2つのスクリプトがあります。
There are two scripts, “polymesh_verify.py” and “replicator_verify.py” in the above zip file.

確認手順:
Steps to verify:

1.「polymesh_verify.py」をロードし、「Use Gregory patch …」オプションがチェックされているかどうかに応じて、オレンジまたはグリーンの表面で実行します。

Load “polymesh_verify.py”, then run on either the orange or the green surface, depending on whether the “Use Gregory patch…” option is checked.

  1. Surface Replicatorを実現し、最初のオブジェクトを選択してから、「replicator_verify」を実行します。

Realize the Surface Replicator, select the first object, then run “replicator_verify”.

3.「replicator_verify.py」で取得した座標セットから「polymesh_verify.py」で取得した座標セットを引きます。 15000mmの平均境界ボックスを持つオブジェクトの全体の長さの差は、約3e-3です。オレンジ色の表面を使用したときに得られた長さの違いは次のとおりです。

Subtract the set of coordinates obtained via “polymesh_verify.py” from the set of coordinates obtained via “repolicator_verify.py”. The overall length difference for an object with an average bounding box of 15000mm is ~3e-3. Here’s the length differences I’ve obtained when using the orange surface:

  1. 0.0009765625, 0.0, 0.0
  2. -0.00146484375, 0.0, -0.00048828125
  3. -0.00122070311999778, 0.0, -0.00048828125
  4. -0.00048828125, 0.000030517577982892, 0.0
  5. 0.0, 0.000061035156022626, 0.000488281250000000
  6. -0.0009765625, 0.000122070320003331, 0.0
  7. -0.0009765625, 0.0, -0.00048828125
  8. -0.0009765625, 0.0, 0.0
  9. -0.00048828125, 0.0, 0.0
  10. 0.000122070320003331, 0.000122070309998890, 0.00048828125
  11. -0.000122070320003331, 0.000106811524005934, 0.0
  12. 0.00048828125, 0.0, 0.0
  13. 0.0, 0.0, 0.000244140619997779
  14. 0.0, 0.000244140619997779, 0.0
  15. 0.0009765625, 0.0, 0.000244140630002221
  16. 0.00146484375, 0.0, 0.0
  17. 0.00146484375, 0.000122070312954747, 0.0
  18. 0.0, 0.000244140625, 0.0
  19. 0.00048828125, 0.000244140630002221, -0.000122070312045253
  20. 0.0009765625, 0.0, 0.000091552733977096
  21. 0.0, 0.0, -0.00012207030999889
  22. 0.0, 0.000244140630002221, 0.0
  23. 0.001953125, 0.00012207030999889, -0.000152587889999722
  24. 0.00268554688000222, 0.000122070311988409, -0.000061035155965783
  25. 0.000244140625, 0.000183105468977374, 0.0
  26. -0.000244140630002221, 0.000244140630002221, 0.0
  27. 0.0009765625, 0.000244140630002221, 0.0
  28. 0.0009765625, 0.000244140619997779, 0.000244140619997779
  29. 0.0, 0.00012207030999889, 0.0
  30. 0.0, 0.000244140625, 0.0
  31. 0.00146484375, 0.000167846680000139, 0.0
  32. 0.0009765625, 0.00012207030999889, -0.000244140630002221
  33. 0.00048828125, 0.000244140619997779, 0.0
  34. 0.0, 0.000244140619997779, 0.00048828125
  35. 0.0, 0.0, 0.0
  36. 0.0, 0.0, 0.000244140630002221
  37. 0.0, 0.00012207031200262, 0.0
  38. -0.00048828125, 0.000122070311931566, 0.00048828125
  39. 0.000732421880002221, 0.000122070309998890, 0.00048828125
  40. -0.00036621094000111, 0.0, 0.0
  41. 0.0, 0.0, 0.0
  42. -0.00048828125, 0.0, 0.0
  43. 0.0, 0.000061035155994205, 0.0
  44. 0.0009765625, 0.000061035155908940, 0.0
  45. 0.0, 0.0, 0.00048828125
  46. 0.000854492190001110, 0.0, -0.0009765625
  47. 0.000732421869997779, 0.0, 0.0
  48. 0.0, 0.0, 0.0
  49. -0.0009765625, 0.0, 0.0

24行目にある最大長のベクトルは、オレンジ色の表面では0.00268901255036535 mmです。
The vector with the maximum length, found on Line 24, is 0.00268901255036535 mm, for the orange surface.