Community asset pack

MegalomaniakMegalomaniak Posts: 304Member
edited September 2016 in Projects
Are there any fellow godot users in here who might be interested in collaborating on developing a general purpose asset pack for godot?

What I mean by this is a whole pack of scripts, shaders - both shaderGraphs and coded, and generic models i.e. the sort of things likely to be useful for everyone.
Might as well in future expand to include different scenes for different player controller models, be they first person, third person, driving, flying. etc.

Don't know if any of you are interested in collaborating but I'm inclined to do this any-way's so might as well show what I'm currently working on.
Personally I'm currently working on a water shader purely out of my own practical interest but I recon that this will be of interest to at least some of you as well.
Looks way better if you actually see the movement of the wave/ripples.

At this point the greatest challenge is getting renderTargets for both planar reflection(easier) and refraction(harder - need to render it without the water object visible)
Tagged:

Tags :

Comments

  • The_DuskittyThe_Duskitty Posts: 30Member
    I'd like to Buuuuut<br /><br />I only do 2D stuff and pixel art :l So im not much use for this XD Unless you wanna make some 2D asset packs
  • MegalomaniakMegalomaniak Posts: 304Member
    I don't see why it has to be 3D only. I will likely be primarily contributing 3D related assets, but 2D textures are inevitably still going to be 2D textures, for an example.<br />
  • BishopBishop Posts: 176Member
    When will be the time I create something :), some assets ::)
  • beelzybeelzy Posts: 42Member
    I have a few gradient shaders and outlines, but they're mostly for 2D. No idea if they work in 3D at all.
  • MegalomaniakMegalomaniak Posts: 304Member
    godotwater_wip2.png<br />Hmm-progress, maybe? Tone-mapping's exposure was left low, though.<br />edit: better and bigger image.<br /><br />
    on 1459383919:
    <br />I have a few gradient shaders and outlines, but they're mostly for 2D. No idea if they work in 3D at all.
    <br /><br />Post 'em & we'll test 'em. ;D
  • MegalomaniakMegalomaniak Posts: 304Member
    [size=14pt]Release early, release often the mantra says...[/size]
    <br /><br />
    watershader_wip3_preview.png<br />[size=8pt]Click Image to view larger.[/size]
    <br /><br />So be it then, that I shall include the WIP version with this post. I haven't tested it in other lighting situations yet(just 1 directional and one animated point light), however so YMMV, as they say. :-[<br /><br />
    watershader_wip3.png<br />[size=8pt]Heh, it was way more insane earlier, but I cleaned it up a 'little'[/size]
    <br /><br />Oh, yeah, and here's the normal map:<br />generic_water.png<br /><br />Consider the whole shader MIT licensed.<br />Normal map is just CC-BY 4.0 International.
  • toger5toger5 Posts: 40Member
    Wow this looks great.<br />I'm impressed what is possible with shaders also if people always complain about the improvable 3D rendering of Godot.
  • MegalomaniakMegalomaniak Posts: 304Member
    on 1459946989:
    <br />Wow this looks great.<br />I'm impressed what is possible with shaders also if people always complain about the improvable 3D rendering of Godot.<br />
    <br /><br />Oh, there always a lot to 'criticize' so long as it's constructive, but pointless complaint's are just a waste of everyone's time. So don't expect much from me on that note too soon, I'm still figuring this engine out. 8)<br /><br />Would love to know when(if) you test the shader out. I'm sure there's a lot to be fixed and a lot of issues I haven't even run into yet, so any feed back from others would be great!
  • MegalomaniakMegalomaniak Posts: 304Member
    watershader_wip5_preview.png
    <br /><br />version 0.5!<br />changes since previous:<br />
      <br />[li]moved uv scrolling to vertex program[/li]<br />[li]fixed water refraction:<br />
    watershader_wip5_refraction.png[/li]<br />[li]added vertex displacement[/li]<br /><br /><br />For vertex animation I added an alpha channel to the bump map.<br />Updated version:<br />generic_water.png
  • danjodanjo Posts: 80Member
    Just want to say: This looks amazing! :)
  • toger5toger5 Posts: 40Member
    Looks cool. I like that you implemented a vertex shader.<br />But i think the coloring was better in your last post (there it looked more realistic. Now it is to clean, transparent, blue)<br /><br />I try to get it to work but I'm messing anything up with the uv coords. I just imported a subdivided mesh (for the vertex shader) and added your shader with the texture you posted. But i only get a moving plane :(<br /><br />I will countinue trying and tell you if i found my mistake. But I would appreciate if you have got a tip.
  • MegalomaniakMegalomaniak Posts: 304Member
    on 1460140850:
    <br />I try to get it to work but I'm messing anything up with the uv coords. I just imported a subdivided mesh (for the vertex shader) and added your shader with the texture you posted. But i only get a moving plane :(<br />
    <br />Post for me a screenshot of the shader parameters and lets see if we can figure it out. :)<br /><br />As for quick tips, try tweaking the displacement factor value?
  • toger5toger5 Posts: 40Member
    Here is the picure with my shader settings and how it looks.<br />I only have some lines which are moving. So it seems something is wrong with the normal map or my uv map...<br /><br />shader_Params.jpg<br />
  • MegalomaniakMegalomaniak Posts: 304Member
    Right the UV input is a multiplier. put 1 into uv and 2 into detail for starters. They should be named uv multiplier and detail multiplier, and I'd input 'integers' i.e.1, 2 ,3.<br /> I forgot to rename them after rebuilding the uv/scroller network in the vertex program, in other words totally my mistake. :-X<br /><br />Also, stick a large textured surface underneath it, because I'm not using transparency in there - its a screensample that is warped by the normalmap for the refraction.<br /><br />And the reflection target is supposed to be empty, I put it in so that reflection could be rendered from a companion camera/secondary viewport for planar reflection. It's multiplied over the specular reflection.<br /><br />edit: oh, and:<br />
    watershader_wip6_preview.png
    <br /><br /> ;)
  • toger5toger5 Posts: 40Member
    I now finally get okay results but only If I set speed to: 0.<br />Otherwise there are again only some lines like in the screenshot I posted before.<br />It seems like my the texture isn't repeating so that when the shader moves the UV map for animation It moves the to the area where there is no texture anymore.
  • toger5toger5 Posts: 40Member
    Okay found out what the problem was:<br />you need to make the texture repeating manually. (in the Inspector in the texture settings.)<br />Thought that would be default.<br /><br />So now It works (really good)<br />How can I make the settings so that it looks more like the version 0.3 where the water didn't seemed so clean ?
  • MegalomaniakMegalomaniak Posts: 304Member
    on 1460195876:
    <br />Okay found out what the problem was:<br />you need to make the texture repeating manually. (in the Inspector in the texture settings.)<br />Thought that would be default.
    <br />Yeah, that's a texture import tag/setting. And as such out of my hands afaik.<br /><br />
    on 1460195876:
    <br />So now It works (really good)<br />How can I make the settings so that it looks more like the version 0.3 where the water didn't seemed so clean ?<br />
    <br />I've re-implemented it as absorption color that refraction fades into over distance as you saw in the last screenshot, it's in the next version, but I still have bumpmap depth inversion left to implement before the release, so hopefully will release soon?<br /><br />For the final version 1.0 I will probably release 2 versions of the shader one with all the bumpmap debug options and a lighter version that just has bump map depth/height multiplier, so as to make it lighter.<br /><br />edit: oh and if I may ask, did the shader param's load for you in that order as seen on your screenshot, or did you tweak the order somehow? 'cause mine show up in a totally random order while in your screenshot they were ordered how I'd like for them to be!
  • MegalomaniakMegalomaniak Posts: 304Member
    watershader_wip6_release.png
    <br />Ok, water is colored again, this time by setting absorption color(make it dark-redish) and density(only helps along x & z, I don't have access to depth pass in shader).<br /><br />All that's really left to do is figure out how to set up a secondary camera dynamically through a script and render reflection into real-time render target/texture.<br /><br />This is something I'll likely leave up to the user at this point, because you need to implement it according your own player/camera controller.<br /><br />Just search for planar reflection on google and you'll fine a whole bunch of resources explaining the concept. Once you have the render target captured it's just a matter of over-writing the shader's 'Reflection_Target' texture uniform through the script, at least in theory that's how I tried to set it up.<br /><br />edit:<br />http://forum.godotdevelopers.org/index.php?topic=12024.0 - heres one reflection setup.<br /> - a video of planar reflection set up, english subtitles.<br /><br />https://en.wikipedia.org/wiki/Transformation_matrix#Reflection_2<br />https://en.wikipedia.org/wiki/Affine_transformation<br /><br />edit: removed v0.6 and uploaded a bugfix v0.6a now v0.6b(cleared out the bundled/unexpected internal texture references[wtf godot]).
  • MegalomaniakMegalomaniak Posts: 304Member
    quick post to note there was a bug(bad viewspace offset) in v0.6 refraction if you check the previous post, I've uploaded a bug fix version in there.
  • GeaxleGeaxle Posts: 4Member
    I am very impressed by all this  G: Nice work!<br /><br />Damn, I am such a newb, I have no idea how to make something remotely close to that. Where do you even start learning about shaders? I am starting to think that if I want to do a nice looking atmosphere for my planets this is the way to follow but I have no idea how to start.<br /><br />EDIT: thanks for the below links and explanation (I didn't want to clutter your thread) I'll read about it and start with smaller things first.
  • MegalomaniakMegalomaniak Posts: 304Member
    Yeah, This was my first shader in about ten years tbh...<br /><br />You might need to read up a little on vector math, matrix mutiplication and ring math etc. Not to say that this is absolutely necessary, but it will make your life way easier.<br /><br />Before I started working on this shader I couldn't even make heads or tails of the Shlick's approximation. And the thought of learning the math seemed scary, but at least far as getting a fresnel reflection working, it all turned out to be way easier to figure out than I originally thought.<br /><br />So, I would definitely suggest reading up on some linear algebra & vector math first, even if you don't get it all, just familiarizing yourself with the terms used is a big step towards reading and understanding academic papers and other peoples code, and hey, this will all be useful for much more than just shaders.<br />[size=14pt]<br />But perhaps most important is to realize that you don't really need to get it all at once, just start with some really simple looking shader you can find and start implementing it while searching for the answers you need when you need them online. Learn to research as you go.<br />[/size]<br />Also, in case your memory similarly to mine is fading in regards to math symbols, here's a resource I have found very helpful:<br />http://www.rapidtables.com/math/symbols/Basic_Math_Symbols.htm<br /><br />edit: oh yeah, and I have already started looking into implementing atmospheric scattering/skydome, but I honestly think it's going to be a bigger challenge than a water shader.
  • MegalomaniakMegalomaniak Posts: 304Member
    Especially because Toger5 showed interest in this in the past, I have improved the absorption color, at least I think it's much better:<br />
    watershader_wip65_preview.png
    <br /><br />And here is a shot of the material parameters as I have them set up:<br />
    water_parameters.png
    <br /><br />
  • toger5toger5 Posts: 40Member
    I tested your shader and I really like it now (setup is much easier, I didn't need long to get values which looked good) But I had a hard time getting the light right. Can you give some tips on the light setup.<br />In my point of view your version has much to intense blue values. This makes it looking a bit unrealistic. <br />In this aspect I still prefer the version 0.3 look you uploaded. There you had more variation in the specular areas and the water color was more realistic.<br />But i love the displacement and the distortion of the objects underneath.<br />For everyone who didn't tested it, it looks much better than in the screenshots when you have the shader in godot and can see the animated water.
  • MegalomaniakMegalomaniak Posts: 304Member
    Yes I have at least one tip! In my parameter setup that I showed I set the 'saturation(as in the S in HSV)' high midway(sorry, other way around) to accentuate the water coloring([tt]actually I was re-calibrating my monitor that same day and at certain points the screens colors and brightness might have been a bit off[/tt]), but left the V sort of midway high, the color input as the name indicates is absorbed color/spectral absorption so for more realistic values you might want to absorb linearly.<br /><br />I.E. move the color absorption along not just the 'y' axis of the color selector but also 'x', or in other words diagonally, because the absorption color not only defines the hue & saturation of the spectrum absorbed but also the value/brightness(the amount of light absorbed).<br /><br />Density in the meanwhile controls how far or nearby the transparency fade out is(relative to mesh size). Basically it controls the density of 'biological contaminants'.<br />Think in terms of like say if there's algae in water - they would absorb light refracted through the surface of the water. hope this clears it up somewhat.<br /><br />And don't feel shy asking any questions, one of the very reasons I like to share my assets is precisely because questions and input from others helps me improve these assets not only for others but also for myself! So that's what I get out of it. And vice versa! :)
  • GokudomaticGokudomatic Posts: 70Member
    The idea of a community asset pack is very interesting. I'll see how I can contribute to it.<br /><br />Is there a repository for this pack? How can we upload an asset?
  • MegalomaniakMegalomaniak Posts: 304Member
    Well, I have not set up a repository since so far little interest has been shown, however I'm not sure there's a need for a repository just yet anyhow since a few single assets can likely be handled fine without.<br /><br />As/If this takes of I do think github is likely the best bet, initially however something like dropbox, google drive or the like might be fine IMO. That is to say a file hosting service that keeps your files tied to your account and doesn't just delete them after a while.<br /><br /><br />For starters though, any 3D assets you'd like to see made? Asking for barrels and chests would be fine I suppose however I'd especially prefer request's that can't be already found on opengameart.org. ;)
  • GokudomaticGokudomatic Posts: 70Member
    Repositories have the advantage of versioning. Plus, with github for instance, it is easy for people to send a pull request of their change.<br />However websites like opengameart offer other tools like a preview of the asset.<br /><br />Let's take a concrete example. I took a picture of rocks for a texture and I edited it to make it seamless. There it is:stone1.png<br />I didn't put a licence on it. Well, it's just some random picture of a stonewall. Nothing special.<br /><br />But putting it here in a thread, just like that, is not an option, is it? People expect to preview the asset pack and to download the last version easily. Github offers to download a zip of a repository, on top of cloning it with git. Maybe it's not the best solution but I find it quite good already.<br />However it would be a waste to not use existing solutions to create the pack. For instance, why not sending it to OpenGameArt?
  • MegalomaniakMegalomaniak Posts: 304Member
    on 1462971548:
    <br />However it would be a waste to not use existing solutions to create the pack. For instance, why not sending it to OpenGameArt?<br />
    <br /><br />Yes, that would work for graphics assets however I don't think I've seen any scripts hosted in there and in my mind the purpose of this asset pack would be to have a Godot specific asset pack with everything in one place and licensed clearly, I'm thinking: MIT for scripts/code(I consider purpose built scripts with reuse in mind assets as well, i.e. a player controller), and CC-BY 3.0 for graphical assets, for an example. Thoughts?<br /><br /><br />As for github, yes, as I said I think it's the best way to go long term, however if there's only like 2 models, 4 textures and a shader in it then I'm not sure if it deserves its own repo, yet. As it grows though it definitely will in time.
  • GokudomaticGokudomatic Posts: 70Member
    I'm fine with the licenses. I see your point about the assets. Indeed, if it contains Godot specific files (scripts, scenes), we can't use an existing library website. Therefore, as you suggested, github seems the way to go. <br /><br />But I think the pack should be from the start properly structured. Going from a thread to a repository has a couple of disadvantages. Sure putting all in a thread is easier but that won't attract people. And a community project needs popularity above all. If we starts with a nice and shiny infrastructure, people would be more willing to post their asset. The disadvantage I see with github is that people who just want to post one or two assets (image,audio or script) don't have a one-click way to do it. So, a dedicated thread would still be needed.<br /><br />Another question: who maintains the pack? I can surely contribute by sending assets, but integrating the new assets, building the pack and maintaining it over time is not something I can imagine to do myself.
  • MegalomaniakMegalomaniak Posts: 304Member
    edited September 2016
    version 0.6b_test Download

    Note again that this is just the shadergraph.
    For the texture use a normal map and height map should be in the alpha.
Sign In or Register to comment.