Jump to content

SpiderPig

Members
  • Posts

    2,285
  • Joined

  • Last visited

Everything posted by SpiderPig

  1. It says it does. I have had other shaders of mine compiling and running that use that extension.
  2. Kind of. This is the call stack. ...did you say that terrain textures need to be the same size as the terrain resolution? I see the extra parameter for the texture size.
  3. GTX 980 Ti. I'm seeing if there's a driver update now.
  4. Could it be problem with Refraction.fx or might it be totally unrelated?
  5. Downloaded the latest update and updated the project and still the same error. Do you get this error on your machine or is it specific to my machine you think?
  6. Yeah that's the only error I got.
  7. Got it back down to about 200ms by increasing ray step size based on how high the ray is above the terrain at that time. I have another idea that could decrease the amount of rays that actually need casting by up to 50%.
  8. Did this and it seems to work nice. if (enable_lighting == true && (RenderFlags & RENDERFLAGS_NO_LIGHTING) == 0) Only issue left to solve are the edges of the shadows are very harsh. If I can use a single bit as a Boolean to disable lighting I may also be able to use a few bits to determine the distance from the light source so that I can soften the edges.
  9. This iteration is a bit slower but looks a lot nicer. The shadows are just multiplied by the final color so fragments within the shadow are still having light calculated on them. @Josh Can I make a bool variable in the fragment shader to simply not calculate lighting for certain pixels? Something like this perhaps? EDIT : There's a RENDERFLAGS_NO_LIGHTING right there.... I might play with that if(canDoLighting == true) { if ((RenderFlags & RENDERFLAGS_NO_LIGHTING) == 0) { RenderLighting(material, materialInfo, vertexWorldPosition.xyz, n, v, NdotV, f_diffuse, f_specular, renderprobes, ibldiffuse, iblspecular); if (!renderprobes) { ibldiffuse = vec4(0.0f); iblspecular = vec4(0.0f); f_specular = vec3(0.0);// we don't want specular reflection in probe renders since it is view-dependent } } else { renderprobes = false; f_diffuse.rgb = materialInfo.c_diff * AmbientLight; f_specular = vec3(0.0f);// we don't want specular reflection in probe renders since it is view-dependent } }
  10. This file causes LoadModel() to hang rather than crash. Is there some sort of secret header that all model files should have? To confirm - this is not with any plugin I've made, this is just loading a file that doesn't have much data and is in a format that LoadModel() doesn't recognise. I've also seen LoadModel hang and rapidly increase RAM usage into the tens of GB. CausesHang.zip
  11. The example here throws an error with the latest build. https://www.ultraengine.com/learn/CreateTerrain?lang=cpp
  12. Has TEXTURE_RED been replaced / missing or is it redundant now?
  13. Got this error with one of the shaders in latest update. I did copy the shader folder over to my project. Adding in the required line solves the problem.
  14. As discussed bender has some issues with converting FBX to GLTF. What would be nice is to have a feature in the Model Editor that allows us to add the animations from another model onto the current model. Mixamo (as far as I know) only exports one animation per FBX file. SO using that means we could have a few dozen models of the same thing with different animations. Currently the only way to merge them is through blender or some other software.
  15. After some discussion with @Andy90 there is another problem that I'm not sure has been raised yet... so here it is. This FBX has been exported from Mixamo. If you drag it into a folder in the editor it will convert perfectly. If you open the GLTF in the asset editor the animation is present and working, however if you then save the model from the asset editor you get a notification that says it has "animations that won't be saved". So you can only save the model if you don't want to keep the animation. V0.9.4 BTW Walk Forward.zip
  16. This is 0.9.4 by the way... Happens in 0.9.5 too.
  17. I was creating the file with a buffer but changed to WriteFile but it still throws an error in LoadModel and crashes the application. This is how I'm creating the model file. void SaveModel(WString filepath, shared_ptr<Model> model) { auto version = 1; auto file = WriteFile(filepath); auto total_lods = model->lods.size(); file->WriteInt(version); file->WriteInt(total_lods); for (auto lod_index = 0; lod_index < total_lods; lod_index++) { auto total_meshes = model->lods[lod_index]->meshes.size(); file->WriteInt(total_meshes); for (auto mesh_index = 0; mesh_index < total_meshes; mesh_index++) { auto mesh = model->lods[lod_index]->meshes[mesh_index]; auto total_vertices = mesh->CountVertices(); auto total_indices = mesh->CountPrimitives(); //Save Vertices file->WriteInt(total_vertices); for (auto vert_index = 0; vert_index < total_vertices; vert_index++) { auto vertex_position = mesh->GetVertexPosition(vert_index); auto vertex_normal = mesh->GetVertexNormal(vert_index); auto vertex_texcoords = mesh->GetVertexTexCoords(vert_index); file->WriteFloat(vertex_position.x); file->WriteFloat(vertex_position.y); file->WriteFloat(vertex_position.z); file->WriteFloat(vertex_normal.x); file->WriteFloat(vertex_normal.y); file->WriteFloat(vertex_normal.z); file->WriteFloat(vertex_texcoords.x); file->WriteFloat(vertex_texcoords.y); } //Save Indices file->WriteInt(total_indices); for (auto indice_index = 0; indice_index < total_indices; indice_index++) { auto v0 = mesh->GetPrimitiveVertex(indice_index, 0); auto v1 = mesh->GetPrimitiveVertex(indice_index, 1); auto v2 = mesh->GetPrimitiveVertex(indice_index, 2); file->WriteInt(v0); file->WriteInt(v1); file->WriteInt(v2); } } } file->Close(); }
  18. I'm working on my own model format with a plugin, and with or without the plugin loaded I get the error - "Seek position outside of file bounds". If you try loading this file as a model it should return null if it does not recognise shouldn't it? LoadModel("Test.uga"); Test.zip
  19. I would have use for these as well. Also BEFORE_PHYSICS_UPDATE & AFTER_PHYSICS_UPDATE would be good.
  20. They are, I was more wondering if it should print an actual error when it failed to load. 🙂
  21. Used some old code today and loading a non-existent shader family with the .json extension printed this output... Loading shader family "Shaders/Unlit.json" Deleting shader family "Shaders/Unlit.json" Should it be more like this so we know it actually failed? Error : Failed to load shader family "Shaders/Unlit.json"
  22. Not positive if this is a bug to be honest and if it is it may well be fixed in the next update, but just in case - In my game rotating the directional light to mimic the sun causes the vertex, polygon and instance count to slowly ramp up to about 20x then it will slowly decrease and then ramp up again. (I have 1.2 million verts in my game and it can get up to 30million before repeating the cycle) The code below shows the stats fluctuating in the window title albeit at a lesser extent than in my game. Should the vertex, polygon and instance counts fluctuate with a moving / rotating light source? And by that much? #include "Engine.h" #include "ComponentSystem.h" 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(); world->RecordStats(); auto framebuffer = CreateFramebuffer(window); auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetFov(70); camera->SetPosition(10, 10, -8); auto light = CreateDirectionalLight(world); light->SetRotation(35, 45, 0); auto floor = CreateBox(world, 128); floor->Move(0, -64, 0); vector<shared_ptr<Entity>> boxes; for (int z = 0; z < 25; z++) { for (int x = 0; x < 25; x++) { auto e = CreateSphere(world); e->SetPosition(x, 0.0f, z, true); boxes.push_back(e); } } while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { Vec3 day_speed = Vec3(0.5, 0, 0); light->Turn(day_speed.x, day_speed.y, day_speed.z); auto stats = world->renderstats; WString text = "FPS : [" + WString(stats.framerate) + "] - "; text += "Verts : [" + WString(stats.vertices) + "] - "; text += "Polys : [" + WString(stats.polygons) + "] - "; text += "Insts : [" + WString(stats.instances) + "] - "; text += "Shadow Polys : [" + WString(stats.shadowpolygons) + "]"; window->SetText(text); world->Update(); world->Render(framebuffer, false); } return 0; }
  23. Nice! Shader toy has some good shaders. 🙂
  24. There is a CurrentTime variable in UniformBlocks.glsl that you can use.
  25. Foliage volume fills the terrain nicely. It needs more work but I'll leave that for now though and start getting the UI back together and working.
×
×
  • Create New...