Git Product home page Git Product logo

Comments (8)

Arthur151 avatar Arthur151 commented on May 30, 2024 1

Thanks for your suggestion.
I need some time to figure it out.

from romp.

Arthur151 avatar Arthur151 commented on May 30, 2024

Sorry for the delay. I am trapped by some urgent projects.
It could work with careful adjustment on the camera parameters

from romp.

fabioo29 avatar fabioo29 commented on May 30, 2024

@Arthur151 It's okay. I've managed to get it to work already that's why I closed. Thanks for your attention

from romp.

Arthur151 avatar Arthur151 commented on May 30, 2024

Glad to know about that.
May I ask how did you make it work? Is it convenient to share the relative code? So I can merge it into this repository and make more people enjoy your work.

from romp.

fabioo29 avatar fabioo29 commented on May 30, 2024

I'll do it for sure! :)
I had to make a few changes on the code because I am working with another model(with more vertices) and made it to work with this new model but I will try to make it to work based on your code and I'll update you soon ;)

from romp.

Arthur151 avatar Arthur151 commented on May 30, 2024

Thanks!

from romp.

fabioo29 avatar fabioo29 commented on May 30, 2024

@Arthur151 Sorry, I don't have time to go deep into it.
Btw, There's the main code block that I've used to add texture to the model object (.obj).

tex = Image.open('../texture.jpg')
mat = trimesh.visual.material.SimpleMaterial(image=tex)
mesh = trimesh.exchange.load.load(open('../object_with_vt.obj','rb'), file_type='obj', force='mesh')
mesh.visual.material = mat

The problem here is adding vt indices into .obj. I had some troubles doing it then I started using those .obj from Tex2Shape which already had vt indices on it instead of trying to reproduce them properly. Once you can see the texture on the .obj model on a mesh viewer software like ctmviewer you're good to go with the snippet above. Sorry for not having the final solution for you but this way worked for me.

from romp.

Arthur151 avatar Arthur151 commented on May 30, 2024

Thanks a lot! I will look into it. This seems like a portable way.

from romp.

Related Issues (20)

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.