Jump to content

SpiderPig

Members
  • Posts

    2,285
  • Joined

  • Last visited

Everything posted by SpiderPig

  1. Title says it all. I want to check what sound is assigned to a particular speaker.
  2. The bufferViews in the .gltf part have an extra parameter called "target", so maybe the bin data is different too?
  3. 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.
  4. 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
  5. 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
  6. 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
  7. I used C++ in Leadwerks and used all the 2D drawing commands. It was slow but it worked.
  8. Similar to what I mentioned here for materials. If I can get the index of an entity I can store extra data in a texture per entity. Unless there's already a way to do this?
  9. I've been looking through every piece of shader code for some wiggle room but you've stripped everything down to the bare minimum number of bytes needed so there's no room left for me. But this is why Ultra is fast. I was thinking that too. I wanted to see if there were other ways first before I started on this. Thanks!
  10. I like the control over them myself. I think being able to set them would be good. In other words, I want to use them to store other values in a custom shader.
  11. Can we not set a vertex's tangent or bitangent in Ultra? I only found these in the Mesh class for vertices. virtual void SetVertexPosition(const uint32_t v, const Vec3& position); virtual void SetVertexNormal(const uint32_t v, const Vec3& normal); virtual void SetVertexTexCoords(const uint32_t v, const Vec2& texcoords, const int index = 0); virtual void SetVertexColor(const uint32_t v, const Vec4& color);
  12. Ohhh okay. Thanks, I'll try something else.
  13. I wonder if I can pass some custom floats per vertex to a fragment shader like this or does the extracting of the vertex colors in vert shader only work with values from 0.0f to 1.0f? mesh->SetVertexColor(0, (float)1200, (float)1400, (float)6450, (float)780);
  14. Thanks I'll take a look at this soon.
  15. Lua is good to learn with. Looking forward to seeing what you achieve!
  16. I found C++ in Leadwerks a lot faster than Lua. If your making a small game then Lua is fine and a lot quicker to get results. But if you want a large open world then C++ will be faster and give you more access to underlying commands in Leadwerks. It's C++ all the way for me. 😎
  17. Oh wow, perfect. Thanks man!
  18. Yeah it depends greatly on the scope of the game your building.
  19. What's your target FPS for the final game?
  20. Yeah it would be nice, it shouldn't far away though.
  21. I don't think any of the pre-orders are currently capable of downloading anything as Ultra is not released yet. I have the subscription which gives me and a few others access, it's in the store still, but I have no idea if Josh is still accepting new purchases of this as it will soon be redundant.
  22. Yes things probably need adjusting bit. 😄
  23. Added a vicinity inventory and a few cool line dividers. Need to works on some icons for the stats.
×
×
  • Create New...