Difference between revisions of "Moiré pattern"

From Custom Mario Kart
Jump to navigation Jump to search
m (I think it's supposed to be this)
 
(15 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{Under-construction}}
+
{{Bugs}}
  
This page describes how the Moiré pattern looks like ingame and how to fix it.
+
This page describes how the '''moiré pattern''' looks like in-game and how to fix or prevent it.
  
== Showcase of the Moiré pattern ==
+
== Overview ==  
 +
The '''moiré pattern''' is when textures appear to flicker or clash at a distance. This is because [[mipmap]]s have not been enabled under the [[MDL0]] or the textures have not been imported correctly. To help prevent this issue occurring in tracks, there are a few ways in which you can help negate the effect. The main – and best solution – is explained below.
  
{{youtube-box||fpQ1vcPdQIw|A Video of SNES without Mipmaps enabled in the MDL0}}
+
== Importing and Encoding Mipmaps ==
{{youtube-box||F7kBo_-ObPE|A Video of SNES with Mipmaps enabled in the MDL0}}
+
=== Step 1 ===
 +
# Right click the .brres file and import a texture.
 +
# Find the texture you would like to import.
 +
# After selecting the texture, under '''MIP levels''' you can change the value to edit the number of mipmaps.
 +
# Once done editing the mipmap levels, click Okay to make sure they save.
 +
<gallery>
 +
File:Importing Textures With Mipmaps.png|Importing textures with mipmaps
 +
</gallery>
  
== How to fix this pattern in Brawlbox ==
+
=== Step 2 ===
 +
# Double check your texture has mipmaps enabled.
 +
# Go to the '''MDL0''' of your .brres file.
 +
# Find the material you would like to add mipmaps to.
 +
# Click the material and then the material reference.
 +
# Under the '''MinFilter''', change the node to '''"Linear_Mipmap_Linear"'''.
 +
<gallery>
 +
File:Enabling Mipmaps in the MDL0.png|Enabling mipmaps under the MDL0
 +
</gallery>
  
[[File:Brawlbox_MinFilter_Linear_Mipmap_Linear.png|300px|thumb|right|Image of the Brawlbox Menu]]
+
== Re-encoding Mipmap Levels ==
Step 1: Make sure your texture has Mipmaps.<br>
+
If you have already imported your textures into your .brres file and are unsure how to add mipmaps, this simple step will help.
Step 2: Open your MDL0 in the latest Brawlbox Version.<br>
 
Step 3: Open the Material Folder and open one Material.<br>
 
Step 4: Make sure your Scale is (1,1) or (1,-1) if your Track was imported with CTools.<br>
 
Step 5: Change MinFilter from "Linear" to "Linear_Mipmap_Linear".<br>
 
Step 6: Save your course_model.brres and import it into your SZS File.<br>
 
  
== How to fix this patter with Wiimms SZS Tools ==
+
# Go to the texture you want mipmaps to be enabled on.
 +
# Right click the texture and click, '''"Re-Encode"'''.
 +
# Under '''MIP Levels''', enter the amount of mipmaps you want.
 +
# Once done editing the mipmap levels, click Okay to make sure they save.
 +
<gallery>
 +
File:Re-encoding and Adding Mipmaps.png|Re-encoding textures with mipmaps after importing
 +
</gallery>
  
This method is not tested but should work.<br>
+
[[Category:Bug]]
<br>
 
Step 1: Make sure your texture has Mipmaps.<br>
 
Step 2: Extract your course.MDL0 from the course_model.brres.<br>
 
Step 3: Extract all Files from the MDL0<br>
 
Step 4: Open the "MDL0.s08_0.materials.XX.bin".<br>
 
Step 5: Go to the MinFilter Offset of the Material Layer and change it to 00 05.<br>
 
Step 6: Reencode the MDL0 and course_model.brres.<br>
 

Latest revision as of 18:53, 22 September 2021

This page describes how the moiré pattern looks like in-game and how to fix or prevent it.

Overview

The moiré pattern is when textures appear to flicker or clash at a distance. This is because mipmaps have not been enabled under the MDL0 or the textures have not been imported correctly. To help prevent this issue occurring in tracks, there are a few ways in which you can help negate the effect. The main – and best solution – is explained below.

Importing and Encoding Mipmaps

Step 1

  1. Right click the .brres file and import a texture.
  2. Find the texture you would like to import.
  3. After selecting the texture, under MIP levels you can change the value to edit the number of mipmaps.
  4. Once done editing the mipmap levels, click Okay to make sure they save.

Step 2

  1. Double check your texture has mipmaps enabled.
  2. Go to the MDL0 of your .brres file.
  3. Find the material you would like to add mipmaps to.
  4. Click the material and then the material reference.
  5. Under the MinFilter, change the node to "Linear_Mipmap_Linear".

Re-encoding Mipmap Levels

If you have already imported your textures into your .brres file and are unsure how to add mipmaps, this simple step will help.

  1. Go to the texture you want mipmaps to be enabled on.
  2. Right click the texture and click, "Re-Encode".
  3. Under MIP Levels, enter the amount of mipmaps you want.
  4. Once done editing the mipmap levels, click Okay to make sure they save.