React Three Fiber Tutorial: How to Apply Images to 3D Objects

Поділитися
Вставка
  • Опубліковано 1 лип 2024
  • Let's learn how to create personalized 3D products such as mugs, t-shirts, bags, or any complex 3D shape by applying image textures.
    In this tutorial, we will discover the Decal component from React Three Fiber. Another solution presented is to use CanvasTexture to create a custom texture to apply to the material.
    🚀 Learn React Three Fiber with my complete course ✨
    lessons.wawasensei.dev/course...
    Starter pack 🔗
    github.com/wass08/r3f-vite-st...
    Final code 🔗
    github.com/wass08/r3f-mug
    #threejs #developer #reactjs
    ▬▬▬▬▬▬ Useful L I N K S 🔗 ▬▬▬▬▬▬
    Decal
    github.com/pmndrs/drei#decal
    HTML Canvas
    www.w3schools.com/graphics/ca...
    CanvasTexture
    threejs.org/docs/#api/en/text...
    Rabbit example
    codesandbox.io/s/ymb5d9?file=...
    Ring example
    codesandbox.io/s/ring-decals-...
    Mug3D example
    mug3d.com/?model=1
    ▬▬▬▬▬▬ T I M E S T A M P S ⏰ ▬▬▬▬▬▬
    00:00 - Intro
    00:29 - Project setup
    01:03 - Concept
    02:56 - Decal
    07:38 - Preparing object on Blender
    12:31 - Applying on 3D object
    15:38 - Dynamic configurator
    24:46 - Final result
    25:01 - Thank you!
    ▬▬▬▬▬▬ Support the channel 🙏 ▬▬▬▬▬▬
    Become a member to get access to awesome perks:
    / @wawasensei
    ▬▬▬▬▬▬ Connect with me 👋 ▬▬▬▬▬▬
    💻 The Discord Community
    / discord
    📸 Instagram :
    / wawa.sensei
    🎎 Facebook :
    / wawasenseiyt
    🐦Twitter :
    / wawasensei
    🐦TikTok :
    / wawasensei08
    💻 My website :
    www.wawasensei.dev
  • Наука та технологія

КОМЕНТАРІ • 35

  • @genshian
    @genshian 8 місяців тому +1

    Sensei with the best tuts online again 🫡 project based, application based, critical thinking, practical, experiential, high level etc. Perfect as always.

    • @WawaSensei
      @WawaSensei  7 місяців тому

      🥰 That's a real pleasure to read! Thank you so much

  • @codingwithjuan8815
    @codingwithjuan8815 8 місяців тому

    I've been waiting for this for such a long time. You are the best. Fr

  • @SheriffKoder9
    @SheriffKoder9 4 місяці тому

    Thanks a lot buddy, this video is exactly what i needed ! it solved a a lot of questions i had

  • @julianvelez6563
    @julianvelez6563 8 місяців тому +1

    Awesome work bro you are the Best bro ❤❤

    • @WawaSensei
      @WawaSensei  7 місяців тому

      You are the best my friend 😍

  • @321123580
    @321123580 8 місяців тому +1

    Wow I love it

    • @WawaSensei
      @WawaSensei  7 місяців тому

      Happy to read it 🥰

  • @zachez9815
    @zachez9815 7 місяців тому

    Appreciate the video! The drei repo has the polyonOffset placement wrong. Thanks for showing me that it has to me on the material!

    • @WawaSensei
      @WawaSensei  7 місяців тому

      Thank youuu!!!
      Oh you're right to mention it, I'll do a pull request to update it 🙏

  • @khanjee9350
    @khanjee9350 Місяць тому

    Imagine a bag with an outer mesh whose z-position needs to be dynamically calculated based on changes to both its x and y positions, as well as alterations in scale. How can we determine the z-axis value in such a scenario?

  • @user-rz1fg4fe1e
    @user-rz1fg4fe1e 5 місяців тому

    amasing!

  • @dolphinsoft_Youtube
    @dolphinsoft_Youtube 3 місяці тому

    Excuse me,I have problem with decal in circle meshes I mean for example for sleeves on t-shirt image will be stretched
    How can I solve that?

  • @realadnoh
    @realadnoh 8 місяців тому

    nice video. How would you manage "Layers" if you put 2 decals on top of each other to control which one is rendered on top? Thank you for your videos - best Web3d content I've found on the web so far!

    • @WawaSensei
      @WawaSensei  7 місяців тому +1

      Hey thank you very much, with the polygon offset and polygon offset factor you can easily define which one is on top of the other

  • @tomsvacietis
    @tomsvacietis 7 місяців тому

    Amazing tutorials! Keep up the great work Can you give me some more tips to achieve CanvasTexture solution? Much thanks.

    • @WawaSensei
      @WawaSensei  6 місяців тому

      Thank youuu! Sure, do you have precise points blocking you? If you need help you can ask questions or the Discord! Otherwise I add on my list of ideas to create a dedicated video 🙌

  • @caesarsage
    @caesarsage 3 місяці тому

    Thanks for this 🎉.
    My texture image became blurry when using it on the 3d gltfxjsx model (i used a shirt instead of mug)

    • @WawaSensei
      @WawaSensei  3 місяці тому

      Welcome!
      What's the format of your image? Don't hesitate to join the Discord to get help: lessons.wawasensei.dev/discord

  • @inteligenciafutura
    @inteligenciafutura 8 місяців тому

    super

  • @tonyibra
    @tonyibra 4 місяці тому

    how can i make this dynamic ? map through meshes instead of adding them static

    • @WawaSensei
      @WawaSensei  3 місяці тому

      Hum not sure to understand what you're trying to achieve?

  • @sikfreeze
    @sikfreeze 3 місяці тому

    I got blurry image when importing the texture, how can I get a sharp image...I'm using svg though

    • @WawaSensei
      @WawaSensei  3 місяці тому +1

      Hey, unfortunately the solution is to convert it into a png (or jpg). The material doesn't know how to render/scale your SVG properly as it's well supported by the browser but not by the texture/shader responsible of it.

    • @sikfreeze
      @sikfreeze 3 місяці тому

      Thank you@@WawaSensei

  • @pseudocodergenie
    @pseudocodergenie 4 місяці тому

    Rishi Sunak doing the coding ?? wow

    • @WawaSensei
      @WawaSensei  4 місяці тому

      Wait do you mean I look like him? 🤭

    • @WawaSensei
      @WawaSensei  4 місяці тому

      Wait do you mean I look like him? 🤭

    • @pseudocodergenie
      @pseudocodergenie 4 місяці тому

      @@WawaSensei no comment (may be) great tutorial by the way 🎉🎉

  • @tejassethi9319
    @tejassethi9319 8 місяців тому

    How to Apply 3D Objects to Images

    • @WawaSensei
      @WawaSensei  7 місяців тому

      🤣 you made my day! If you really expect an answer I'd say MidJourney and Dall-e can help 🤭