-
Notifications
You must be signed in to change notification settings - Fork 9
Description
SketchUp API 2019-0-753
Windows 10 O/S
Hello !
Update #1: As I wonder if the problem came from my code and the way I export textures, I dig further and find that in some circumstances the number of exported materials explode. I post a simple step by step procedure that allows to reproduce the problem under Sketchup 2017 with Sketchup collada exported.
https://forums.sketchup.com/t/sketchup-generates-too-many-textures/90653
Original post:
I am dealing with a very simple sketchup file and I am suspecting a bad bug in Sketchup 2019.
Here is the way the file join to this mail has been created created:
- I create a face and apply a brick texture.
- I make a distortion on the texture using Texture > Position
- I then duplicate the face 4 times.
So this should be the same face using the same internal representation texture.
But...
Using the SDK and traversing the 4 faces I get one material and 4 different texture IDs (using SUTextureWriterLoadFace)
When extracting the texture, I got 4 very similar files (same dimension and nearly same content, but not exactly the same).
I can't figure out why Sketchup is using internally 4 different images (I guess that internally there is 4 SUImageRepRef allocated with there image buffer).
It seems to be a huge waste of memory and performance.
Is it a normal behavior or I do miss something?
Thanks !
Manuel
Note: SDK methods used to extract textures
SUTextureWriterLoadFace(textureWriter, suface,&frontTextureID, &backTextureID);
SUTextureWriterWriteTexture(textureWriter, frontTextureID, texturePath, false);