m-r-davari / flutter_3d_controller

A Flutter package for rendering interactive 3D models in different formats(glb, gltf, fbx, obj), with ability to control animations, textures and camera.
https://pub.dev/packages/flutter_3d_controller
MIT License
78 stars 8 forks source link

Dynamically add textures from a path #8

Closed nirmal-kc closed 2 months ago

nirmal-kc commented 2 months ago

I have a simple sofa with white background in my .glb file. I want to change the fabric based on the option selected by the user, I have url's for the fabric images. Is this possible?

nirmal-kc commented 2 months ago

Also, can you explain how the textures are loaded in your example? I believe the samples are created using Babylon. Correct me if wrong.

m-r-davari commented 2 months ago

its better to use embedded texture models, and for dynamic texture/variant your model must support that... if you are familiar with 3d models you can check this model to see how to create models with multiple variants.

nirmal-kc commented 2 months ago

But, does this package support dynamic texture/variant option? My model does support it, but is there an API I can refer to? To fetch and load dynamic materials?