-
Posts
2,272 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by SpiderPig
-
-
Yeah I agree.
-
I wonder if double clicking or right clicking a component that's been added could take us to the component file? Or some other method other than hunting it down?
- 1
-
This worked also. You still need a camera available though for the render.
g_scene = nullptr; g_world->Update(); g_world->Render(framebuffer); g_scene = LoadMap(g_world, "Maps/TestScene.ultra");
-
My advice is if you want persistent objects between maps (mainly the main camera) I would create those in C++ and just use the maps to load different environments.
-
@Andy90 I believe I got your original upload to work as you expect it too.
if (g_window->KeyHit(KEY_ENTER)) { if (g_scene != nullptr) { g_scene = nullptr; } else{ g_scene = LoadMap(g_world, "Maps/TestScene.ultra"); } } //if (g_scene != NULL) { g_itemMover.Update(g_window); g_playerInventory->Update(g_window); g_world->Update(); g_world->Render(framebuffer); //}
It seems that setting the scene to nullptr will delete everything but your check to not update and render the world if it was nullptr meant that would never work. By removing that check and giving it a chance to delete on the first enter press I got it to work. However, the second issue I saw was the crash to RecordDraw and the framebuffer wasn't actually being cleared. This was because by deleting the map there was no longer any 3D camera available.
By adding this line after creating the framebuffer, the above code worked.
auto g_camera = CreateCamera(g_world);
The second map also loaded okay and the player could harvest from the rock. I also got the error with the AnimationBone or something. I think that was a combination of the lack of 3D camera and not letting the first map actually clear before loading the next one.
I hope this actually helps and I have not completely barked up the wrong tree.
-
Updated to v1.3. Macros now supported and an editor extension allows you to create a shader project from an existing material.
- 2
-
I might have some further info for you Josh. Create a new C++ project, load up the project in visual studio. Make this your loop:
//Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { if (window->KeyHit(KEY_SPACE)) { Print("------DELETING MAP------"); scene = nullptr; } world->Update(); world->Render(framebuffer); #ifdef STEAM_API_H Steamworks::Update(); #endif }
You will see in the output that it says all the material, textures and models are being deleted but nothing actually disappears from the scene. I think this is because the camera is being deleted with the map. Hope this helps. Maybe an error should be thrown if we try to render the world and there is no camera present?
-
This is an odd one but I believe I have found the issue with it.
If you load the gltf in the model editor, navigate to one of the meshes (first mesh in the list I think, but doesn't really matter) and browse for the 'Leaves' material. The leaves should go red, and while the editor updates the leaves should move around a bit.
However, if the material that you apply (Leaves.mat in this case) has 'alphamask' set as true, the flag 'alphaMode' in the GLTF will be set to 'MASK' and not 'BLEND'. If 'alphaMode' is set to MASK the custom vertex shader in 'leaves.mat' which turns the leaves red and moves them, doesn't seem to load. If you manually change this back to BLEND and reload the model, the leaves should be red and move a bit as the window updates.
Please let me know if I missed anything from the zip. You may need to change a few file paths in the material / shader family.
- 1
-
Upon occasion I've wanted to save the material of gltf model as a physical material file. Perhaps an 'Export' or "Save As' option here as well?
-
A real-time rendering option for the editor and asset editors (material / models) would be awesome.
- 1
-
This might be considered a bug, I'm not sure.
With a material open in the editor, if you then edit that material file in an external program the material itself does reload but all the parameters don't update. Would be nice to have them do so.
Also the thumbnail for the material doesn't update unless you save the material. Would be nice to have it update when the file changes perhaps?
I just noticed all this when using my shader editor on the materials whilst having the editor / material editor open. It's not a problem, just a luxury.
-
I made this so that I didn't have to convert my entire Leadwerks projects straight away. With this you can still use (most of) Leadwerks style drawing commands. It's not perfect, maybe not even finished (haven't used it in a while) but at the bare minimum some of you may be able to use / learn from it!
- 4
-
Honestly I'm not sure if this is a bug or something I've done. Extract this into the main project directory so it can find the textures and shader family and then load it with the editor. There are no texture slots in the material editor available. I think it has to do with the shaderfamily because if it's using the default pbr.fam it loads the slots fine.
-
Is it possible to get the filename of the currently open material in the material editor in lua extension?
-
Is there an event in LUA that occurs when a process created with CreateProcess() is closed down? Or can I add a while loop in an extension to check the process status?
-
Never mind, it was an easy fix in C#.
-
So I'm starting my process in a LUA extension for the editor.
if process == nil then process = CreateProcess("B:/ShaderMaster.exe") end
I get an error stating it couldn't find one of the files the app needs.
It's showing that it's looking in a folder relative to the project the editor has open. I need it to look relative to the process exe because that's where all of it's files are. I think I can edit my software to fix this but I'm wondering if this can be done simply when creating the process? Startup arguments perhaps?
-
Rather than navigate back to the file browser I'd like to be able to edit an asset by either double clicking it or right click and selecting "Edit" in the scene tree.
-
I'm browsing for a material that will be common over several GLTF models. After saving the models with the material assigned I've found by editing the one material it does not update the models that have it assigned. Upon further inspection of the GLTF file I saw no file reference to the material. It seems it has just copied the material into the GLTF file.
Is this intended behavior?
-
When saving this model in the asset editor it automatically generates PNG files even though everything is DDS.
-
The ability to drag a material from the project's file browser onto the model or the mesh name in the model tree view would be nice.
-
For me, clicking this takes me to a different projects folder other than my currently open project's directory in which the model resides. I think it's going to the last open folder or something... which is useful so long as it's within the current project think.
-
Could we get a "Rename" and "Delete" option when we right click an asset and a "Create Material" option when we right click blank space?
- 1
-
LoadMap bug when shared_ptr in entitys are set as variables
in Bug Reports
Posted
@Andy90 As you posted on Discord, I downloaded your recent project from here. The problems that I can see are a little different because you've got your teleport function as a component that I'm pretty sure is being deleted when you erase your map so it's causing the issue. My only advice is put your teleport code somewhere within main.cpp so that it can handle the map changes on the highest level - so that it is not part of the maps your erasing.
You still need to solve the camera issue by making sure a camera is always available to render too. These are the only issues that I can see, by fixing it this way I managed to get your game working without crashes. I think the current errors seem random because of the multithreading and sometimes it's not catching the fact there is no camera. Welcome to multithreading.