0

I'm working with the GLTF model and react-three/drei's Trail component and I just want to change the Trail effect to a smoke similar to the Cloud component.

My Model component

import { Float, Trail, useGLTF } from "@react-three/drei";
import { editable } from "@theatre/r3f";
import { useRef } from "react";

export function Model(props) {
    const { nodes, materials } = useGLTF("/model.glb");
    const ref = useRef();

    return (
        <Float rotationIntensity={1} floatingRange={[-0.1, 0.1]} speed={0.5}>
            <editable.group {...props} dispose={null}>
                <Trail
                    color={"#D8D8D8"}
                    width={0.5}
                    length={8}
                    interval={6}
                    decay={4}
                    opacity={0.1}
                >
                    <mesh
                        castShadow
                        receiveShadow
                        geometry={nodes.Plane.geometry}
                        material={nodes.Plane.material}
                        position={[540, 60.485, 45.909]}
                        ref={ref}
                    />
                    <meshLineMaterial color={"#D8D8D8"} transparent />
                </Trail>
                <Trail
                    color={"#D8D8D8"}
                    width={0.5}
                    length={8}
                    interval={6}
                    decay={4}
                    opacity={0.1}
                >
                    <mesh
                        castShadow
                        receiveShadow
                        geometry={nodes.Plane001.geometry}
                        material={nodes.Plane001.material}
                        position={[540, 60.443, -45.403]}
                    />
                    <meshLineMaterial color={"#D8D8D8"} transparent />
                </Trail>
                <mesh
                    castShadow
                    receiveShadow
                    geometry={nodes.body001.geometry}
                    material={materials.body}
                />
                <mesh
                    castShadow
                    receiveShadow
                    geometry={nodes.glas001.geometry}
                    material={materials.glas}
                />
            </editable.group>
        </Float>
    );
}

useGLTF.preload("/model.glb");

In short, I would like to turn this trail effect into a realistic airplane smoke trail, is that possible? Thank you!

Gugu72
  • 2,052
  • 13
  • 35
iozkan
  • 1
  • 1

0 Answers0