Jump to content

SpiderPig

Developers
  • Posts

    2,277
  • Joined

  • Last visited

Everything posted by SpiderPig

  1. Ah yes thanks. MaxVerticies and MaxIndices is total for a single mesh or entire program? They probably are a bit low.
  2. Okay thanks. So it's pretty much just a memory game. I thought there might also be a maximum amount of entities and materials too as the shaders look them up in an array. Maybe those arrays have no set size like the textures do.
  3. Sure can. This is the material I set to a line mesh. debug_material = CreateMaterial(); debug_material->SetShaderFamily(LoadShaderFamily("Shaders\\Unlit.json")); debug_material->SetLineStipple(LINE_STIPPLE_DASHED); Line mesh was created like this and then the model scaled to the right size. model = CreateModel(world); model->SetRenderLayers(render_layers); mesh = model->AddMesh(MESH_LINES); mesh->AddVertex(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f); mesh->AddVertex(1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f); mesh->AddVertex(1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f); mesh->AddVertex(0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f); mesh->AddPrimitive(0, 1); mesh->AddPrimitive(1, 2); mesh->AddPrimitive(2, 3); mesh->AddPrimitive(3, 0);
  4. SetLineStipple() has to be the single most best thing about Ultra. I'm using it here to debug my widget system. Different coloured borders are used to identify different types of containers. I've pretty much implemented Godot's UI system into Ultra. You can see the various containers and how they expand in different ways to fill their parents. There are a few issues on the left with the scroll containers, hence the debugging mode.
  5. Just want to get a clear idea on what are some of the limits for these things so I can be sure to not exceed them. As I understand it only so many materials, textures, entities and maybe other things can be passed to the shaders. What are the max: Entities Materials Textures Any thing else?
  6. Perfect, thanks! Will put this to good use.
  7. I loaded this into the model viewer and re-saved it from there. In C++ it still says only 1 LOD is available and it has a mesh size of 0. Even though the output says it loaded the other LOD and it renders perfectly.
  8. All good I made this entire system myself in C++. I'm not sure if Leadwerks had a default interaction system of sorts, but you could probably make one with LUA.
  9. Regarding your latest update @Josh Does the entities index change through out the program or is it set once and that it until it's deleted?
  10. Thought I'd change this post to track the work in progress of my game instead. I've been spending time on procedural foliage generation. I create a volume and then add different items to that volume. It then procedurally places them inside the volume based on growth rates, shadow and collision radius and eventually height map data. The green bounding box is the foliage volume. The blue is where a sound will fade in when you enter it. The distance between the blue and green bounding boxes dictates the sound volume. I'll have to make a video of this soon. Each tree has an interaction assigned to it. This is a system I made in Leadwerks. The player has a box that it's bounds are used to get overlapping entities, if any of those entities have an interactable object assigned to it a label will appear on screen telling you what can be done. For these trees they will supply bark to your inventory. All the coloured shapes are debugging visualizers.
  11. I can do it in C++ but how to set it in the JSON material? { "material": { "version": 100, "color": [ 1.0, 1.0, 1.0, 1.0 ], "emission": [ 0.0, 0.0, 0.0 ], "metallic": 0.0, "roughness": 0.0, "transparent": false, "occlusionInfo": true, "occlusionScale": 1.0, "normalScale": 1.0, "shaderFamily": "PBR" } }
  12. Yeah and Ultra seems very capable of rendering multiple cameras.
  13. Yeah I agree, I'll use a 2nd camera. Thanks.
  14. Interesting. Is that a by-product of Vulkan or is it fixable down the track?
  15. I think what I need is to disable depth testing but it didn't do what I expected. The models that this material is applied to are small and are sometimes inside other objects, I just want them to be always onto of everything. debug_point_material = CreateMaterial(); debug_point_material->SetShaderFamily(LoadShaderFamily("Shaders\\Unlit.json")); debug_point_material->SetShadow(false); debug_point_material->SetDepthMask(false); debug_point_material->SetDepthTest(false);
  16. Yeah it is a tough one. I think I've found a way in Audacity to normalise sounds to a specific dB rating. Even if it's not exact it doesn't matter, just as long as the sounds have the right volume compared to each other. A few of the systems like dialogue, music and effects will have a master volume. I think I'll have to use a chart like this, just to get an idea on where things should be to make them at least a little realistic. I'll probably make my own chart based on this and insert my sounds at the correct dB rating and then just test it! See if that works.
  17. I assume most of you, like me, have various sounds gathered over the years but all of them are at varying levels of volume. Even simple things like, the footsteps on stone might be 10x louder than the footsteps for grass. I wonder if anyone knows if there is a standard volume sounds should be converted to in dB? I mean there are sounds which should be louder than others like explosions vs footsteps but are there pre-defined levels they should be at or is it just a guessing game? Curious to hear any thoughts you guys might have.
  18. Title says it all. I want to check what sound is assigned to a particular speaker.
  19. The bufferViews in the .gltf part have an extra parameter called "target", so maybe the bin data is different too?
  20. I didn't I loaded it straight into my project. I also compared it to other similar files that work and it seemed to be the same. Hard to tell really.
  21. I can't figure this one out. I was playing around with exporting from Blender and it displays on screen but only shows 1 LOD and no meshes for that LOD. It's worth mentioning it has no materials or images, not sure why that'd make a difference though. EDIT : It might be the newer GLTF export in blender. The files that work are with "Khronos glTF Blender I/O v1.4.40" and the ones I've uploaded that don't work are "Khronos glTF Blender I/O v3.6.27". #include "UltraEngine.h" #include "Components/Mover.hpp" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); auto world = CreateWorld(); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a camera auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetFov(70); camera->SetPosition(0, 5, -8); //Create a light auto light = CreateBoxLight(world); light->SetRotation(35, 45, 0); light->SetRange(-10, 10); auto model = LoadModel(world, "Models\\PineLarge_001.gltf"); //Only one LOD and no meshes. //Output says LOD_1 was loaded but then deleted int l = 0; for (auto lod : model->lods) { auto m = 0; for (auto mesh : lod->meshes) { Notify("lod : " + String(l) + ", mesh : " + String(m), ""); m++; } l++; } //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; } PineLarge.zip
  22. Here's a quick program and shader to test this out. The shader works with inTexCoords.xy but not with inTexCoords.zw. #include "UltraEngine.h" #include "Components/Mover.hpp" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); auto world = CreateWorld(); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a camera auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetFov(70); camera->SetPosition(0, 0, -3); //Create a light auto light = CreateBoxLight(world); light->SetRotation(35, 45, 0); light->SetRange(-10, 10); auto box = CreatePlane(world); box->SetRotation(-90.0f, 0.0f, 0.0f); auto material = LoadMaterial("Materials\\Test.mat"); box->SetMaterial(material); auto mesh = box->lods[0]->meshes[0]; mesh->SetVertexTexCoords(0, 0.0f, 0.0f, 1); mesh->SetVertexTexCoords(1, 1.0f, 0.0f, 1); mesh->SetVertexTexCoords(2, 0.0f, 1.0f, 1); mesh->SetVertexTexCoords(3, 1.0f, 1.0f, 1); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; } Shader : #version 450 #extension GL_GOOGLE_include_directive : enable #extension GL_ARB_separate_shader_objects : enable #extension GL_EXT_multiview : enable #include "../../../../../../../../UltraEngine/Templates/Common/Shaders/Base/TextureArrays.glsl" #include "../../../../../../../../UltraEngine/Templates/Common/Shaders/Base/Materials.glsl" layout(location = 5 ) in flat uint inMaterialIndex; layout(location = 2 ) in vec4 inTexCoords; layout(location = 0) out vec4 color[8]; void main() { color[0] = texture( texture2DSampler[ GetMaterialTextureHandle( materials[ inMaterialIndex ] , 0 ) ] , inTexCoords.zw ); } Files : Shaders.zip
  23. The larger the range between the camera's min and max view range, the less precision there is for things. 0.01 is good for most applications I think. Ultra will have double float support
×
×
  • Create New...