TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Real-time dreamy Cloudscapes with Volumetric Raymarching

124 pointsby druxover 1 year ago

6 comments

mrsharpobluntoover 1 year ago
Great job explaning the whole process! I&#x27;ve been building some similar stuff recently for my procedural space-exploration side project (<a href="https:&#x2F;&#x2F;www.threads.net&#x2F;@mrsharpoblunto&#x2F;post&#x2F;CufzeNxt9Ol" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.threads.net&#x2F;@mrsharpoblunto&#x2F;post&#x2F;CufzeNxt9Ol</a>). I was planning to do a dev blog post writing a lot of the details up, but yours covers most of the tricks :)<p>A couple of extra things I ended up doing were:<p>1) Using a lower-res texture to modulate the high-res raymarched density, this gives you control over the overall macro shape of the clouds and allows you to transition between LOD better (i.e. as you move from ground level up to space you can lerp between the raymarched renderer &amp; just rendering the low-res 2D texture without any jarring transition.<p>2) Using some atmospheric simulation to colorize the clouds for sunrise&#x2F;sunset. To make this performant I had to build some lookup tables for the atmospheric density at given angles of the sun.<p>3) Altering the step size of the raymarch based on density, I took this from the Horizon Zero Dawn developers where they have a coarse raymarch and as soon as they get a dense enough sample they step back and switch to a higher res step until the density hits zero again.
atum47over 1 year ago
very nice tutorial. If I can make one suggestion is to write the shaders in a GLSL file format (i.e.: .vs, .fs) then just get the text value from it; that way you can get your editor to highlight the GSLS syntax, which is pretty helpful when dealing with complex shaders.<p>this not, by any means, the best way of doing it, but I felt it was a bit easier writing GLSL code.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;victorqribeiro&#x2F;3Dengine&#x2F;blob&#x2F;master&#x2F;js&#x2F;ShaderProgram.js">https:&#x2F;&#x2F;github.com&#x2F;victorqribeiro&#x2F;3Dengine&#x2F;blob&#x2F;master&#x2F;js&#x2F;Sh...</a>
评论 #38089416 未加载
kelseyfrogover 1 year ago
The hand tuned magic numbers are disconcerting[1]. Couldn&#x27;t the spectral distribution be derived from real-world cloud data?<p>1. yes I know it&#x27;s common practice.
miohtamaover 1 year ago
This was the best post on Hacker News in 2023.<p>- Technical<p>- Beautiful<p>- In-depth<p>- Well written<p>- With passion
评论 #38099368 未加载
Waterluvianover 1 year ago
I know of raycasting, raytracing, and now raymarching. Are these just attempts to find unique names for “doing something by projecting rays” or do they in some way I can’t see effectively and uniquely describe each technique?
评论 #38093703 未加载
WhitneyLandover 1 year ago
Beautiful. Nice work Maxime.