Jump to content

Josh

Staff
  • Posts

    23,141
  • Joined

  • Last visited

Posts posted by Josh

  1. I have replaced the function declaration with this code, which will handle all variations:

    "IntersectsBrush", sol::overload(
      [](Brush& b, shared_ptr<Brush> bb, std::nullptr_t, float e) { return b.IntersectsBrush(bb, nullptr, e); },
      [](Brush& b, shared_ptr<Brush> bb, shared_ptr<Face> f, float e) { return b.IntersectsBrush(bb, f, e); },
      [](Brush& b, shared_ptr<Brush> bb, std::nullptr_t) { return b.IntersectsBrush(bb, nullptr); },
      [](Brush& b, shared_ptr<Brush> bb, shared_ptr<Face> f) { return b.IntersectsBrush(bb, f); },
      [](Brush& b, shared_ptr<Brush> bb) { return b.IntersectsBrush(bb); }
    ),

    An update will be available tomorrow.

  2. I have added some commands in the API and I guess I did not update the Lua declarations to match. This is the method syntax:
    IntersectsBrush(shared_ptr<Brush> brush, shared_ptr<Face> face = NULL, const float epsilon = 0.0f)

    I am adding the required overloads now. NIL probably won't work for the face until I add the right syntax.

  3. 31 minutes ago, SpiderPig said:

    The only way I can correct it is to double the vertices where the UV Coords are different.  But of course, I get lots more vertices.

    I've never noticed it before but all models that have UV coords must have many extra vertices just to get the unique UV coords.  Unless there is something I've missed 

    This is correct. This is a common behavior in almost all game model formats. You are doing it correctly.

    32 minutes ago, SpiderPig said:

    there is a way to use the second UV Coord set?

    The second UV set is available in the .zw coordinates of the texcoord value.

    • Thanks 1
  4. AO will only be rendered when the AO map is assigned to the AO texture channel...BUT...

    The AO map and the metal-roughness map can be the same texture. So if you assign it in both slots, you have AO.

    This is the way glTF does it. I don't think it really requires an extra texture sample in the fragment shader, because of the texture cache.

  5. @reepblue pointed out this library for UV unwrapping:
    https://github.com/jpcy/xatlas

    68638607-d4db8b80-054d-11ea-8238-845d94789a2d.gif.d27feeb9e23407b6e9a69425b4b8ad92.gif

    I added these values to the AssetEditor class:

    • asseteditor.model: the open model, if it exists.
    • asseteditor:Invalidate(): Triggers a viewport redraw.
    • asseteditor:Modify(): Causes the file to be set as "modified".
    • asseteditor.modelmenu: Menu displayed when a model is loaded.

    The event EVENT_INITASSETEDITOR is emitted when an asset editor window is initialized, so you can add a menu item to the modelmenu at this time.

    Since Lua can call functions from a DLL, that should be everything needed to create an unwrapping extension.

    • Like 1
  6. There is a typo in my declaration of this function. You can work around this temporarily by supplying a second Vec3 to the function arguments like this:
     

     

    local joint = CreateBallAndSocketJoint(parent.position, Vec3(0), parent, child)

     

    • Like 1
    • Vertex tool can now select objects.
    • Increase size of vertex indicators when DPI scaling is used.
    • Added default materials so brushes aren't bright white on creation.
    • Edge selection highlight thickness now adjusts with DPI scale
    • Like 1
    • Thanks 1
  7. From MS:
    https://learn.microsoft.com/en-us/dotnet/api/system.io.filesystemwatcher.created?view=net-8.0

    Quote

     

    Common file system operations might raise more than one event. For example, when a file is moved from one directory to another, several OnChanged and some OnCreated and OnDeleted events might be raised. Moving a file is a complex operation that consists of multiple simple operations, therefore raising multiple events. Likewise, some applications (for example, antivirus software) might cause additional file system events that are detected by FileSystemWatcher.

     

     

  8. I added a weak pointer in the shader module (the asset) to all shaders they get attached to, and it will reattach them and update the shader automatically when the module is reloaded.

    Tested shader editing in VSCode and Notepad and with both those programs the asset only gets reloaded once...

    • Added selection toolbar item
    • Added basic implementation of drag-select area. The volume intersection test is not exact yet.
    • Revised the way converters work to make them more useful. I recommend deleting the FBXToglTF and ColladaToglTF scripts in Scripts/Start/Converters, if you have those files. Converters can now be enabled and disabled with settings. Everything is managed entirely in script, except for detecting files that need to be converted and emitting the convert file event.

    image.thumb.png.a46c33dc389865a1fdc443b39c082a0a.png

    • Like 2
    • Thanks 1
×
×
  • Create New...