Skip to content

Loading STL files in PhysX #171

Closed Answered by nvtw
SumantBagri asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, PhysX does not support 3d file formats directly. Only cooked data can be stored and loaded natively by PhysX. For file formats like STL, you would need to use a third party parser or write your own. There should be good code available on github, maybe the following repo is useful https://github.com/dacunni/stlloader. Also the STL file format is not that difficult, a custom parser can be written quite quickly. Once you get the vertex and index lists out of the STL, one can create PhysX objects out of them. E. g. the SDF snippet, which is part of the PhysX SDK, shows how to create a PhysX object out of vertex and index list. I highly recommend to look at the snippets since they are desi…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@SumantBagri
Comment options

Answer selected by SumantBagri
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #170 on August 02, 2023 07:44.