Netherlands
Joined: Apr 8, 2022
Post Count: 1002
Status:
Offline
Problem with modified invisible inward light half sphere
I modified an invisibleInwardLightHalfSphere by removing the bottom two rows of faces. The reason is to get a more dispersed light spread displayed at the floor for my park&street lights. I had a little problem with the wire because it didn't export from Blender but I have solved that by manually adding the wire material for the l lines. But...
The original object created by Emmanuel is appr. 15kB. You would assume that with two rows of faces removed the new object would be smaller but it's much bigger: 25kB. What am I doing wrong or what is the trick to get my 'invisibleInwardLightCap' at or under 15kB?
---------------------------------------- Dodecagon.nl 700+ 3D models, manuals, and projects
France
Joined: Nov 7, 2005
Post Count: 9369
Status:
Offline
Re: Problem with modified invisible inward light half sphere
You might have exported normals (lines starting by "vn" in the exported OBJ file) which are not necessary here if you keep the surface smooth (see line "s 1" in the exported OBJ file).
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
Netherlands
Joined: Apr 8, 2022
Post Count: 1002
Status:
Offline
Re: Problem with modified invisible inward light half sphere
Nope, no vn lines. The export from Blender is already 25kB with a single s line. And that is before manually adding the wire material to the exported file. I tried writing as little as possible when exporting. The only options checked for export: - include edges (without it there are no wire lines (l lines)) - include UV's - Write materials (write the mtl file) - Objects as OBJ groups (as 'OBJ objects' makes no difference in size)
The best result I got so far is importing the original half sphere. Remove the bottom two rows from the light faces and remove the bottom two rows of wire. After export manually add the wire material for the wire group. Don't export from Sweet Home 3D because that adds a bunch of vn lines.
This might be important: It appears that vertices are added for the l lines. It would be more efficient if the vertices for the light group were used for the wire frame but I don't seem to get how that could be done. I just don't know enough of Blender to do it and I don't even know if that is possible. I end up with a higher total of lines with the two removed rows than the original object. The difference is approximately the (added?) vertices for the wire. The size on disk is 18.2 kB and the reported size in Sweet Home 3D is 25.
Of course the most important thing is getting the smallest 'size' for processing and I think that means less v lines is better. The actual file size is not that important and the reported size doesn't change anything to the actual object itself. Less required processor ticks for handling is what counts.
Discrepancies in reported sizes inwardInvisibleLightHalfSphere: Added in SweetHome3D 15kb, in the LightShapes library 14811 bytes. (including the mtl and rounded also 15). That seems correct. Importing the exact same extracted object reports a size of 34 in Sweet Home 3D. On disk it's 14.2kb (including the mtl rounded 15kb). That is not correct. It should have reported the same size of 15. When I import the unchanged object in my lights library it reports that it's size is 33490. Size on disk is still 14.2kb of course. Both the orginal library and my library should report the same size for the same object.
---------------------------------------- Dodecagon.nl 700+ 3D models, manuals, and projects
France
Joined: Nov 7, 2005
Post Count: 9369
Status:
Offline
Re: Problem with modified invisible inward light half sphere
I don't know if Blender is able to optimize the vertices used in two different places when it exports to OBJ file but it's probably the reason why your model grew. I tried on my side to optimize the "v" vertice lines in the OBJ file and got a smaller file.
---------------------------------------- invisibleInwardLightSpherePart.sh3f
(9438 bytes)
(Download count: 8)
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
France
Joined: Nov 7, 2005
Post Count: 9369
Status:
Offline
Re: Problem with modified invisible inward light half sphere
About the size, the reason could come from the fact that you imported the OBJ file or the ZIP file containing the OBJ+MTL file. When you import a ZIP file, it is saved as is in the SH3D or SH3F file, whereas when you import a OBJ file, it's internaly exported then reimported leading to higher files at the end, containing normals and only triangles.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
Netherlands
Joined: Apr 8, 2022
Post Count: 1002
Status:
Offline
Re: Problem with modified invisible inward light half sphere
Exactly what I was trying to create! Now how did you do it??? For different lights I'm almost certain I want to change more of these in different ways so I'm definitely interested in how you achieved it. Especially since I integrate these with models and want to ensure I keep them as small as possible.
---------------------------------------- Dodecagon.nl 700+ 3D models, manuals, and projects