Jump to content

Prove of concept: Water plane in Editor


 Share

Recommended Posts

image.thumb.png.ea9342694348a2cd9775e132a6ab4012.png

 

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

 

  • Like 4
  • Windows 10 Pro 64-Bit-Version
  • NVIDIA Geforce 1080 TI
Link to comment
Share on other sites

Wow, this is amazing. It's not using a compute shader anymore? The integration seems so simple.

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

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.

 

  • Like 1
  • Upvote 1
  • Windows 10 Pro 64-Bit-Version
  • NVIDIA Geforce 1080 TI
Link to comment
Share on other sites

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.

  • Windows 10 Pro 64-Bit-Version
  • NVIDIA Geforce 1080 TI
Link to comment
Share on other sites

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

  • Windows 10 Pro 64-Bit-Version
  • NVIDIA Geforce 1080 TI
Link to comment
Share on other sites

  • 4 weeks later...

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.

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...