Difference between revisions of "Moiré pattern"

From Custom Mario Kart
Jump to navigation Jump to search
m
(Cleaned page. Hopefully this is more clear and constructive.)
Line 1: Line 1:
{{Under-construction}}
 
 
{{Bugs}}
 
{{Bugs}}
  
This page describes how the '''moiré pattern''' looks like in-game and how to fix it.
+
This page describes how the '''moiré pattern''' looks like in-game and how to fix or prevent it.
  
 
== Description ==  
 
== Description ==  
The '''moiré pattern''' is when textures appear to flicker, be wavy, or otherwise look strange from a distance. This is due to mipmaps being disabled.
+
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.
  
 
== Showcase of the moiré pattern ==
 
== Showcase of the moiré pattern ==
 
 
{{youtube-box|bug|2K6bpq1CQZ4|Mipmaps disabled in the MDL0}}
 
{{youtube-box|bug|2K6bpq1CQZ4|Mipmaps disabled in the MDL0}}
 
{{youtube-box|tutorial|2yDEmhxIyAU|Mipmaps enabled in the MDL0}}
 
{{youtube-box|tutorial|2yDEmhxIyAU|Mipmaps enabled in the MDL0}}
  
== How to fix this pattern in Brawlbox ==
+
== Importing and Encoding Mipmaps ==
 +
 
 +
=== 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>
 +
 
 +
=== 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>
  
==== Step 1 ====
+
== Re-encoding Mipmap Levels ==
Make sure your texture even has mipmaps. To do this:
+
If you have already imported your textures into your .brres file and are unsure how to add mipmaps, this simple step will help.
# Open your course model BRRES file in BrawlBox.
 
# Open the ''Textures(NW4R)'' folder.
 
# Right click the desired texture and click 'Re-Encode'.
 
# Change the 'MIP Levels' to a higher value. This value should be no more than 5.
 
  
==== Step 2 ====
+
# Go to the texture you want mipmaps to be enabled on.
[[File:Brawlbox_MinFilter_Linear_Mipmap_Linear.png|300px|thumb|Image of the BrawlBox menu]]
+
# Right click the texture and click, '''"Re-Encode"'''.
# Make sure your texture has mipmaps.
+
# Under '''MIP Levels''', enter the amount of mipmaps you want.
# Open your MDL0 in BrawlBox.
+
# Once done editing the mipmap levels, click Okay to make sure they save.
# Open the ''Materials'' folder.
+
<gallery>
# Open a material.
+
File:Re-encoding and Adding Mipmaps.png|Re-encoding textures with mipmaps after importing
# Make sure the ''Scale'' is set to (1,1) and the ''Translation'' is set to (0,0).
+
</gallery>
# Change ''MinFilter'' from ''Linear'' to ''Linear_Mipmap_Linear''.
 
# Save your course_model.brres and import it into your SZS file.
 
  
 
[[Category:Bug]]
 
[[Category:Bug]]

Revision as of 17:55, 25 July 2020

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

Description

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.

Showcase of the moiré pattern

Mipmaps disabled in the MDL0
Mipmaps enabled in the MDL0

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.