-
Posts
929 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by klepto2
-
If you create a Terrain in the Editor and load a heightmap, the heightfield is generated much to small. It seems, that the imported map is scaled between 0 and 1. Like in Leadwerks i would expect, that if a terrain scale of 100 is set, the imported heightfield should be in the range of 0 to 100. Currently this means, that if you import a heightmap you need to set the scale to 6000 or higher to actually view the heights. When you save those maps and reopen them, the height is correct but the scale is back at 100 again.
-
If i compile and run a program in release, everything is displayed wrong. This ist the start.ultra in release mode. In debug everything works fine. Edit: bug occurs in both (standalone and steam) versions
-
-
After the latest update with the additional 4x4 matrix added to the entityinfo there are 2 errors (the second only if the 1st one is fixed) the meshlayer shaders can't be linked anymore: Failed to link shader: D:/UltraEngine_Projects/Ocean_New/FFT_Ocean/Shaders/MeshLayer/meshlayer.vert D:/UltraEngine_Projects/Ocean_New/FFT_Ocean/Shaders/PBR/PBR.frag Vertex info ----------- 1(51) : warning C7050: "texcoord" might be used before being initialized Fragment info ------------- 27(268) : warning C7024: Unreachable statement in switch body 27(393) : warning C7024: Unreachable statement in switch body 29(160) : warning C7050: "d" might be used before being initialized Link info --------- error: "emissioncolor" not declared as input from previous stage Failed to link shader: D:/UltraEngine_Projects/Ocean_New/FFT_Ocean/Shaders/MeshLayer/meshlayer.vert D:/UltraEngine_Projects/Ocean_New/FFT_Ocean/Shaders/PBR/PBR_Masked.frag Vertex info ----------- 1(51) : warning C7050: "texcoord" might be used before being initialized Fragment info ------------- 0(3) : warning C7508: extension GOOGLE_include_directive not supported 27(268) : warning C7024: Unreachable statement in switch body 27(393) : warning C7024: Unreachable statement in switch body 29(160) : warning C7050: "d" might be used before being initialized Link info --------- error: "emissioncolor" not declared as input from previous stage Can be solved by adding: layout(location = 12) flat out vec3 emissioncolor; to the Vertex.glsl under Shaders/Meshlayer After the first issue, might be due to wrong solution to the first bug, the meshlayer rendering is not working correctly anymore The layers are only drawn at one side of the terrain:
-
It seams so
-
I ran the exe myself and I encounter the same bug as Dreikblack. I modified the source to display the memory usage like the Process Explorer does. #include "UltraEngine.h" using namespace UltraEngine; SIZE_T PrintMemoryInfo() { auto myHandle = GetCurrentProcess(); //to fill in the process' memory usage details PROCESS_MEMORY_COUNTERS pmc; //return the usage (bytes), if I may if (GetProcessMemoryInfo(myHandle, &pmc, sizeof(pmc))) return(pmc.WorkingSetSize); else return 0; } 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 framebuffer = CreateFramebuffer(window); auto world = CreateWorld(); world->RecordStats(true); auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetFov(70); camera->Move(0, 2, -8); auto ground = CreateBox(world, 20, 1, 20); ground->SetPosition(0, -0.5, 0); ground->SetColor(0, 1, 0); vector<shared_ptr<PointLight>> lights; for (int i = -10; i < 10; i++) { auto light = CreatePointLight(world); lights.push_back(light); light->SetPosition(i, 0, 0); } //Main loop while (window->Closed() == false and window->KeyHit(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer, false); window->SetText("FPS: " + String(world->renderstats.framerate) + " RAM: " + WString(GetMemoryUsage() / 1024) + " MEM: " + String(PrintMemoryInfo() / 1024) + " kb"); } return 0; } Some notes i have found so far: GetMemoryUsage displays just the heap memory while the PrintMemoryInfo shows the whole RAM occupied by the app. In this case the heap stays the same (around 12MB) while the total RAM increases. While the RAM growth, the FPS slows down (at least over time, at the start i get around 1000fps, after a few minutes it drops to 600 and keeps dropping). Also: When no lights are in the scene, both the heap and total ram is stable.
-
Of course, but what does the call of an ultraengine method have to do with the lua index? if i get the index 0 from the posteffect, then i should use that as a parameter in the SetUniform. This isn't a lua table, shouldn't it work the same way as in cpp?
-
They are there, but using the new SetUniform leads to crash to desktop (tested only within the editor). using SetUniform for eg: Vec4 types leads to index out of range errors.
-
Now the behaviour is back to the original one Meshlayers are rendered on top of everything transparent.
-
Ok, a very small and basic component: (currently lua only, but for those with cpp it should be easy to replicate it in cpp) This is simple component, more or less replicating the setup of the waterplane like in the editor. Just attach it to any object (normally the camera) and it should work in lua apps as well. Keep in mind to enable SSR to get transparancy effects and coastal foam. Components.zip
-
As said, i am working on a way to get it into the actual rendering pipline as well, but this will take some time. In the meantime this is just for the editor.
-
While camera:SetUniform is exposed, it doesn't work correctly. for textures i get no matching overload found and the other SetUniforms throw some index out of range errors (in cpp it both works) fft.showTexturePFX = LoadPostEffect("Shaders/Ocean/effect/display.fx") fft.testTexture = LoadTexture("Materials/water_foam.dds") for k,v in pairs(program.world:GetEntities()) do local c = Camera(v) if c ~= nil then local index = c:AddPostEffect(fft.showTexturePFX) c:SetUniform(index,"display_texture", fft.testTexture) c:SetUniform(index,"color_mask", Vec4(1.0,0.0,1.0,1.0)) end end
-
I might had have a small error while porting the RenderLightingto the VolumetricLighting code. After revisiting it, it works now as intendend:
-
Yeah, noticed it as well after posting it I somehow mixed up camera:SetUniform with posteffect:SetUniform. and the camera:SetUniform is there.
-
-
if you have unzipped to the engine folder, you need to update the project via the project manager first.
-
Small update to get it working with the latest shadow (bindless textures) update: water_addon_poc_097_02.zip
-
In the previous builds it was possible to use the Lighting code in posteffect shaders. This seems to be broken now. I have replaced the code in my Volumetric shader code to reflect the changes to the Lighting pipeline, but the uvec2 of the shadow maps are 0. If you need more info i can give you the shader code.
-
While making this I encountered a rendering bug with Meshlayers (i don't know if it is intendend, but it looks weired to me) For demonstration i use the Nature DLS, but it works with any MeshLayer. The red circles shows an instance of the mesh layer and you see, that it is rendered on top. the green circle shows a manuallly added mesh of the same type as the mesh layer and is correctly displayed. Maybe the solution is simple. It would be great if transparancy would also work with meshlayers. otherwise glass and other materials might be in trouble.
-
Hi, while normally working with the cpp version, i was often using lua lately to try things out. Unfortunatly i have found out, that some essential stuff is missing from lua: PostEffect: only LoadPostEffect is available no other class member except Asset and Object ones are available Material: Some Set and get Values are missing like: SetBackfaceculling SetDepthTest SetDepthMask and maybe some other tableplusplus Can't create a table without loading a dummy one Entity properties is available, but always nil in the lua context in the editor trying to save a gameobject in map which has properties set like: entity.properties = {}; entity.properties["table"] = a leads to an error that userdata needs to be a cpp table. some more might be missing Camera SetRefraction is missing Getters for each settting should be available (same for cpp) only 2 are available
-
Now a more detailed answer: My goal is still the usage of fft and computeshaders (as it is state of the art), but to get it working in the editor much more hast to be exposed to lua (more or less the whole OpenGL commands and some internals like the Addcommand of the graphicsengine). This addon is just an idea on how to manage custom effects/meshes and brushes in the editor, so later the app can use them in the real app. Currently i am aiming for a kind of hybrid: In the editor the simple (but already nice looking) waterplane is showed. In the cpp side i will add a component and a function to check for the waterplane in the map and replicate the same which was done in the editor script, but optionally with full fft, transparancy and buoyancy support.
-
No, this one is just a simple one. It is more or less the code from shadertoys ocean.
-
This is a small proove of concept to test out the current abilities to write addons for the UltraEngine-Editor. As many of you know i am working a lot with techniques to render water or atmospheric effects. And i want to make them available to the public when the time is right This small addon adds an optional waterplane to the Editor. It uses a projected grid to simulate the infinte plane and some shader code (wave codeis borrowed from shadertoy) to visualize the water surface. To install the addon extract the content of the zip file (you will find it at the end of this post) to your UltraEngine installation folder. After that you can restart the editor and you will notice a new menuitem under the "Scripting" menu which enables or disables the waterplane, but before you can use it, you need to update your project via the Project Manager to get the needed shaders, models and materials. After that you should be able to use the menu to toggle the water plane on and off. To alter the visuals of the water you need to alter the "ocean_settings.glsl" file found under "Shaders/Ocean/" in your current project. The height of the water_plane is altered by altering the y-component of the position property of the water_plane scene object. Known issues: To fully remove the waterplane after toggling it off, you need to remove the scene object (named water_plane) as well. Currently this is an Editor-only solution and maps loaded with the water enabled will not replicate the same behaviour at runtime the addon registers scene and project changes, but can't see if a new map/scene is created Simply turn the water plane off and then on again to reeanble it The transparancy nature of the used material doesn't work well with the vegetation system as vegetation will always be rendered on top Also alpha blending and foam will only work when SSR is turned on in the editor Without SSR just the water plane without alpha is shown. there is currenlty no refraction, but should be working as soon as Josh brings it back to the editor There is a hidden feature included which adds some kind of realtime rendering to the editor You can enable or disable the realtime rendering under: Tools->Options->Viewports->Realtime rendering changing the name of the scene object is not recommend as otherwise the loading mechanics are not working. Last I want to thank Josh for the amazing work he put into the engine, and also i am looking forward for feedback you guys give to this proove of concept. water_addon_poc_01.zip [Edit] New Version compatible with latest bindless texture update: water_addon_poc_097_02.zip
-
Hi, I am currently experimenting with the Editor scripting capabilities and had an idea how to add simple additional items like in this case a simple animated water plane. The idea is the following: Create a script which adds the functionality to the editor Add a component which is added to the GameObject in the editor which replicates the behaviour done in the editor script and is executed, when the map is actually loaded The prove of concept already works fine: But while implementing the idea i found some missing commands which might be useful: Detailed access to the editor cameras (most important the one from the perspective view) I guess the easiest way would be to expose more functionality from the viewpanel and viewport classes Ability to remove Gameobjects after they are created Currently there is only CreateGameObject, but no RemoveGameObject (or DeleteGameObject) CreateGameObject only adds the object to the root An optional group parameter or path would be a nice to have GameObject in general Ability to add custom properties or groups like Phyiscs Remove default edit groups, eg some extensions don't need Physics or Appeareance settings Ability to draw custom gizmos Add custom icons Ability to trigger an event, when a scene is loaded with the specific gameobject (maybe a type identifier for the gameobject musbe added) General: More access to the underlying Editor classes Currently only a few methods are available and sometimes just the class but nothing else is exposed via lua. More documentation on the editor plugin development (maybe some simple how tos) The scripts you have already created are already a nice starting point, but more in depth samples would be nice Some helper functions would be nice as well Instead of this: extension.game_object:SetSelected(true) extension.game_object:SetName("water_plane") program.sidepanel:SelectItem(2) EmitEvent(EVENT_WIDGETSELECT, program.sidepanel, 2) Maybe something like this: NavigateToSceneBrowser, NavigateToAssetBrowser
-
These are some ideas for the Foliage UI: Like when adding a new Layer, the add variation should allow the selection of multiple files Some values should be set on layer level like ViewRange, lods, collision etc.. These value should be optional overridable per variation, maybe a simple checkbox to enable/disable the settings on the variation level Lod ranges should be in percentage, not in absolute values Why? With percentage the actual lod is dependend from the viewrange For ingame detail settings it might be easier to just adjust the viewrange compared to change the lod -ranges of each variation Some additional idea for foliage and terrain: Like in the WorldSettings it would be nice to save templates for the painting and foliage layers, this make it easier to reuse settings on new maps
- 1 reply
-
- 1