carlosangon / couch-experiment-threejs

Apply fabrics to 3d model of couch using Threejs
MIT License
9 stars 1 forks source link

Separate pattern for pillow insert and cushion #2

Open fetullahyldz opened 8 months ago

fetullahyldz commented 8 months ago

Hello, it's a really nice work, but I have a question. How can we add a pillow to the sofa and let it have a different color? Also, you have given the pictures in the script, how can we do this using MVC or dynamically?

carlosangon commented 8 months ago

Hey @fetullahyldz Sorry I'm just having some time to get back to you with the answers to your questions.

First of all, thank you.

How can we add a pillow to the sofa and let it have a different color? First you need to generate a 3d model of the pillow with in any type of 3d modeling software, you just sure you are able to export a pillow.obj and pillow.mtl files.

Import the model and material then in the code create a UI element and trigger the material to load on either a click or on load.

How can we do this using MVC or dynamically? I would fetch all my materials by either a search query when the application loads or fetch them on click events using the native fetch API or Axios.

What you are trying to do is very doable. If I were you, I'd rebuild this concept in ReactJS rather than just vanilla JS.

I hope that helps! Message me if you have any other questions.

fetullahyldz commented 8 months ago

Thank you very much. Yes, I did these to the sound and it was great. But I have a question. How can we do this if we want to use more than one model? And it would be great if we could also do this in the screen.