How do I reliably save photo textures used for meshes directly into the .3dm file with the model, not in a separate “sidecar” folder? These are textures from photogrammetry with a unique texture for each mesh. I need to be able to move the .3dm files, including on a different computer, open the .3dm file, and have the texture present.
Hi David -
I’m not sure what a “sidecar” folder is but it sounds like you are running into a reliability issue.
Can you post a 3dm file where saving textures is not working as expected?
-wim
@wim My question revolves around the _embedded_files folder which Rhino creates, sometimes. That is what I was referring to as a “sidecar” folder. (“Sidecar” is a common term in the photo editing world for added files or folders which are created during processing and need to accompany the file with the actual image.)
My fundamental question is how do I (if it is possible) create and save a .3dm file so that it will be self contained without any need for an _embedded_files folder, and not have an _embedded_files folder created in the future.
Rhino may be “working as expected” - as expected by the developers and those familar with the intricacies of the materials/textures system. But it is not working as I expect or need.
I’m creating Rhino models of over 100 boats from photogrammetry scans. For each boat there are five photo textured meshes, from a half million to ten million faces. Each mesh starts as a .obj, a .mtl and a .jpg file. The meshes are imported into Rhino, scaled and oriented. The resulting .3dm files are over 1 GB so a bit large to upload or send.
When I initially save the model only a .3dm file is created, no _embedded_files folder.
Sometimes I can reopen the file, move it, SaveAs, rename etc and Rhino does not create a _embedded_files folder.
But sometimes it does create a _embedded_files folder
The .3dm files will be archived and distributed to others. Therefore it is essential that the .3dm file be self contained and not requiring external texture image files.
This is where it gets interesting, confusing and frustrating.
Sometimes the _embedded_files folder is not needed. I can delete the directory, copy. rename, etc only the .3dm file and the textures are still present when I open the .3dm file.
Other times if I delete the _embedded_files folder the textures will no longer be present. In some situations that would be a disaster. I prefer to avoid disasters.
Per request, here is a .3dm file with a simplied version of a mesh:
Mesh Example 1 V8.3dm (7.6 MB)
I imported the mesh files into Rhino, scaled and oriented the mesh, and saved the model as a .3dm file. This is what Windows Explorer shows, just a single .3dm file, no _embedded_files folder.
Then I transfered the file to another computer and opened it. Rhino created an _embedded_files folder.
How do I keep this from occuring?
i think you have to use the advanced setting
Renderer Development Kit.Settings.RendererSupport.AlwaysUnpackEmbeddedFilesToTemp
setting it to false should stop that from happening.
Thank you!
This may be caused by WIP V9.
Renderer Development Kit.Settings.RendererSupport.AlwaysUnpackEmbeddedFilesToTemp set to False in V8 on both desktop and laptop.
Setting does not exist in current WIP V9. The only “render” advanced settings I see in the current WIP V9:
I’ve been using V9 and saving to V8. The example above was created in V8 but may have been opened in WIP V9.
Hi David -
Thanks. It looks like those have gone into hiding again. I’ve reopened the following:
→ RH-84241 RDK settings don’t show up in the advanced Options page
Apart from that…
As long as you are only ever saving, there won’t ever be created such folder.
That folder is only created when opening a file.
And only if Rhino can’t find the original image in the original path.
As long as the advanced NeverEmbedFiles option is not changed from the default False, Rhino will always create self contained files.
The only thing that the advanced AlwaysUnpackEmbeddedFilesToTemp option changes is that, when necessary, files are either unpacked to a folder inside the folder where the .3dm file resides, or to the Temp folder. You cannot stop unpacking when that is required when opening a file. (Unless you stop embedding altogether, but from your description that’s the opposite of what you want).
The notes in the help file should cover all of the above.
→ Save | Rhino 3-D modeling
-wim
@wim Thanks for the explanation. I had previously searched the Advanced options and did not see anything relevant.
NeverEmbedFiles is False on my V8 installations. It seems like NeverEmbedFiles is True on my WIP V9 installations, not the default False. Any suggestions on how to get it back to the default setting?
In the mean time I’ll stop using WIP V9 for anything with textured objects until I’m able to change NeverEmbedFiles back to False. The current situation is a show stopper for me.
Hi David -
That doesn’t rhyme with this part, though:
If your image files are getting put into a folder when opening on a different system, they are being embedded into the Rhino 3dm file.
At any rate, checking and changing the advanced options will require a fix for RH-84241 RDK settings don’t show up in the advanced Options page
-wim
I probably opened the file using V9 rather than V8 and that caused the _embedded_files folder to be created.
Would completely uninstalling, and then reinstalling WIP V9 potentially reset NeverEmbedFiles?
I’m confused about the problem now.
For opening a file, the setting of NeverEmbedFiles is completely irrelevant. The embedding (or not) happens when saving a file.
Uninstalling and reinstalling never change the settings.
-wim
Even if image texture files are embedded Rhino will extract them to disk upon opening of 3dm. Either in a folder in %TMP%, or in the embedded_files folder next to the 3dm file. Rhino needs that to be able to actually use the textures.
I may have opened and saved the file in V9. Sorry for the confusion.
I uninstalled V9 AND changed the name of the C\Program Files\Rhino 9 WIP folder. Then I installed V9 which also created a new C\Program Files\Rhino 9 WIP folder.
I then did a test, and it appears that Rhino 9 WIP is behaving as if NeverEmbedFiles is set to the default False. But my confidence level is less than 100%.
Test was:
Start V9 WIP
Import a textured mesh from a USB drive.
Save the new model on an installed drive.
Remove the USB drive so the mesh.
Open in V9 WIP the new file, and the _embedded_files folder is created as expected.
SaveAs a V8 file.
Close V9 WIP
Delete the _embedded_files folder
Open the V8 file in V8. The texture is present.
I now understand that. My issue has been that V9 WIP was not embedding the image textures in the .3dm file, which could result in the image textures not being found if the .3dm file in various situations.



