AlwarrenSidh / ArmAToolbox

Arma Toolbox for Blender
GNU General Public License v3.0
84 stars 35 forks source link

Auto smooth not exported to p3d #40

Open killerswin2 opened 1 year ago

killerswin2 commented 1 year ago

Attempting to export model, auto smooth shading is not applied/exported to p3d normal info.

Buldozer: Screenshot 2022-12-13 133846

Blender: Screenshot 2022-12-13 133931

killerswin2 commented 1 year ago

I assume that this correct behavior, so is there a work around besides manually shading the model?

AlwarrenSidh commented 1 year ago

Auto-Smooth is currently not supported. Easiest fix is to go to edit mode, go to Edge mode, then Select->Select Sharp Edges and use the same angle (30 Degrees) and mark all edges as sharp.

londo19 commented 1 year ago

neither is Blender's AutoSmooth feature intended to do so. As AutoSmooth intends to bolster performance, by creating similar visual effects without to have SubDivs & support loops applied (vertex count). nor to be considered to provide this feature in this Toolbox. simply because of technical reasons. First of all, AutoSmooth is a non-destructive modifier based on maths. vertices which had been marked sharp are only added as parameter to the mesh. while in Arma sharp edges need to be marked to be calculated correctly. What also Blender provides as Alwarren already mentioned.

all your efforts and time would outvalue the gain of such feature dramatically. In my opinion.

in addition to him, you could also use HardOps which provides auto sharpen. what gives great results. it has to be said that you have to pay for this Addon. but you may find a free Addon what provides this feature too.

barman75 commented 5 months ago

This is an old and huge problem with shading. Although sharp labeled edges are preserved in a last tool versions, a lot of shading data (like autosmooth, weighted normals, etc.) is not passed in import from p3d to blender. Exporting shadings data from blender to p3d seems fine. Also, the seams edges data is lost as well somwhere between files (not sure if it is stored).

AlwarrenSidh commented 5 months ago

Also, the seams edges data is lost as well somwhere between files (not sure if it is stored).

What edge data do you mean?

barman75 commented 5 months ago

I mean the edges marked as seams (red). Original blender file. зображення

Then it exported to p3d, and then imported in blender again зображення

At least it keeps the edges marked sharp

AlwarrenSidh commented 5 months ago

p3d cannot store seams. If you need them, you can regenerate them from the UV islands, but there is no way to store them in the P3D.

barman75 commented 5 months ago

p3d cannot store seams. If you need them, you can regenerate them from the UV islands, but there is no way to store them in the P3D.

Yes, that's obvious. There is a another question. Is it possible to make an option for blender that will allows to assign rvmat and texture to some groups of vertices (by Selections or by Active Vertex Group Index). No only in Material tab by materials. It would be very useful Thanks!

AlwarrenSidh commented 5 months ago

Hm, that is a separate issue. Feel free to create an issue for that, but quite frankly, I don't think it would be worth the effort, since it would require a good amount of extra data structures just to save this.

Why not use a material instead?