Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Jose Juan Montes
    @jjmontesl
    Jose Juan Montes
    @jjmontesl
    This may be a silly question but, how do I create a hierarchy of nodes to be exported with GLTF? I know how to add meshes to a scene, but I don't know how to create a tree of nodes with or without meshes and with different local transforms (ideally also with "extra" custom metadata).
    Does someone know how to do this with Trimesh, that can share or point me to an example?
    Jose Juan Montes
    @jjmontesl
    hello again... ^^^ anybody? I'm really struggling with this :/
    Jose Juan Montes
    @jjmontesl
    also, I'd like to share the lightning talk (5m) about the tool I'm working on, which uses Trimesh:
    Tomas Novak
    @TomasN_gitlab
    Hi all! I am going to use this awesome tool to render create 3D models and render images, but I have not found the way how to render orthographic image. Is there a way how to configure a camera? Thank you
    Jose Juan Montes
    @jjmontesl
    Hello @TomasN_gitlab , I believe there's an issue on Github that refers to that
    This is the one: mikedh/trimesh#929
    vivekdhameliya
    @vivekdhameliya

    I am currently using trimesh to create multi view snapshots of geometries. Unfortunately, after a while of calling the scene.save_image method a couple of times issues occur: a random ZeroDivisionError and a random Process exit.

    After around 446 iterations python crashes completely and it returns 'Process finished with exit code -1073740771 (0xC000041D)' Here the exit codes are different every time.
    I do not see the memory/CPU/GPU statistics blowing up in the task manager.

    Joan Massich
    @massich

    Is there any reason why I cannot scene.set_camera from scene.camera ?
    I'm trying to do something like this:

    mesh = trimesh.load_mesh(in_fname, process=False)
    scene_A = trimesh.Scene(mesh)
    scene_B = trimesh.Scene(mesh)
    scene_A.show()  # play with the camera
    
    scene_B.set_camera(**scene_A.camera)

    If scence_A.camera was a dict and the parameters of set_camera where matching the elements of this dict. This would work. My question is how can I get the parameters of the camera so that I can pass them to set_camera. I've the feeling that scene.camera misses some of the parameters required to properly set the camera using set_camera

    Tomas Novak
    @TomasN_gitlab
    Hello, is there a way how to display text (digits) in opengl window? When I add text entity to path, I can see it in Path2D.show(). But when I create Path3D I see no text. Is there any workaround? Creating Path2D for each digit, extrude it and add to scene is quite hardcore solution. Thanks for help
    Tomas Novak
    @TomasN_gitlab
    How does lights work in trimesh scene. It seems to me that it does not matter where I place them. Scene looks still the same. Also intensity adjustment makes no change. Is it implemented? Thanx
    alexspace360
    @alexspace360
    hello i am new to trimesh
    i need a help please
    i want to flip obj vectors or faces does trimesh allow that ?
    note i know nothing about the library
    Jose Juan Montes
    @jjmontesl

    i need a help please

    Trimesh has a invert method that inverts faces: https://trimsh.org/trimesh.base.html#trimesh.base.Trimesh.invert

    There's also related code in the 'repair' module I think.
    Sayantan Das
    @ucalyptus
    Hi guys, a beginner here.
    [Beginner Question] How to generate a trimesh from adjacency matrix?
    visineo
    @visineo
    Hello All. I am trying to use trimesh to segment all planar sections of a roof top
    I could not locate any API which takes in a trimesh and segments it into multiple planar mesh's
    @mikedh : Can you please help provide any suggestions ?
    Souhaib Attaiki
    @pvnieo

    Hi all,

    I have a 3D shape loaded from an .off file, and I have an image load as a PIL image.

    I want to add this image as a texture to the mesh but I can't figure out how to do it. I did the following manipulation, but when I show the mesh, the texture is not applied.

    import trimesh
    from PIL import Image
    
    im = Image.open("image.png")
    m = trimesh.load("mesh.off", process=False)
    
    tex = trimesh.visual.TextureVisuals(image=im)
    m.visual.texture = tex
    
    m.show()

    How can I do this?
    Thank you in advance.

    Damien
    @damienallen
    So, I've found that both submesh() and update_faces() can give me the result I need (a subset of faces from given indices). Does anyone have experience with these two functions? Is there a big performance difference between them? Use cases to be avoided for either?
    cesroceng
    @cesroceng
    Hi all, I am working with trimesh and I need to use convex decomposition which needs v-hacd. I cloned the v-hacd repository and built it (working on Linux), there was no error and the paths are correct, but when I try to use in my code trimesh fails to open a process to testVHACD. Is there anyone here that have used v-hacd and perhaps had the same problem as me? Thanks in advance. Regards.
    Error.png
    Jose Juan Montes
    @jjmontesl
    Maybe try to run that command from command line and see the output?
    apparentluy there should also be a log file in /tmp/something, you could check that
    Jose Juan Montes
    @jjmontesl
    Hello people. I have been working on this for the past months.
    Sorry to spam a bit but Trimesh is somehow related. I use it to generate the procedural maps. Actually I have written a bit about that too: https://godotforums.org/discussion/24667/procedural-generation-pipeline
    In any case, If you are into gaming, I'd appreciate visits or wishlisting on Steam ;)
    So, this is it. My game Rope Cow - Rope it to The Cow: https://jjmontesl.itch.io/ropecow
    O:)
    Mr Ben Griffin
    @MrBenGriffin
    Hi - I've been working with several 3D libraries recently (mainly open3d) and while there's a load of overlap in some functionality (I may well switch to trimesh) - i'm wondering if there's a demo/example (or solution) to merge adjacent coplanar faces. Any thoughts would be very welcome.
    (basically I'm looking for something like merge_facets() )
    Jose Juan Montes
    @jjmontesl
    (basically I'm looking for something like merge_facets() )
    There is a facets property, but I don't know if that problem has a well defined solution, as the resulting planar surface may not be a single triangle so there may be multiple solutions as to how to merge them I guess.
    Mr Ben Griffin
    @MrBenGriffin
    Hi @jjmontesl, yes I saw the facets property - but do not know how best to reduce adjacent coplanar triangles. For my models (being computationally composed voxel skins), each (square) voxel face is made of 2 triangles. Intuitively, it is obvious that when I have 20 of these faces in a row (20 colinear voxels) making a 1x20 rectangle I should be able to replace the 40 triangles of that face with just two. But I am yet to find a python library that offers such a reduction - even in this restricted case. CGAL has some, but I do not have the skills to know how to write python to reach C++ library. PyMesh (Qingnan Zhou) has the features, but it doesn't compile outside it's very carefully composed docker vm.
    Han Xiao
    @hanxiao
    image.png

    hi there, I'm a complete noob to trimesh but I really like this library from the first impression and usage.

    As a newbie, I'm going to explain my problem in my own word, which probably can be better described with trimesh-idiom. Please feel free to point it out.

    Given a mesh, I want to get the vertices coordinates from different views, e.g. the file above represents a "Fence" object, I want to have the vertices coordinates under the six views, respectively.

    Is there a API in trimesh for it?

    Matti
    @mavavilj
    What are the ways to use TriMesh if I have point clouds as numpy or .csv
    tjcarmody
    @tjcarmody

    Trimesh offers Boolean operations for meshes using either Blender or SCAD as the computation engine. I'm finding that the results of the Boolean operations are a great deal faster on the Blender engine compared to SCAD. The results of Blender's engine are yielding inconsistent results (SCAD is taking way too long, so I'm not sure if it would result in similar issues). I've found that Blender's Python API allows a great deal of additional customization within their Boolean engine that may address the inconsistencies (https://docs.blender.org/api/current/bpy.types.BooleanModifier.html). Are there any plans for the additional arguments that Blender accepts to be added to Trimesh or should I just use bpy for this additional functionality?

    I'm no expert on these sorts of things, so maybe you all might have some advice?

    Broadly, I have two meshes that I would like to intersect. The result I am getting is a strange interpretation of an intersection. Small perturbations to my file's position in space make it such that it works some times, but not always. Any recommendations are welcome. Thanks.

    jpmaterial
    @jpmaterial
    @hanxiao Easiest is probably to rotate the trimesh with trimesh.transformations (unfortunately not documented) and then throw away the z coordinate.
    @mavavilj You can construct a trimesh.PointCloud and perform some operations on it (such as searching the closest point) or you can construct a trimesh.Trimesh from it, e.g. with trimesh.PointCloud.convex_hull or trimesh.PointCloud.bounding_box_oriented
    @tjcarmody Can give more details on what exactly is your problem?
    I want to intersect two meshes, but in the result I'd like to know which triangle comes from which input geometry.
    Linnea
    @trainlock
    Hi, I was wondering if there is any way to save the vertex texture (vt) from an .obj-file when loading it as a trimesh object.
    I have an .obj-file with texture coordinates, that I need, and I want to load as a trimesh object. Is it possible to get the texture coordinates directly through trimesh or do I need to read them separately?