Three.js Realistic Lighting Setup Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 เม.ย. 2020
  • In this video we will learn how to setup lighting and shadow in three.js scene and more your 3D model looks realistic
    Source Code: redstapler.co/threejs-realist...
    3D Model: skfb.ly/JM9u
    === Follow us on ===
    Facebook: / theredstapler
    Website: redstapler.co/
    Twitter: / redstapler_twit
    #ThreeJS #JavaScript #WebDesign
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 63

  • @theman7050
    @theman7050 2 ปีที่แล้ว +2

    The best Three JS channel. Please make more advanced Three JS tutorials. You take us line by line on a great journey :D

  • @Trazynn
    @Trazynn 4 ปีที่แล้ว +23

    This made me realise this could add a lot of value to restaurant websites who want to show their food in 3D but also in the backdrop of their own interior. Like how would you go about blending a physical object, like a cake, sitting on a table, with the camera constrained into one direction but with a little wiggle room and then as a background image of a website?
    Do you see where I'm going with this? These 3D images would create a ton of interactions with visitors which boosts the SEO more than when they merely check the menu. This could be a huge value proposal and maybe even trigger an arms race amongst restaurants who all want this.
    As a freelance designer with too much time on my hands I would love to get my camera, visit each restaurant, 3D scan their food and integrate it into their website.Would be a cool niche to have.

  • @kamaljeetsingh0001
    @kamaljeetsingh0001 4 ปีที่แล้ว +4

    That looks so beautiful 😍

  • @sumanth3036
    @sumanth3036 4 ปีที่แล้ว +1

    The possibilities in web is soooo facinating

  • @RoanRossey
    @RoanRossey 3 ปีที่แล้ว

    Thanks man, nice video! Keep up the good work.

  • @johncreativeproducts5688
    @johncreativeproducts5688 4 ปีที่แล้ว +1

    You explain so well, thank you!

  • @alvarobyrne
    @alvarobyrne 3 ปีที่แล้ว +4

    Nice ralistic shadows and lighting in three.js with a lot of concepts involved: anisotropy (texture quality, texture filtering quality) -property of mesh-, gltf mesh loading details -traversing and re positioning included-, hemisphere light -similar to sun light-, color desaturation with color tone mapping (Reinhard tone mapping amog other available) and tone mapping exposure -renderer property-, useful trick: spot light following the camera that simulates dynamic light sources; casting and receiving shadows, shadow biasing (pointLight.shadow.bias), and shadow resolution (pointLight.shadow.mapSize). Wow! Thank you so much: this is knowledge sharing!!!!!!!!!

  • @trafficface
    @trafficface 3 ปีที่แล้ว

    Thank you so much! Saved my day.

  • @mirok82
    @mirok82 3 ปีที่แล้ว

    Thank you very much! Interesting tutorial!

  • @cptairwolf
    @cptairwolf 2 ปีที่แล้ว

    These tutorials are amazing

  • @fortedexe8273
    @fortedexe8273 2 ปีที่แล้ว

    Super useful thank you. Subscribed.

  • @spikethea2630
    @spikethea2630 4 ปีที่แล้ว

    It's wild that this video isn't super popular

  • @kashifaliansari2535
    @kashifaliansari2535 4 ปีที่แล้ว

    It's too awesome, Thanks

  • @namtong577
    @namtong577 4 ปีที่แล้ว +2

    hope can see more three.js tutorial

  • @ChandanaBandara
    @ChandanaBandara 4 ปีที่แล้ว

    Thank you!

  • @javifontalva7752
    @javifontalva7752 ปีที่แล้ว

    Oh my god. I can't believe you can make this by using three.js . I wish I could do that.

  • @musicvideosf0ryou
    @musicvideosf0ryou 4 ปีที่แล้ว +1

    How could someone dislike this 🤯

  • @harisansari378
    @harisansari378 4 ปีที่แล้ว

    awesome

  • @SergioEnriqueAguilarDelgadillo
    @SergioEnriqueAguilarDelgadillo 4 ปีที่แล้ว

    Wow ¡ it is very awesome ¡

  • @VeteranTuner
    @VeteranTuner 2 ปีที่แล้ว

    siiiiick, nice :D

  • @Andy-lr1gx
    @Andy-lr1gx 4 ปีที่แล้ว

    Nice

  • @user-vf1sc7pq8w
    @user-vf1sc7pq8w 4 ปีที่แล้ว

    Very good tutorial, easy to understand, how to set the transparent material of gltf? PBR material? Can I have a tutorial about this material setting? Now we can't find more application materials in this area, thank you!

  • @aptechkamran4049
    @aptechkamran4049 4 ปีที่แล้ว

    great

  • @pist5343
    @pist5343 4 ปีที่แล้ว +1

    Pretty cool, but why didn't you use HDR Image Based Lighting for the static model?

  • @vrtech473
    @vrtech473 4 ปีที่แล้ว

    More tutorial on threejs plz

  • @aseel1024
    @aseel1024 4 ปีที่แล้ว

    nice, it will be better if write a comments so we can follow ur steps.

  • @wavecoders
    @wavecoders 4 ปีที่แล้ว +1

    Looks great. I’m looking to have a model created for 3js, what is the best format and will it support textures like your demo

    • @maasnicolas
      @maasnicolas 4 ปีที่แล้ว

      gLTF is the fastest and most optimised for the web

  • @ANTIWOKE
    @ANTIWOKE ปีที่แล้ว

    What if the model also has several texture maps such as a Normal Map, Specular Map, Roughness Map, etc. Are you able apply those maps onto the 3D model and showcase them in the viewer?

  • @LakiLOOP
    @LakiLOOP 4 ปีที่แล้ว

    May you make tutorial how to use scripts in three.js Editor?

  • @OlaoluwaJesubanjo
    @OlaoluwaJesubanjo 4 ปีที่แล้ว

    Hi I added this code but it doesn't rotate from the centre of the model, it offsets the model.
    function animate() {
    if (model) {
    model.rotation.z += 0.01;
    }
    requestAnimationFrame( animate );
    renderer.render( scene, camera );
    }

  • @janusjordan1159
    @janusjordan1159 4 ปีที่แล้ว

    Hi, Where do we get that skybox images from (posx.jpg, negx.jpg)?

  • @BMikel
    @BMikel 4 ปีที่แล้ว

    How can I make smth similar with a simple plain svg logo?

  • @anmolrawat555
    @anmolrawat555 4 ปีที่แล้ว

    Hey bro i want to make stock market charting website but i am stuck in chart part can u guide me how to add candelstick chart in website ?

  • @greenking9125
    @greenking9125 4 ปีที่แล้ว +2

    this "new THREE.OrbitControls(camera)" code is error, this "new THREE.OrbitControls(camera, renderer.domElement)" is right. The reason is missing element

    • @tadkatechno
      @tadkatechno 4 ปีที่แล้ว

      Nothing happen still got error

    • @SoloElROY
      @SoloElROY 4 ปีที่แล้ว

      Thanks!

  • @UnityWorksIndia
    @UnityWorksIndia 3 ปีที่แล้ว

    how to create a diamond shader for three.js? any code available for diamond shader?

  • @andream9722
    @andream9722 4 ปีที่แล้ว

    hello RedStapler. I followed your tutorial. But when updating the spot light position inside the render loop, the shadow quality becomes horrible. If I let the spot at a fixed position, everything looks fine but the idea of having shadows moving according to the camera, is pretty cool. Any ideas on how to solve this problem?

    • @andream9722
      @andream9722 4 ปีที่แล้ว +1

      ok i got my own answer. Adding +10 in world units to the light position was too much for my model scale ;) now adding just a +0.1 to each coordinates, works fine

  • @bestapps4709
    @bestapps4709 ปีที่แล้ว

    My RectAreaLight is not working in my .obj model, can you help buddy?

  • @OlaoluwaJesubanjo
    @OlaoluwaJesubanjo 4 ปีที่แล้ว +2

    Doesn't work from the first stage, console says "Uncaught TypeError: Cannot read property 'domElement' of undefined"

    • @OlaoluwaJesubanjo
      @OlaoluwaJesubanjo 4 ปีที่แล้ว +5

      If there is anyone out there having the same problem, just move the "controls = new THREE.OrbitControls( camera, renderer.domElement );" line to the line after "init()"

    • @mr-fister
      @mr-fister 3 ปีที่แล้ว +1

      @@OlaoluwaJesubanjo you're a real life saver

    • @afxcrush41
      @afxcrush41 3 ปีที่แล้ว +1

      @@OlaoluwaJesubanjo Thank you sir, You deserve a medal

  • @melonisferco
    @melonisferco 4 ปีที่แล้ว

    Very nice tutorial. But i have a problem, i get a blank screen when i test it. Any solutions?

  • @tokyo-re9nw
    @tokyo-re9nw ปีที่แล้ว

    for some reason, the first part does not work for me, the one with XYZ axes, could not follow through. Anyone else has the same problem?

  • @goout88
    @goout88 ปีที่แล้ว

    model is deleted, do someone have a copy ?

  • @sadmanyasar17
    @sadmanyasar17 3 ปีที่แล้ว +3

    Some problems I faced and fixed:
    1) 1:09 Import scripts like this below if you install threejs using npm and rename installation folder to "three"


    import {GLTFLoader} from "./three/examples/jsm/loaders/GLTFLoader.js";

    import { OrbitControls } from './three/examples/jsm/controls/OrbitControls.js';
    //Rest of the scripts here
    2) 2:35 add a renderer.domElement as a parameter along with camera in OrbitControls
    3) 4:13 if you get black screen create a variable called "loader" and type as follows
    // Instantiate a loader
    loader = new GLTFLoader();
    // Load a glTF resource
    loader.load(
    // resource URL
    'scene.gltf',
    // called when the resource is loaded
    function ( gltf ) {
    scene.add( gltf.scene );
    Hope this helps :)

  • @tadkatechno
    @tadkatechno 4 ปีที่แล้ว

    Why i got THREE as error

  • @ghq3150
    @ghq3150 3 ปีที่แล้ว +1

    Hi bro.You were my first subscriber and I learned a lot from your tutorials.But on the camera side, it confused me.
    This is what I want to achieve:
    there are many objects in the scene, and when I click on one of them, the camera looks to it and centers the object.
    Could you share a tutorial or give me a project link/example?

  • @webd5300
    @webd5300 4 ปีที่แล้ว

    How to create own 3d model ??

  • @oxymonster1337
    @oxymonster1337 4 ปีที่แล้ว

    Your script isn't working!
    You can't load three with it. Doesnt matter what you do! Its broken...

  • @Giovanni00831
    @Giovanni00831 3 ปีที่แล้ว

    the file has been deleted

  • @aptechkamran4049
    @aptechkamran4049 4 ปีที่แล้ว

    1st

  • @marcboffinjuan5482
    @marcboffinjuan5482 4 ปีที่แล้ว

    2 xD

  • @user-jt7wb3zc1m
    @user-jt7wb3zc1m 4 ปีที่แล้ว

    Do you realize that your stapler is actually white? :)