Road-hog123 / Blender-OMSI-Exporter

OMSI Mesh (.o3d) exporter addon for Blender and Blender LTS
Apache License 2.0
24 stars 0 forks source link

Some models are abnormally bright when exported #17

Open tpeterka1 opened 8 months ago

tpeterka1 commented 8 months ago

Bug Description

When I export some models from Blender, they are abnormally brighter than other models. I'm unsure as to what could be causing this. Both of the ticket printer models were exported using the plugin, but they were exported from different .blend files. I was speculating that it could be caused by having the Emission node set up, but this happens even with models that do not have this node connected.

Omsi - 17-03-2024 10-12-10

This doesn't happen just to me, I've seen the same issue in a Discord server.

image image image

Both of the included .blend files are from Blender 3.6 LTS

Steps to Reproduce

Export a model from Blender

Version Information

blend.zip

Road-hog123 commented 8 months ago

I am noticing that working has Auto-Smooth set to 30°, while broken has Auto-Smooth disabled—enabling Auto-Smooth on broken results in identical O3Ds when exporting without applying transforms. The direction of normals on a mesh will affect how it is lit by vertex-lighting such as [interiorlight]. image

Road-hog123 commented 8 months ago

While the difference in Auto-Smooth setting was the reason for the difference in export result, it seems that there is in fact a bug here—normals being exported all pointing the same direction, which shouldn't happen regardless of Auto-Smooth setting.

irisnotaprogrammer commented 7 months ago

Experiencing the same problem here. The weird thing is is that I've exported a row of objects that are similar in setup (not in shape and polygons) but are displaying correctly, yet today I have seen a set of new objects that has only 1 part not displaying correctly and I have tried the auto-smooth setting on and off, on and off with Edge Split modifier on it, going into Edit mode and choosing an explicit face-shading mode (Flat or Smooth) and it has not helped.

Attached screenshot for how it looks. All objects can be the exact same in settings, yet it's the last that is misbehaving. I initially thought this was because it was the right-most home that got copied, mirror-scaled, transform applied and it's normals reversed because it is identical to the right-most home (gotta love the awful row-homes of The Netherlands), but doing the same to the middle home didn't cause problems and make it appear as dark as the rest.

I'm unsure if it is actually displaying the left house correctly and the two other ones incorrectly, but given the darkness of them and how it looks when I look at the textures it does appear that the left is what it should be.

OMSI gonna OMSI_1920x1080

Little addition to my original post: I tried this with the 3.2.0 version on 3.6.4 and with the test-version placed in this issue https://github.com/Road-hog123/Blender-OMSI-Exporter/issues/10#issuecomment-1600580837 Both produced the same result.

Tokosboti commented 7 months ago

I don't know if the problem has been solved yet, but I had the same issue and I think I found the solution, maybe this could be useful for some of you.

So basically before you export an object, you have to set the emission color to black, and it's strength to 1. This had solved my problem, I hope it can be useful for you too. :)

image

irisnotaprogrammer commented 7 months ago

I'll check on it as soon as possible. Currently rendering stuff out for work for course material on a course against disinformation... Blender is kind of busy as a result...

irisnotaprogrammer commented 7 months ago

I don't know if the problem has been solved yet, but I had the same issue and I think I found the solution, maybe this could be useful for some of you.

So basically before you export an object, you have to set the emission color to black, and it's strength to 1. This had solved my problem, I hope it can be useful for you too. :)

image

This is the default Principled BSDF node setup. I have the problems with this setup.

Tokosboti commented 7 months ago

Which Blender version do you use?

irisnotaprogrammer commented 7 months ago

Didn't add it overly clearly in my earlier post but I'm on 3.6.4 .

Tokosboti commented 7 months ago

Didn't add it overly clearly in my earlier post but I'm on 3.6.4 .

Oh, sorry, I don't know much about that version, since I use 4.0. I recommend you to try these settings in 4.0, maybe it will solve the issue.

Road-hog123 commented 7 months ago

I have identified a problem with how normals were being transformed and have published experimental fixed versions for testing—I am reasonably confident this was the problem in the opening post, but I'm unsure if it is also the problem @irisnotaprogrammer is experiencing.

irisnotaprogrammer commented 7 months ago

Eh, darn. Somehow I seriously thought I posted a response. The problem seems to have been solved. Blender 3.6.4 and the experimental fixed version you posted.

The homes are now appearing normal, all of them.

Oh, sorry, I don't know much about that version, since I use 4.0. I recommend you to try these settings in 4.0, maybe it will solve the issue.

I'm on an LTS version for a reason ;) . The risks of completely wrecking a project are way to big.

Edit: My bad, I did respond, just not in this thread... https://github.com/Road-hog123/Blender-OMSI-Exporter/issues/10

Sorry, been busy with work and having a busy mind as a result...