Jump to content
  • Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

849 Good

About Ryokeen

  • Rank

Personal Information

  • Role
  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Ryokeen

    AVX2 support in Visual Studio

    As a sidenote, i would not recommend to rely on the automatic vectorization of compilers. I did a bunch of test with various ones, gcc, g++, MSVC2015, MSVC2017(default and clang toolchain) and yes it does work, buuut breaks quite easily. So if you want to have that for speed, you should use intrinsics. Also, at least MSVC generated several codepaths with cpuid checks but only on the auto vectorized code.
  2. Any chance on some new papers ? Would like to read about the improvements you made, sadly can't be there.
  3. Ryokeen

    UV map blocky voxel models

    What comes to my mind is the following: http://vcg.isti.cnr.it/volume-encoded-uv-maps/ I've not rly looked into it myself but from a quick glimpse it might be something
  4. @ChenA I'm not sure how they even got the shape working. I get at best some very diffuse unshapeable cloud areas with their Remap approach. That's why i'm still sticking to my own way. For the top view, i have to change the shader a bit for that to work, since i optimized the cloud layer to be always above the camera. Makes more sense in Earth Special Forces (players there don't get that high). Will do that when i have time on weekend
  5. With the height from the weatherdata i compute the fade_in/fade_out values very similiar to how they do it in the article.   Then somewhere i have lCoverage = 1.0-cloudType.r*fade_out*fade_in; Where clodeType is the weatherdata at the current sample position. Try just the same you did for the cloudtops at a smaller heightscale for the bottom, that should help a lot. Also i scale the final cloud value by fade_in to make it a bit smoother
  6. Yep it is expensive, around 1.4-2.1ms on a gtx970 @1/16th FullHD resolution. Optimisations so far, early out on high opacity, no expensive calclation on coverage  == 0 , and no full quality light-samples on opacity > 60% and a carefully tweaked scale. Thought on a signed distance field aswell, but that eliminates the nice property of realtime coverage/shape changes
  7. Whups, typo there base_cloud = base_cloud - high_freq_noise*(1.0-base_cloud); and coverage = 1.0-coverage*height_fade; //from 1 where the fadeout starts to 0 where it ends I invert the coverage because want remaining "vapor bubbles" as the cloud source
  8. Thx for the project. Yeah the formular is just try and error.  The idea was to think of the base noise as a form of heat/cloud bubbles. Then apply some threshold(the coverage) to it. Rescale it to 0..1 range with a steep slope. Invert it and use that as a final coveragemask. Then simply some CSG to build the final cloud volume.
  9. Thank you, that would be nice.
  10. rgba8 should be enough precision. After all it's just a simple density value. For the base detail, you can play araound with the scaling. My clouds start at around 1,8km in height and have a scaling of 68m per texel. The detail noise got a 16 times higher scaling. For remapping i use a weird calculation. float4 noise = tex3Dlod(WorleyCloud,float4(pos,0.0)); float mask = (noise.r*0.6+noise.g*0.8+noise.b+noise.a*0.6)/3.0; float denom = 1.0/(coverage*0.25+0.0001); float lcov = 1.0-saturate((mask - coverage)*denom); float4 n = saturate((noise-lcov)/(1.0001-lcov)); float cloud = saturate(max(n.x*1.1,max(n.y*1.14,max(n.z*1.13,n.w*1.12)))); That's what i use to sample the volume texture   Btw @ChenA where did you find a tiling 3D perlin noise ?
  11. From my experiments the way you combine the base noise octaves have the most impact on how detailed the clouds are. But well i'm not using perlin-worley , just worley noise with 3 octaves per channel with a size of 123^3.   So the way i combine them is totally different from what they do, some kind of fbm+inbetween remapping with coverage. And ofc the powder effect adds a lot.   For the cloud top, think the main difference is, i don't modify the density of the clouds with the height signal, but modify the coverage. Then sure, the smaller high frequency noise adds the very fine detail and is applied like that base_cloud = base_cloud * high_freq_noise *(1.0-base_cloud); You see i simply assume that an edge is where the cloud got a density below 1
  12. Excactly, along with some code to make it look as needed. Also notice i only use coverage and coudtype(rg) as i don't need that fine control, but still want a "random" look all over the map
  13. For mapping the weather texture i use as simple planar projektion, or more xy position of the samplepos with some scaling and wind offset. Works quite well as long as the curvature of you cloudsphere is small. As i said i use a ray-sphere intersection as the starting point, but with a quite big sphere wich is centered in xy at the camera's position and at a height so that above the cam the clouds start at the height you want.   For the weathertexture what you can try out, is using 2 premade tiling perlin noise textures(different noise in r,g,b,a) , scroll them, combine them and in my case apply a global coverage value to it(remapping with some exp magic). It gives changing patterns , you have a global coverage value and as a result also local covarage values.   float t = 255.0-min(255.0,(inCoverage*255.0));//inCoverage is a global coverage value float c = max(0.0,cloud_sampled*255.0-t);//some remapping i found somewhere years ago float cld_cov = 1.0-saturate(pow(0.99325,c));//exponent contolls sharpness of the result(higher, more soft) That's what i use to remap the combines perlin noises to build a cheap but animated weathertexture     Right Top image shows the weather texture. As you see it's quite simple but works.   For a more realistic outcome it could also be possible to use some texture just as a "heat and vapor" source and let a cellular automata evolve some nice shapes out of it. But yeah as a start, don't worry too much about the weather texture as simple perlin noise textures work good for a beginning.
  14. i kind of coded clouds similar to theirs(well based on their noise texture ideas), so the mapping is done by raymarching through the 3d noise texture and doing the density, coverage,refinement and lighting on each of the raymarch sample. You can start raymarching by intersecting a lower cloud "plane" with the eye-vector at a pixel, then you march in steps and do your calculations. Later on you can do an intersection with a sphere around your map so you get a nice curvature at the horizon. So reading up on raymarching and volume rendering is a good idea.   About how one could generate the weather texture, that's something i need ideas for aswell. You could precompute/prepaint some weather textures for a single cloud. Then based on the weather you want, pack some of the premade textures in a fbo, add some magic and use that in the final raymarch shader.   The cloud shape depends a lot on the baked 3D noise texture and how you combine it later on. I mean you have 4 channels with different octaves and only need a float density value. For me it was a lot of experimenting.
  15. From what i remember at least some of those blending functions assume Z to point upwards, means they work in tangentspace. So they blend normalmaps, not normals. Also i don't get why you want to blend the mesh normal with a normalmap converted to worldspace via TBN since the TBN orients tangentspace-normalmaps to your mesh. To me it looks like you get kind of double oriented normals.   I used the partial derivate function to add some additional detail, but i blended it in tangentspace and then converted the resulting normal to worldspace via TBN.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!