Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to evaluate on r3f, three r153 #7

Open
mokargas opened this issue Jun 24, 2023 · 3 comments
Open

Trying to evaluate on r3f, three r153 #7

mokargas opened this issue Jun 24, 2023 · 3 comments

Comments

@mokargas
Copy link

I'm not sure if I'm using this naively or is a bona-fide issue.

I have the following very basic component

import * as OpenVDB from 'openvdb/three'
export const lights = {
  useAmbientLights: 0b100000, // 1
  usePointLights: 0b010000, // 2
  useDirectionalLights: 0b001000, // 4
  useSpotLights: 0b000100, // 8
  useHemisphereLights: 0b000010, // 16
  useEnvironment: 0b000001 // 32
}
function FogVolume() {
  const fogVolume = new OpenVDB.FogVolume(
    new OpenVDB.CloudVolume({
      height: 0.2,
      density: 0.3
    }),
    {
      resolution: 100,
      progressive: true,
      steps: 100,
      absorbance: 1,
      baseColor: 0x000000,
      lights: lights.useEnvironment | lights.useDirectionalLights,
      densityCutoff: 0
    }
  )
  fogVolume.scale.setScalar(1.0)

  return (
    <group dispose={null}>
      <primitive object={fogVolume} />
    </group>
  )
}

export default FogVolume

It's simply a clone of the cloud volume in the aircraft example. However, this appears to freeze my scene and I recieve a warning (not an error): THREE.Material: '_uniforms' is not a property of THREE.MeshBasicMaterial. I'm using version 0.3.0, along with Three r153 and r3f 8.13.3

Any ideas?

@mokargas
Copy link
Author

Going to close this issue. It turns out the bloom post-processing I was using doesn't play nice with the fog volume density.

@mjurczyk
Copy link
Owner

It turns out the bloom post-processing I was using doesn't play nice with the fog volume density.

Oh - but that shouldn't be happening. Are you using the pmndrs postprocessing bloom or the default one?

@mjurczyk mjurczyk reopened this Jun 25, 2023
@mokargas
Copy link
Author

mokargas commented Jul 3, 2023

@mjurczyk The pmndrs bloom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants