Mineways icon indicating copy to clipboard operation
Mineways copied to clipboard

[OBJ export] Bottom face of copper ore block is flipped vertically

Open kazarmy opened this issue 1 year ago • 7 comments

As shown here:

Minecraft (KappaPT P16b shader, Minecraft 1.19.4)

Blender (Blender 3.5.1, Mineways 11.00)

in an exported OBJ, the bottom face of the copper block above is flipped vertically. Since it is a flip, this isn't due to random block rotation. I fixed this in Blender by flipping vertically all bottom faces but I thought this would be better fixed at the source.

Btw, here's a final render:

BlendLuxCore (BlendLuxCore 7deee59, Blender 3.5.1, Mineways 10.15)

kazarmy avatar Jul 19 '23 04:07 kazarmy

This used to be a feature, not a bug. Once upon a time, Minecraft itself would mirror the bottoms like this, to match the tops. Testing Minecraft itself today with the Debug World and a custom texture pack, I see it's no longer doing this. I don't know what version of Minecraft this changed in, but I'm fixing Mineways to match 1.20.1. I've made the change, it'll be in the next version.

You can download a beta executable with this fix at https://www.realtimerendering.com/erich/minecraft/public/mineways/downloads/Mineways_11.02beta_no_mirroring.zip - let me know how it goes. It looked good on my end, here's an export from Debug World, with my custom texture pack applying an "R" in the lower left corner, for testing: mirror_fix

erich666 avatar Aug 29 '23 19:08 erich666

... here's an export from Debug World, with my custom texture pack applying an "R" in the lower left corner ...

Hmm apparently the stairs did not get the memo ... or maybe they did and it's the copper ore column that didn't (imo it looks nicer if the "R" is not flipped).

... let me know how it goes

Copper ore bottom face

I see from da96913d60a32f91a1e088c1059e619801d2132e that you have turned off bottom face reversal, but from the above it appears the bottom face actually needs to be flipped twice on both axes, or 3,4,1,2 instead of 2,1,4,3 or no reversal at all.

kazarmy avatar Aug 30 '23 04:08 kazarmy

Good catch! Me, I was happy I just got the R's to no longer be mirrored. I should have checked orientation on the faces more carefully - there's a separate code path for partial blocks like steps (which were fine, like you say) vs. full blocks. A quick change on full blocks and voila:

this_time_for_sure

This time for sure. Please give this new beta a try: https://www.realtimerendering.com/erich/minecraft/public/mineways/downloads/Mineways_11.02beta_fix2.zip

erich666 avatar Aug 30 '23 14:08 erich666

This time for sure.

yep, it can a bit tricky to pull rabbits out of hats, but the sense of relief one gets when it happens ... priceless!

Please give this new beta a try:

Copper ore bottom face (2nd time)

Looks good to me.

kazarmy avatar Aug 30 '23 14:08 kazarmy

Fast response - you're the best! Thanks for the reality check.

And of course I went down the rabbit hole on this one, checking other blocks. Logs that are oriented sideways are also wrong (now fixed). And I just noticed a bug with sunflower heads... Wish me luck :)

erich666 avatar Aug 30 '23 15:08 erich666

Also fixed bone blocks and observers, checked dried kelp. I suspect I should check over every detailed block - I know pistons are off - but good enough for now. I'll leave this issue open as a reminder to do this someday, block by block.

erich666 avatar Aug 30 '23 20:08 erich666

Fast response - you're the best!

It just so happened that I was at my keyboard with time to spare when your reply came in though :sweat_smile: ... I generally will try to respond within 24 hours, earlier if I'm on holiday.

Wish me luck :)

Good luck! Thanks for the fixes! :)

kazarmy avatar Aug 30 '23 23:08 kazarmy