Jump to content

SpiderPig

Members
  • Posts

    2,285
  • Joined

  • Last visited

Posts posted by SpiderPig

  1. Here's a little addon for Blender 4.0 that will export any selected object as a MESH collider for use in Ultra.  It may work with other versions of blender but I've not tested it.

    There are no options for the export process.  By default Z is up in Blender so upon export the vertex y and z positions are swapped so that Y is up in Ultra.  I could probably add an option to toggle this if it's needed.

    Any suggestions for improvements are welcome!

     

    To Install:

    1. Add the folder io_mesh_collider to Blender 4's addon folder.  (Blender/4.0/scripts/addons)
    2. Launch Blender and navigate to Edit->Preferences
    3. Click the add-ons tab look for Import-Export: Ultra Engine Collider and enable it

    io_mesh_collider.zip

     

    • Like 2
    • Thanks 1
  2. for (const auto& face : meshfaces)
    {
    	binstream->WriteInt(face.size());
    	for (const auto& pos : face)
    	{
    		binstream->WriteFloat(pos.x);
    		binstream->WriteFloat(pos.y);
    		binstream->WriteFloat(pos.z);
    	}
    }

    Is 'face : meshfaces' each polygon?

    What is face.size()?  How many vertices per face?

  3. My plugin loads geometry fine but it doesn't seem to use the data I assign to the material.

    Like the Quake Plugin example, I set a similar material to each mesh in the plugin code;

    auto mtl = new GMFMaterial(file);
    mtl->text = "{\"material\":{"
    	"\"color\": [1,0,0,1]"
    	"}}";
    mtl->path = L"material0.mat";
    mtl->data = (void*)mtl->text.c_str();
    mtl->datasize = mtl->text.size();
    
    mesh->SetMaterial(mtl);

    When I load the model, m_material for all the meshes are no longer 'empty' but the color is not red.  It is still the default white.

    1. Are there any extra steps I should take to make it work?
    2. OR... Can I do something like this instead of creating a material in the plugin?  And have the engines LoadModel() function automatically load the file and use that?
    mesh->SetMaterialPath("MyMaterialFile.mat")

    I saw a variable in the mesh class for the material path.  Perhaps this should work?

    mesh->materialfile = L"MyMaterial.mat";

     

  4. Are you using 0.9.5?  Only the terrain uses spv files in 0.9.5.  There is a SpecularGloss_Masked.frag in Shaders/PBR.  I'd say Josh just needs to fix the paths in SpecularGloss_Masked.fam to get it too work but you could do it manually in the meantime to see if it works.

    • Like 1
    1. Open up any model in the model editor.
    2. Navigate to the Model tab and select the model in the tree view.
    3. Change the collider to anything other than NONE.
    4. Now change the collider back to NONE.
    5. Close the model editor and click save.
    6. The model editor will not close and the top menu bar has disappeared.
  5. I was thinking it might also be useful to retrieve a list of hooks that have been added.  Like,

    vector<void*> hooks = world->GetHooks(HOOK_WORLD_UPDATE);

    I would use this mainly for debugging purposes, to make sure that I haven't accidentally added to many hooks or that I am actually removing a hook when I think I am.  I would place the hook.size() into my stats overlay so I can see what's going on.

  6. Hmm, my frag file has only 20k lines.  I'd like to know why it says there's an error at line 41,315.  <_<  My node editor has already solved all the #include directives too, that's why my frag file is so large.  There's no #include's left.

  7. Can't get this to work.  Am I doing something wrong or is it a bug?  I'm sure it worked like this in the past.  The font can't be found in the package.

    #include "Engine.h"
    using namespace UltraEngine;
    
    
    int main(int argc, const char* argv[])
    {
        auto package = LoadPackage("Data.zip");
        if (package == nullptr) { Notify("No Package Found"); }
    
        auto font = LoadFont("Fonts\\ZippedArial.ttf");
        Notify("No Font Found");
    
        return 0;
    }

    Data.zip

  8. @Andy90 and I discussed this on discord.  I think we found that exporting from blender as FBX and then letting Ultra's FBX to GLTF take over worked well.  At least for now anyway.  I think the problem lies in blenders GLTF exporter.

  9. I've noticed a lot of thin banding in the shadows in 0.9.5.  I think it's been raised already but I didn't see an official report. :)

    This is in the default startup map.

    ShadowBanding.thumb.png.70abbe751f9fb881bb9bbc526f6a8023.png

  10. Yeah the UI needs attention.  I just threw it together so that I could use it.  There are many bugs, I'm actually working on this right now.

    1. I did think people wouldn't like entering their steam info.  It doesn't have to be used, but I do use it.  At the very least I could still manage the steam sdk and just have the user input their steam details into the command prompt that show up, as they'll have to do that anyway to upload.
    2. I forgot to remove a couple of options;
      • Everything - should package the entire game folder into one zip file and move it to the export path.
      • All folders - should package all the folders within the game folder into one zip named "data.zip".  E.g. The publish folder should contain Data.zip and MyGame.exe as well as any DLL that is needed.
      • All Files - doesn't work atm
      • Separate Folders - Keeps all the folder hierarchy within the game folder but will package all files within that folder. (If this isn't working it's a bug, it works for me)
        • Steam may have changed now... but when I made this it was needed for making small downloads for any updates.  I found that if I had one large package (1GB or so)  even if I changed one file, steam saw that the whole package had changed so it uploaded the whole thing again and said there was a 1GB update for users.  Compressing each folders contents separately helped reduce that update size.
      • Separate Files - doesn't work atm.  I was thinking here it could compress / encrypt each file separately.
    3. It's using C#.  I probably will remake it with Ultra engine for those reasons.

     

    Thanks for your input! :)

    • Like 1
  11. It was thought for real-time recasting of terrain shadows.  Currently I disable all lighting for where there are shadows from the directional light.  But I'd like to disable the light only for the specific light source so I can get multiple shadows from multiple lights.  This way a point light could light up an area that is in shadow for a directional light.

    • Confused 1
×
×
  • Create New...