Greyfang Posted April 27, 2016 Share Posted April 27, 2016 I am new to Leadwerks ... previous experience includes GameGuru, (a bit of) Unity, 3D GameStudio, GameCore ... So far I am having a lot of fun and have started to really appreciate some aspects of the Leadwerks workflow. While I am currently only doing some "learning by playing", I have hit one stumbling block ... water. I have searched the forum and have found a number of different posts, some of them include links to prefabs (link doesn't work). There is also a post that refers to the use of a plane to do water. But where can I find a definitive "guide" for creating water in Leadwerks ? Do I need to create a "block" and assign it a material with the water shader ? Or does it need to be a plane ? Cheers, Greyfang Quote Link to comment Share on other sites More sharing options...
Undac Posted April 27, 2016 Share Posted April 27, 2016 scene -> root -> water mode -> true http://i.imgur.com/Jt2l14h.png for c++ World::SetWaterMode(bool); World::SetWaterHeight(float); World::SetWaterColor(float r, float g, float v, float alpha); Quote Link to comment Share on other sites More sharing options...
cassius Posted April 27, 2016 Share Posted April 27, 2016 Set the water level higher than the terrain then use sulpt tool to bring up terrain above water level to make pools, lakes,rivers. All in the editor . Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
Greyfang Posted April 27, 2016 Author Share Posted April 27, 2016 Oh ... duh ... thanks for that ... So I gather from the way it is done, that you can not have a "pool of water" (e.g. in a building) ... But is the method of using a prefab still realistic and possible ? And would I then assign the watershader an object I create ? Oh well, time to play around some more Quote Link to comment Share on other sites More sharing options...
cassius Posted April 27, 2016 Share Posted April 27, 2016 Its possible for the ground floor of a building to be covered in water. Just adjust the level if you want an indoor swimming pool then some other method is needed.. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
Greyfang Posted April 28, 2016 Author Share Posted April 28, 2016 if you want an indoor swimming pool then some other method is needed.. I understand that ... now the question is: what other method is recommended ... Also, the "normal" water level looks nice enough, until you walk into in (and submerge yourself) ... there is apparently no "underwater shader" aktiv and also no buoyancy ... is that a design limitation ? I remember working with GameCore and there was buoyancy there (which was fun, just throwing barrels into the water ... such are the pleasures of a simple mind ) Cheers, Greyfang Quote Link to comment Share on other sites More sharing options...
Thirsty Panther Posted April 28, 2016 Share Posted April 28, 2016 There is an underwater shader in the Workshop. http://www.leadwerks.com/werkspace/page/viewitem?fileid=256268930 Welcome. Quote Link to comment Share on other sites More sharing options...
Greyfang Posted April 28, 2016 Author Share Posted April 28, 2016 Thanks for pointing me in the right direction ... will have to play with that (after work). Although I have used shaders before, they are still a mystery to me ... sometimes, I think they are pure magic ... Cheers, Greyfang Quote Link to comment Share on other sites More sharing options...
Greyfang Posted April 28, 2016 Author Share Posted April 28, 2016 OK ... got the underwater shader to work for the "global water plane" ... looks really good to. How would I need to go about assigning that shader to a block (either CSG or modelled in Blender), so I could "fill" a pool, which is located ABOVE the "global water plane" .... I've tried using the shader on a material, but that didn't seem to work (it certainly didn't look like water). Cheers, Greyfang 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.