BitOfGold Posted November 9, 2016 Share Posted November 9, 2016 So the 3d noise function is from inigo quilez (volumetric clouds):https://www.shadertoy.com/view/XslGRr Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 9, 2016 Author Share Posted November 9, 2016 ooo I bet I can make that work. Quote Link to comment Share on other sites More sharing options...
BitOfGold Posted November 9, 2016 Share Posted November 9, 2016 // https://www.shadertoy.com/view/4sfGzS float iqhash( float n ) { return fract(sin(n)*43758.5453); } float noise( vec3 x ) { // The noise function returns a value in the range -1.0f -> 1.0f vec3 p = floor(x); vec3 f = fract(x); f = f*f*(3.0-2.0*f); float n = p.x + p.y*57.0 + 113.0*p.z; return mix(mix(mix( iqhash(n+0.0 ), iqhash(n+1.0 ),f.x), mix( iqhash(n+57.0 ), iqhash(n+58.0 ),f.x),f.y), mix(mix( iqhash(n+113.0), iqhash(n+114.0),f.x), mix( iqhash(n+170.0), iqhash(n+171.0),f.x),f.y),f.z); } No-texture version from the comments Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 9, 2016 Author Share Posted November 9, 2016 http://www.babylonjs.com/cyos/#14WKFU#10 well that does not really produce a scatter map though... so Im confused, I think ill use my noise functions for a lot of the texture sample noise that people do. BitOfGold 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 9, 2016 Author Share Posted November 9, 2016 http://www.babylonjs.com/cyos/#14WKFU#11http://www.babylonjs.com/cyos/#14WKFU#12 here is a noise return that meets what I would expect that cloud function to require. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 9, 2016 Author Share Posted November 9, 2016 float map (in vec3 p, int steps){ vec3 q = p - vec3(0.0,0.1,1.0)*time; float f; float dim = dimVal; float stm = 2.; float sts = 0.1; f = dim*pNoise( q ); q = q*stm; dim*=0.5; stm+=sts; for(int i = 0; i < steps - 1; i++, stm+=sts, dim*=0.5){ f += dim*pNoise( q ); q = q*stm; } f += dim*pNoise( q ); return clamp( 1.5 - p.y - 2.0 + 1.75*f, 0.0, 1.0 ); } and i dont know we he defined 5 different map functions... here they are wrapped into 1. Quote Link to comment Share on other sites More sharing options...
BitOfGold Posted November 9, 2016 Share Posted November 9, 2016 It's getting better:http://www.babylonjs.com/cyos/#1L6DHU#10 Pryme8 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 9, 2016 Author Share Posted November 9, 2016 thats looking great. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 9, 2016 Author Share Posted November 9, 2016 http://www.babylonjs.com/cyos/#14WKFU#14http://www.babylonjs.com/cyos/#14WKFU#15 BitOfGold 1 Quote Link to comment Share on other sites More sharing options...
BitOfGold Posted November 9, 2016 Share Posted November 9, 2016 That is really volumetric... Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 9, 2016 Author Share Posted November 9, 2016 your noise function helped a whole lot! screw mine its way to slow, and it would work only for a single calculation not the amount needed to ray march. Quote Link to comment Share on other sites More sharing options...
BitOfGold Posted November 9, 2016 Share Posted November 9, 2016 With different step counts:http://www.babylonjs.com/cyos/#1L6DHU#13 The problem is still the number of samples and where those samples are. ( This uses 120 steps too. but all steps are in the cloud itself...http://www.babylonjs.com/cyos/#14WKFU#14 ) Just how to combine a few steps of haze and sky colors and a few steps of cloud volume. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 9, 2016 Author Share Posted November 9, 2016 dude I hate the CYOS... I just had the clouds combined with my sky and accidentally hit backspace while not having focus... fASDFHJKLASDFJKASFAFN Ill have it here again in a min... Quote Link to comment Share on other sites More sharing options...
BitOfGold Posted November 9, 2016 Share Posted November 9, 2016 How to convert this from equirectangular to free-looking sky? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 9, 2016 Author Share Posted November 9, 2016 Ill do it sometime today, Ill make a scene where your sitting on the ground and this is going on above you... maybe set it to some music. I need to take a deep breath and calm down now... Im so mad I had it done and tried to change one setting to just lose it all... but hey I know how i did it so yeah... BitOfGold 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 9, 2016 Author Share Posted November 9, 2016 http://www.babylonjs.com/cyos/#14WKFU#16http://www.babylonjs.com/cyos/#14WKFU#17 I just need to figure out how to fix the stretching now.... Im thinking about writing the camera script as well. BitOfGold 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 9, 2016 Author Share Posted November 9, 2016 http://www.babylonjs.com/cyos/#14WKFU#18 Whabam...http://www.babylonjs.com/cyos/#14WKFU#20 Just need to make the clouds darken now when the sun goes down... should not be hard. then transpose all this to above head and build a scene. we should have something cool! Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 9, 2016 Author Share Posted November 9, 2016 I think for projecting from ground level it will be smart to separate the shaders... Quote Link to comment Share on other sites More sharing options...
BitOfGold Posted November 9, 2016 Share Posted November 9, 2016 You mean above-the-clouds and from-the-ground shader? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 9, 2016 Author Share Posted November 9, 2016 yeah, unless your in the air they need to be separate. Quote Link to comment Share on other sites More sharing options...
Nabroski Posted November 9, 2016 Share Posted November 9, 2016 iqnoise what ? RIP http://www.babylonjs.com/cyos/#1L6DHU#14 Quote Link to comment Share on other sites More sharing options...
Nabroski Posted November 9, 2016 Share Posted November 9, 2016 a very basic implementation of noise or randomness that i like fract sin dot http://www.babylonjs.com/cyos/#PKYRW#2 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 9, 2016 Author Share Posted November 9, 2016 http://www.babylonjs.com/cyos/#5ZKUC#3http://www.babylonjs.com/cyos/#5ZKUC#6 Im waiting for my cliff texture to bake out then Ill do the scene that I was talking about.. but till then heres this for you guys to mess with. I gotta finish up work for a client now so Ill be off for prolly the rest of the day! Peace! BitOfGold 1 Quote Link to comment Share on other sites More sharing options...
Nabroski Posted November 10, 2016 Share Posted November 10, 2016 colors http://www.babylonjs.com/cyos/#N6FUT#2 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 10, 2016 Author Share Posted November 10, 2016 So here is a preview to the new CYOS that I am working on... Should have most of the core stuff done today and we should start being able to add "nodes" for more robust features... The idea is the script will be complied off a node stack and only the functions you need to make the shader work will be included in the shaders and will hopefully be optimized, so not very human readable but hopefully fast. Finishing up nodes for common things like attributes,uniforms, varying and their like wise constructors... Simple functions and procedural nodes and conversion nodes to turn like a black and white input into a normal map ect... Let me know what you guys are thinking its really raw right now and I may eventually do away with using BJS for the shader work, but will have it export specifically for that platform... there is just a lot of BJS stuff I dont need and I could simplify the output with a quick GL program of my own... umm otherwise Ill post updates soon and explain how you can contribute nodes. Im working on the UI system for the wire links now, but I already kinda have that built into mmmPie and it should not be a problem! BitOfGold, NasimiAsl and GameMonetize 3 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.