klepto2 Posted July 25 Share Posted July 25 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 4 1 Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
Josh Posted July 25 Share Posted July 25 Wow, this is amazing. It's not using a compute shader anymore? The integration seems so simple. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
klepto2 Posted July 25 Author Share Posted July 25 No, this one is just a simple one. It is more or less the code from shadertoys ocean. Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
klepto2 Posted July 26 Author Share Posted July 26 12 hours ago, Josh said: Wow, this is amazing. It's not using a compute shader anymore? The integration seems so simple. 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. 1 1 Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
CJO Games Posted July 26 Share Posted July 26 This is awesome! Thanks for sharing here's an image of it in editor with real-time rendering turned on and some basic settings... 2 Quote Link to comment Share on other sites More sharing options...
klepto2 Posted July 27 Author Share Posted July 27 Small update to get it working with the latest shadow (bindless textures) update: water_addon_poc_097_02.zip Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
PythonCode Posted July 29 Share Posted July 29 using water_addon_poc_097_02.zip I get these errors when I 'enable water' Quote Link to comment Share on other sites More sharing options...
klepto2 Posted July 29 Author Share Posted July 29 if you have unzipped to the engine folder, you need to update the project via the project manager first. 1 Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
PythonCode Posted July 29 Share Posted July 29 Okay that corrected that in the editor. But when running the same scene in play mode i get no water, and some kinda large plane sticking up in the air. Quote Link to comment Share on other sites More sharing options...
klepto2 Posted July 29 Author Share Posted July 29 On 7/25/2024 at 4:27 PM, klepto2 said: Currently this is an Editor-only solution and maps loaded with the water enabled will not replicate the same behaviour at runtime 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. Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
klepto2 Posted July 29 Author Share Posted July 29 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 Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
CJO Games Posted July 29 Share Posted July 29 Hi Klepto, One more for you with a small island, foliage and some simple settings (bloom, ssr etc.). The island is 512 * 512 If its any use to you at all I'm happy to make this map (freely) available. Quote Link to comment Share on other sites More sharing options...
MetalOS Posted August 25 Share Posted August 25 Hello Klepto2, I tried your script to generate an ocean alone, nothing is displayed for me and I do not encounter any errors. Do I need to activate an additional option to activate the water? Quote Link to comment Share on other sites More sharing options...
klepto2 Posted August 27 Author Share Posted August 27 Hi, no I think this is incompatible with the latest version. I will try to fix it tomorrow. Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
Josh Posted August 27 Share Posted August 27 Please don't feel there is any rush to update it for the engine update. There is plenty of content already to promote for this update, and it is no problem to promote about your addon in the next major announcement. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
MetalOS Posted August 27 Share Posted August 27 No worries, nothing is urgent for me. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.