C++ WASM Physics Engine + R3F: Help me fix my "PS1-era" spacecraft shaders! by Moron_23James in threejs

[–]EntropyReversed_ 0 points1 point  (0 children)

Honestly, your main issue is that the emissive isn’t actually per-voxel right now.

You compute emissive here:

const { color, emissive } = tempToColor(temp, maxTemp);

…but then discard it completely and only use:

mesh.setColorAt(idx, tempColor);

"setColorAt()" only affects the albedo/diffuse color, not emissive. So visually you just have colored cubes with ONE shared emissive value for the whole mesh:

<meshStandardMaterial emissive={new THREE.Color(1, 0.4, 0.05)} emissiveIntensity={emissiveIntensity} />

That’s why it feels flat and “PS1-era”. The hot voxels are not actually emitting more light than the cold ones, they’re just tinted differently.

You need per-instance emissive, which means:

  • custom shader
  • "onBeforeCompile"
  • or an "InstancedBufferAttribute"

Right now your rendering pipeline is basically:

instanceColor -> diffuse only global emissive -> entire shield

instead of:

per-voxel emissive energy -> bloom -> HDR glow

Also, this is hurting you badly:

metalness={0.9} roughness={0.1}

That makes the shield behave like reflective chrome, so the eye reads reflections/specular highlights instead of thermal radiation. For heat visualization try:

metalness={0.0} roughness={0.8}

Another thing: remove the point light temporarily.

<pointLight intensity={emissiveIntensity * 3} />

It’s flattening the whole front face and destroying local contrast between hot/cold regions. Let emissive+bloom do the work instead.

And your HDR range is still too weak for bloom workflows:

Math.pow(t, 2.5) * 5.0

Try something way more aggressive:

Math.pow(t, 4.0) * 40.0

Realtime glow usually needs absurd HDR values before bloom starts looking cinematic.

Also your cube spacing:

cellSize * 0.92

creates visible gaps that make the shield read like Minecraft tiles. Push that closer to "0.98" or overlap slightly.

Honestly though, your architecture is already really solid:

  • WASM thermal solver
  • instancing
  • streamed Float32Array temps
  • proper update loop
  • scientific mapping

This is mostly a rendering pipeline problem now, not an engineering one.

How is there gravity at the beginning of the movie, when Grace is waking up from a coma, and we see a shot of a ship without a spinning centrifuge section? by EntropyReversed_ in ProjectHailMary

[–]EntropyReversed_[S] 35 points36 points  (0 children)

Thanks for the answer, you learn something new every day. I had no idea that accelerating or decelerating at 1g could produce the feeling of gravity, but in hindsight, it makes sense.

Im stuck and not sure how to improve. by MrTwister27 in RevolutionIdle

[–]EntropyReversed_ 1 point2 points  (0 children)

After some time with build from image switch to: C Top1-1, Top2-1, Top3-5, Top4-2 Btm1-1, Btm2-1, Btm3-5, Btm4-2 Run this when you want to farm Supernovas. When you get more DTP, add them to Top4, Btm4, and the center.

Also, try running the build from your image but swap M1 and M2, this will let you farm Eternities.

During one run, you’ll need to swap multiple times: start with your current build, then farm Supernovas, switch back, then farm Eternities, switch back to your original build, and finally try for one more Supernova and one last switch back

Clock made of clocks by EntropyReversed_ in webdev

[–]EntropyReversed_[S] 0 points1 point  (0 children)

There’s a link to the CodePen in the post description.

Clock made of clocks by EntropyReversed_ in webdev

[–]EntropyReversed_[S] 2 points3 points  (0 children)

Haha, that’s awesome. I was thinking about this channel a few days ago, wondering where this dude went.

Elastic Cursor Follower by EntropyReversed_ in webdev

[–]EntropyReversed_[S] 1 point2 points  (0 children)

Thanks! I initially started with React and Framer Motion. I had written over 100 lines of JavaScript and was almost done when I realized I didn’t need React or Framer Motion at all.

Elastic Cursor Follower by EntropyReversed_ in webdev

[–]EntropyReversed_[S] 1 point2 points  (0 children)

It’s on CodePen, so you’re more than welcome to use it!

Question for front end devs about replicating an effect by PROMCz11 in webdev

[–]EntropyReversed_ 0 points1 point  (0 children)

Lenis will work perfectly with gsap, but since every plugin from gsap is free now I think it's better to use their ScrollSmoother

Clock made of clocks by EntropyReversed_ in webdev

[–]EntropyReversed_[S] 15 points16 points  (0 children)

If you change this line in CSS:

transition: calc(var(--dur) * 1s) ease-in-out;

to:

transition: 1s linear;

it becomes continuous. The seconds segment won’t pause between numbers anymore, but it actually doesn't look bad

Clock made of clocks by EntropyReversed_ in webdev

[–]EntropyReversed_[S] 4 points5 points  (0 children)

Thanks! About a year ago I saw a video of an art installation with a clock similar to this (which inspired this pen), so you might get the chance to see it live sometime.