Giter Site home page Giter Site logo

mechalabs3dmoto's Introduction

project175

Requirements:

Node.js
VS Code , 
Blender ,  Blender to Web

Resources:

Flying Apartment Asset
React Three Fiber: Three.js Renderer
Drei: React Three Fiber Helpers
Three.js: 3D Engine
Vite: Static Web Server
CodeSandbox: Online Prototyping Container (optional)

Installation

npm install

Getting Started

Open a model in Blender you want to publish (places like CG Trader are a good start)
Export to public/model.glb

open a terminal to /src directory
run npx gltfjsx ../public/model.glb
rename the new Model.js to Model.jsx
run npm run dev from terminal
look at what you did, tune and repeat

Scripts

npm run dev npm run build npm run preview npm run sandbox

detailed notes for Blender -> Web3D Models

Import your model 
Models CAN be created progmatically if that makes sense to do.
Models can come from multiple files
test things with gltf export NOT glb
Split parts
    by whats separate
    by materials
    select faces + more technique
Reduce geometry
    Remove unnecessary components for 3d printing
    highlight and dissolve unnecessary vertices
    limited dissolve intricate parts
join parts and set origins logically for use later
rename parts to what's easy to recognize
parent objects based on what needs to move together
add materials (detailed separately)
add lights (detailed separately)

Materials

Materials in Blender
UVs
    bulk script on Gist
GLTF export materials
BSDF Material
Baking Materials
Materials in R3F
    Special materials
    Cloning
    Modifying
    Unique capabilities

Lighting

more lights == slower performance
use '-s' in gltfjsx transform
    include drei Instances if using -i
add these properties to each light: castShadow shadow-mapSize={[2048, 2048]} shadow-bias={-.0000001} in Model.jsx
adjust intensity values and shadow-bias
add castShadow receiveShadow to instance Merged tag in Model.jsx

Animating

useFrame lerp https://medium.com/@zmommaerts/animate-a-camera-in-react-three-fiber-7398326dad5d
Theater js https://www.theatrejs.com/
useAnimations:
    naming is everything!
    NLA tracks are a pain
    can group virtually
    onClick interactions
    play forward and backward.
Spring https:/docs.pmnd.rs/react-three-fiber/tutorials/using-with-react-spring
Drei Animations

mechalabs3dmoto's People

Contributors

mykethearchangel avatar

Stargazers

Mechalabs llc avatar  avatar Sunburst Communications Ltd. avatar Patrick Danilo avatar  avatar  avatar Rorschach dude avatar cyberBecka avatar

Watchers

 avatar Sunburst Communications Ltd. avatar Mechalabs llc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.