You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a strange clipping on casted shadows with Splats. This appears in my scene on specific camera angles. There is a Splat component and a transparent floor with ShadowMaterial. Also tried with ContactShadows component but got same results.
This only appears when i the Splat component is visible. Tried with other splats as well and got the same result.
Also tried to implement it with mkkellogg GaussianSplats3D dropinviewer. Same problem.
Have you already had this problem ? Is is a Shader issue ? Tried everything without success.
thanks 🙏
clipping_example_2.mov
Here is actual code tests:
`
import { Canvas } from "@react-three/fiber";
import { useRef, useState, useEffect } from "react";
import { SplatsView } from "./SplatsView";
import {
Box,
OrbitControls,
SoftShadows,
ContactShadows,
Splat,
} from "@react-three/drei";
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader";
import { useLoader } from "@react-three/fiber";
import "./App.css";
export default function Scene() {
const gltf = useLoader(GLTFLoader, "/models/ORIANA_FLAVIA_03.gltf");
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
I have a strange clipping on casted shadows with Splats. This appears in my scene on specific camera angles. There is a Splat component and a transparent floor with ShadowMaterial. Also tried with ContactShadows component but got same results.
This only appears when i the Splat component is visible. Tried with other splats as well and got the same result.
Also tried to implement it with mkkellogg GaussianSplats3D dropinviewer. Same problem.
Have you already had this problem ? Is is a Shader issue ? Tried everything without success.
thanks 🙏
clipping_example_2.mov
Here is actual code tests:
`
import { Canvas } from "@react-three/fiber";
import { useRef, useState, useEffect } from "react";
import { SplatsView } from "./SplatsView";
import {
Box,
OrbitControls,
SoftShadows,
ContactShadows,
Splat,
} from "@react-three/drei";
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader";
import { useLoader } from "@react-three/fiber";
import "./App.css";
export default function Scene() {
const gltf = useLoader(GLTFLoader, "/models/ORIANA_FLAVIA_03.gltf");
// Traverse the GLTF model and enable shadows
useEffect(() => {
console.log("gltf", gltf);
if (gltf) {
gltf.scene.traverse((child) => {
if (child.isMesh) {
child.castShadow = true; // Enable casting shadows
child.receiveShadow = true; // Enable receiving shadows (if needed)
}
});
}
}, [gltf]);
return (
<Canvas shadows camera={{ near: 0.01, far: 1000 }}>
<directionalLight
castShadow
position={[1.5, 8, 5]}
intensity={2.5}
shadow-mapSize={1024}
>
<orthographicCamera
attach="shadow-camera"
args={[-10, 10, -10, 10, 0.1, 50]}
/>
);
}
`
Beta Was this translation helpful? Give feedback.
All reactions