Sdf troubles

Started by Tasia 3 posts 140 views

Reply on sbox.game
  1. edited Apr 2025 #1
    Tasia
    Hello! I wanna ask about does sdf lib works now? I really dont understand what i should do for draw any thing. Im following official tutorial (at asset party and github too). And when using add async - it doesn't works too. Help pleasee
    edited:
    Intellisense dont helps also!
  2. #2
    ziks Facepunch 455
    There's a simple example scene in Facepunch/sbox-scenestaging. When you have a copy of that project you can find the scene at Assets/Scenes/Tests/Components/sdf3d.scene:
    image.png 30.82 KB
    When you run the scene you should see something like this:
    image.png 496.6 KB
    The basic things this demo uses to work are:
    • An SDF 3D World component
      • Holds one or more signed distance fields, and generates meshes from them
      • You can find it on the SDF World game object in sdf3d.scene
    • A .sdfvol resource
      • Describes an SDF material, including its resolution and appearance
      • The demo uses one named example.sdfvol
    • Code to modify the world
      • Uses AddAsync / SubtractAsync on an SDF 3D world instance with a particular .sdfvol
      • The modification code for the demo is in ExampleComponents/Sdf3DWorldExample.cs
    If that demo works for you, see if you can spot the difference between that and what you were doing already. Hope that helps, and feel free to ask here if you need any more help!
  3. #3
    Tasia Started this
    very thanks!