ThomasSimonini HF staff commited on
Commit
3238cbc
1 Parent(s): 86a810d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -10
app.py CHANGED
@@ -193,23 +193,27 @@ def do_inference(input_3d, sample_seed=0, do_sampling=False, do_marching_cubes=F
193
 
194
 
195
  _HEADER_ = """
196
- ## Step 2: Simplify the generated 3D Mesh and Shader Smooth (optional)
197
 
198
- ADD ILLUSTRATION
199
 
200
- - The 3D Mesh Generated contains too much polygons, fortunately, we can use another AI model to help us optimize it.
201
 
202
- - The model we use is called [MeshAnythingV2](https://huggingface.co/Yiwen-ntu/MeshAnythingV2).
203
 
204
- - We can make the simplified mesh more smooth is to use Shader Smooth.
 
 
205
 
206
- - You can usually do it in Blender, but we can do it directly here. Simply -> ✅ Shader Smooth.
207
 
208
- ## 💡 Tips
209
-
210
- - We don't click on Preprocess with marching Cubes, because in the last step the input mesh was produced by it.
211
- - Limited by computational resources, MeshAnything is trained on meshes with fewer than 1600 faces and cannot generate meshes with more than 1600 faces. The shape of the input mesh should be sharp enough; otherwise, it will be challenging to represent it with only 1600 faces. Thus, feed-forward image-to-3D methods may often produce bad results due to insufficient shape quality.
212
 
 
 
 
 
 
 
213
  """
214
 
215
  output_model_obj = gr.Model3D(
 
193
 
194
 
195
  _HEADER_ = """
196
+ ## Transform your high poly mesh into a low poly mesh
197
 
198
+ ➡️ You can optimize your high poly mesh, here, to the drawback is that you'll need to create a new material on Roblox.
199
 
200
+ - To optimize your high poly mesh, we use a tool called [MeshAnythingV2](https://huggingface.co/Yiwen-ntu/MeshAnythingV2).
201
 
202
+ ### The Process:
203
 
204
+ 1. Import the GLB model generated with the high poly mesh generator tool above.
205
+ 2. Check on Preprocess with marching Cubes.
206
+ 3. If you want the look of your object smooth, check "Apply Smooth Shading".
207
 
208
+ <img src="./assets/img/smooth-shading.png" alt="With or without smooth shading applied"/>
209
 
 
 
 
 
210
 
211
+ 4. Click on generate
212
+ 5. The 3D mesh is generated, and you can download the file (it's GLB format) using the ⬇️
213
+ 6. Open Roblox Studio
214
+ 7. In your Roblox Project, click on Import 3D and select the downloaded file.
215
+ 8. You can now drag and drop your generated 3D file in your scene 🎉.
216
+ 9. You can change the material and color by clicking on Color and Material in Roblox studio.
217
  """
218
 
219
  output_model_obj = gr.Model3D(