Can i use the object's reflection value of imported to stl file in MATLAB?

조회 수: 7 (최근 30일)
Yoojung Moon
Yoojung Moon 2023년 5월 8일
편집: DGM 2025년 9월 27일 1:08
I was desined 3D indoor model using Blender, and i exported the model to STL file for using the design in MATLAB.
And i imported that file in MATLAB for ray tracing simualtion.
I've been looking at imported 3D models in MATLAB, and it seems that the model doesn't set each object's reflection value, but rather sets all objects' reflections to the deflalt value.
The 'reflection of objects' in simulation is very important to me.
So, I want to know answer about below questions.
  1. Is the reflection value of the objects set in Blender saved, when import as an STL file in matlab?
  2. if no way about question 1, is there any way, i can set the reflection value of each object in Matlab?
Thank you for your attention. Have a good day-!

답변 (1개)

Sarthak
Sarthak 2023년 5월 16일
Hi Yoojung,
STL(Standard Tessellation Language) contains only the geometry information of the model and no material or texture information. Instead of setting the reflection values of each object in MATLAB, I would recommend you to export the model with reflection values from Blender itself in a file format that does save material properties like FBX file format. You can then import this FBX file in MATLAB for your ray tracing simulation.
  댓글 수: 3
Muhammad Kamran
Muhammad Kamran 2025년 6월 23일
@Yoojung Moon, Have you solved this problem ? Kindly let me know, I am following the same question.
DGM
DGM 2025년 6월 23일
편집: DGM 2025년 9월 27일 1:08
STL is still what STL is. A base STL contains no color, material, or scale information. There are encoders which will embed proprietary data in a binary STL, but most decoders won't read it. To be specific, the STL decoder used by MATLAB, and the STL decoders for MATLAB that are published on the FEX do not read any proprietary embedded data*.
Does Blender actually put anything in the STL other than the standard geometry data? I don't know for sure, but unless I see an example, I'm assuming no. If it did encode any material/reflectance information, it would be superficial shader information, not properties relevant to an RF model.
Even if you had an STL with any of these proprietary features, it would largely be up to you to know what they are, what they mean, how they're encoded, and how to decode them.
FBX can be imported using this, but that's a different toolbox, and might not be helpful.
Is there a way to split the geometry and material data into separate files during export? I don't know.
EDIT:
After a more thorough review, I was wrong about what features can be decoded with the available tools.
FEX #6678, #13253, #29906, #36771, #41910 and the decoder from the IFIT toolbox can ostensibly read some proprietary embedded VisCAM color data, but this comes with the caveats:
  • Out of those six decoders, only #36771 decodes the color data correctly.
  • All of these decoders have problems with other aspects of functionality.
  • Reading VisCAM color does nott solve the problem anyway.
The built-in stlread() can also read the same data. I missed it because I was expecting them to be described as "color", but it's not specific to VisCAM. It just reads the attribute bytes raw, so you'll have to figure out what's supposed to be packed in each 16b word.
FWIW, I added an example at the end of this answer:
FEX #182013 can read/write VisCAM as well as other proprietary color/reflectance data from/to an STL, but again, I can't believe that color or shader info are relevant to RF modeling, nor are these undocumented features applicable to Blender (as far as I know).
To my knowledge, that is the totality of support for nonstandard properties embedded in STL, and none of it is relevant.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 STL (STereoLithography)에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by