-
Posts
929 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by klepto2
-
Do you need multiple worlds? or is one world, but rendered on multiple windows (with different cameras) enough?
-
instead of a panel you could maybe use a simple sprite and an orthographic camera.
-
The editor does it, so it should be possible. Do you need different worlds? with one world I would create multiple cameras and rendertargets. And draw a panel in each window with the correct texture applied to it. i will come back with a sample in a few minutes.
-
Open the project manager and click on the warning icon at your project (if there is one) this should trigger the project update.
-
When Terrain is selected the editor is painfully slow
klepto2 replied to klepto2's topic in Bug Reports
Just a sidenote: One thing that highly improves the editing (at least in my case) is to switch to single viewport while editing the terrain. Which makes absolutely sense, as only one viewport needs to handle the costly wireframe selection rendering. -
-
that works. I noticed, that sometimes when using CreateDir in the script, the assetbrowser is not updating the folder structure. Could you add a method which refreshes the nodes, or something like assetbrowser:RefreshFolder(folder) ?
-
When Terrain is selected the editor is painfully slow
klepto2 replied to klepto2's topic in Bug Reports
Yeah i also noticed that and also filed a bug report: An idea for @Josh: Maybe just render a simple plane with the terrain matrix applied to the selection buffer. This will not be optimal as the outline is just flat, but will hopefully solve the bottleneck. Or there must be some other indicator for terrain selection. -
currently i only find LoadTable functions for a path or a stream, it would be nice to have a method to load the table structure by providing just a json string (eg: When Fetching a url request) In general this can be done by using the Stream method, but the stream override is not available in lua and might be a bit complicated to use.
- 1 reply
-
- 1
-
This is exactly what i meant. I guessed it should be only this one. Is the model.base already exposed in the editor? I can't access it after the latest update. This is what i have tried so far: model.base (not available) model:GetBase() (not available) Asset(model) or Asset(model.base) (not working)
-
-
Unfortunaltly it still doesn't work as expected. Here is a smaple material, one working and the other one not. mat_test.zip
-
If a material is saved via code, then the thumbnails not get generated correctly. when you create a Material in code, Load a texture and assign it to a slot. The following is saved using Material:Save: "texture0": "Materials/XXX/textures/brown_brick_02_diffuse.dds" where it should be : "texture0": "./textures/brown_brick_02_diffuse.dds" the above code leads to thumbnails with just a white ball. The later one displays correctly.
-
The first case is solved, the second case is still bugged and can be reproduced like it is shown in the gif.
-
Here are some small samples which are still causing problems: 1. i guess it has something to do with folder renaming: 2. I guess this is the issue reepblue is refering to:
-
There are some issues with the updating the folder hierarchy whithin the editor. When you add a folder to the project structure in windows explorer, the folder is visible within the editor, but selecting it doesn't update the Assetbrowser (also when you copy files into the folder they will only appear after an editor restart) if you copy a more complex folder structure in the windows explorer or extract a zip file with multiple folders in the project directory, some directories are added multiple times and when you select one of the duplicates the selection goes to the first original entry.
-
As the title says, generate a Material and change some values / texture later. The thumbnail is not updated.
-
Hi, i am trying to create some PBR materials based on the great Polyhaven archive. I download the following files: Diffuse, nor_gl, displacement and arm images in PNG format. A sample zip is attached. When you right-click on the diffuse file in the editor and choose to generate material, a material with all slots filled correctly, but the arm and diffuse textures seems to be stored in BC7 which doesn't seem to work. metal.zip
-
while developing the PBR Texture generator I have found some flaw with the current hook system. It is somewhat inflexible. Soi tried to add my own Hook Manager: enum class HookState { IDLE, PENDING, RUNNING, FINISHED, }; class HookManager; class Hook : public Object { friend class HookManager; private: void* _function; shared_ptr<Object> _extra; HookState _currentState; bool _stopping = false; bool _repeating = false; shared_ptr<HookManager> _manager; public: Hook(shared_ptr<HookManager> manager, void callback(const UltraEngine::Render::VkRenderer&, shared_ptr<Object>), shared_ptr<Object> extra, bool repeat = false) { _function = callback; _extra = extra; _currentState = HookState::IDLE; _repeating = repeat; _manager = manager; } void Start() { _currentState = HookState::PENDING; } void Stop() { _stopping = true; } HookState GetState() { return _currentState; } void SetExtra(shared_ptr<Object> extra) { _extra = extra; } }; class HookManager : public Object { friend class Hook; private: static void UpdateDispatch(const UltraEngine::Render::VkRenderer& renderer, shared_ptr<Object> extra) { auto hookManager = extra->As<HookManager>(); if (hookManager != NULL) { for (auto hook : hookManager->_hooks) { if (hook->_stopping) { hook->_currentState = HookState::IDLE; hook->_stopping = false; } if (hook->GetState() != HookState::FINISHED) { if (hook->GetState() == HookState::PENDING) { hook->_currentState = HookState::RUNNING; auto f = (void(*)(const UltraEngine::Render::VkRenderer&, shared_ptr<Object>))hook->_function; f(renderer, hook->_extra); } else if (hook->GetState() == HookState::RUNNING) { if (!hook->_repeating) { hook->_currentState = HookState::FINISHED; } else { hook->_currentState = HookState::PENDING; } } } } } } inline static map<HookID,map<shared_ptr<World>, shared_ptr<HookManager>>> _mapWorldHookManager; vector<shared_ptr<Hook>> _hooks; shared_ptr<World> _world; HookID _hookId; public: static shared_ptr<HookManager> Get(shared_ptr<World> world, HookID hookId) { if (_mapWorldHookManager.size() == 0) { _mapWorldHookManager[HOOKID_RENDER] = {}; _mapWorldHookManager[HOOKID_TRANSFER] = {}; } if (HookManager::_mapWorldHookManager[hookId][world] == NULL) { auto mgr = std::make_shared<HookManager>(world, hookId); mgr->StartDispatching(); HookManager::_mapWorldHookManager[hookId][world] = mgr; } return HookManager::_mapWorldHookManager[hookId][world]; } void StartDispatching() { _world->AddHook(HookID::HOOKID_TRANSFER, HookManager::UpdateDispatch, Self(), true); } void Start(shared_ptr<Hook> hook) { auto position = std::find(_hooks.begin(), _hooks.end(), hook); if (position != _hooks.end()) { hook->Start(); } } void Stop(shared_ptr<Hook> hook) { auto position = std::find(_hooks.begin(), _hooks.end(), hook); if (position != _hooks.end()) { hook->Stop(); } } HookManager(shared_ptr<World> world, HookID hookId) { _world = world; _hookId = hookId; } shared_ptr<Hook> AddHook(void callback(const UltraEngine::Render::VkRenderer&, shared_ptr<Object>), shared_ptr<Object> extra , bool repeat = false) { auto hook = std::make_shared<Hook>(Self()->As<HookManager>(), callback, extra, repeat); _hooks.push_back(hook); return hook; } void RemoveHook(shared_ptr<Hook> hook) { auto position = std::find(_hooks.begin(), _hooks.end(), hook); if (position != _hooks.end()) _hooks.erase(position); } }; It allows to dispatch, Start/Stop hooks like a thread and also adds the ability check the state of a hook. static void checkCallback(const UltraEngine::Render::VkRenderer&, shared_ptr<Object>) { } auto hookManager = HookManager::Get(_world, HOOKID_TRANSFER); auto checkHook = _hookManager->AddHook(checkCallback, _world, false); hookManager->Start(checkHook); while(checkHook->GetState() != HookState::Finished) { world->Update(); world->Render(); } This makes it a bit easier to watch the Hook execution. I use it in my PBRTextureGen and in my current state of Computeshader Implementation. It makes it much easier to manage the hooks. It might stll have a few bugs in it as i haven't fully tested every usecase, but for the basics it works
-
I know, but you can map/unmap just a region of the buffer to a shader or upload and download to that particular region. we just need the offset of the surface and the actual buffer
-
I have done something similar for my PBRGenerator, and will post the class to download data from the gpu soon. Syncing memory is always at a cost this goes for downloading and uploading the data. There are some tricks you can use to increase the speed a lot, but most of the time you just use staging buffers (these are buffers which are bound to eaither gpu or cpu sepending on the direction you want to transfer the data) create a buffer object map the buffer to the memory commit the upload or download commands unmap the buffer and retrieve the data (the buffer can be still mapped) There are muliple ways to retrieve data from the gpu. The slowest is to use vkCmdCopyImage, then vkCmdBlitImage (slightly faster and already does format conversion and filtering, is not available for all formats). The fastest way is to use vkCmdCopyBuffer, this copies the pure gpu memory of a bound resource into the host memory. This is mostly used for data readbacks for compute shaders (shader storage buffers), but also useful for image synchronsation. The usage of snycing between gpu and host should be used carefully, it can slow down an application fast, and should only be considered for debugging or useful info, lets say a generated water heightmap, where you want the to calculate eg: the height an object is on. This being said, it would be nice to get access to the index or vertex buffer elements of a specific surface (speaking of particle systems etc.)
-
I don't know exactly if this is the right place for this, but feel free to move it where ever you like, After the debugging fix in the latest release, I have started to experiment with the Lua extension integration. Some things I noticed: Currently, there is no way to dynamically down cast an entity to its derived class, e.g.: Entity → Model This is not supported by sol out of the box, but might be needed later as well for type checking. Currently, you can access all entities in the world, but not determine if it is something other than an entity. Some things are not yet accessible for extensions: The objects in the scene (I found out how to add items, not very hard) but I can't find a way to access the already added items in the scene. (using the world property of the program is not very useful because of the first problem (cast/type check) I have mentioned) Currently, there are no advanced extensions available, and as I understand that the focus lies on the release on bug fixing I would appreciate some documentation on how to properly script extensions (usage of the Undo/Redo, scene access) It would be nice to see some more advanced scripting options soon. I especially like some of the syntaxes which are available through sol3: local ent = world:GetEntitiesInArea(min,max) for i = 1, #ent do local e = ent[i] local name = getmetatable(e).__type.name -- unfortunatly only returns "UltraEngine::Entity" and nothing else. No way to cast Print(name) end
-
As i wanted to investigate some editor scripting possibilities, I tried using VSCode to debug the editor like it is described here: Clicking on Debug in VSCode starts the Editor, but the devcat debugger is waiting for the editor to connect. Without the ability to debug it is hard to guess, what objects and things are available to script the editor (the available current scripts mainly add some menu item only)
-
Searching for anything in the Map-Tab leads to a crash to desktop. The search in the Project-Tab works.