Turn 2D Images into 3D Models for FREE with AI | ComfyUI & Hunyuan3D-2 Tutorial

MDMZ www.youtube.com

סיכום תמציתי

הסרטון מציג כיצד להשתמש בבינה מלאכותית כדי להפוך תמונות דו-ממדיות למודלים תלת-ממדיים מלאים בחינם באמצעות ComfyUI ומודל Hunyuan 3D. לאחר מכן, ניתן לייבא את המודל שנוצר לכל תוכנת תלת-ממד ולכוונן אותו עוד יותר עבור פרויקטים כמו אנימציה, פיתוח משחקים ואפילו הדפסה תלת-ממדית.

  • התקנת ComfyUI והמודולים הנדרשים.
  • המרת תמונות למודלים תלת-ממדיים.
  • אופטימיזציה של הגדרות רשת ומרקם.
  • ייבוא לתוכנת תלת-ממד.

מבוא - הפיכת תמונות דו-ממדיות למודלים תלת-ממדיים בחינם!

במקום לבזבז שעות על מידול תלת-ממדי, אפשר להשתמש בבינה מלאכותית כדי להפוך תמונות דו-ממדיות למודלים תלת-ממדיים מלאים בחינם באמצעות ComfyUI ומודל ה-Hunyuan 3D. לאחר מכן, ניתן לייבא את המודל שנוצר לכל תוכנת תלת-ממד ולכוונן אותו עוד יותר עבור פרויקטים כמו אנימציה, פיתוח משחקים ואפילו הדפסה תלת-ממדית.

התקנת ComfyUI & Hunyuan3DWrapper

כדי להתחיל, יש להתקין את ComfyUI. בנוסף, יש להתקין את מודולי ה-Hunyuan 3D Wrapper, שהם הרחבה הפועלת על גבי ComfyUI. כדי להתקין את מודולי ה-Hunyuan 3D Wrapper, יש לפתוח את תיקיית ComfyUI, לנווט לתיקיית ה-"custom nodes", לבחור את נתיב התיקייה, להחליף אותו ב-"CMD" וללחוץ אנטר. בחלון הפקודה, יש להקליד "git clone" ולהדביק את הקישור ל-Hunyuan 3D Wrapper וללחוץ אנטר כדי להוריד את המודולים. בנוסף, יש להתקין כמה תלויות. יש לחזור לתיקיית ComfyUI הניידת ולחזור על התהליך: לבחור את נתיב התיקייה, למחוק אותו, להקליד "CMD" וללחוץ אנטר כדי לפתוח את חלון הפקודה ולהדביק את שורת הפקודה. לאחר מכן, יש להדביק את הפקודה השנייה וללחוץ אנטר כדי להשלים את ההתקנה.

הורדה והתקנה של מודל Hunyuan3D

לפני יצירת מודלים תלת-ממדיים, יש להוריד את קובץ מודל ה-Hunyuan 3D. יש למצוא את קובץ ה-"save tensors", ללחוץ לחיצה ימנית על כפתור ההורדה ולבחור "שמור קישור בשם". בתיקיית ComfyUI, יש לעבור ל-"models", לפתוח את "diffusion models", ליצור תיקייה חדשה בשם "h3d gen" ולשמור את מודל ה-Hunyuan שם.

הפעלה ועדכון של ComfyUI

כעת ניתן להפעיל את ComfyUI. אם הוא מותקן כבר זמן מה, יש לוודא שהוא מעודכן על ידי מעבר ל-"manager" ולחיצה על "update all".

סביבת עבודה Hunyuan3D

יש להוריד את סביבת העבודה של Hunyuan 3D Wrapper. פשוט גררו ושחררו את הקובץ שהורדתם לממשק ComfyUI כדי לטעון את סביבת העבודה. אם מופיעה הודעה על מודולים חסרים, יש לעבור ל-"manager" ולבחור "install missing custom nodes" ולהתקין את כל המודולים המוצגים ברשימה. לאחר מכן, יש להפעיל מחדש את ComfyUI וברגע שהוא מתחבר מחדש, אפשר לסגור את החלון הזה. אם עדיין רואים מודולים עם קווי מתאר אדומים, פשוט רעננו את הדף.

הגדרות מפתח

סביבת העבודה מורכבת מארבע קבוצות מודולים, שכל אחת מהן מטפלת בחלק אחר של תהליך המרת התמונה לתלת-ממד. יש להשתמש במודול "load image" כדי לבחור את התמונה. מתחת למודול "load image", אפשר להתאים את רזולוציית התמונה. במודול הטעינה, יש לוודא שהמודל נטען כהלכה. במודול "generate mesh", הגדרת "guidance scale" שולטת עד כמה הפלט התלת-ממדי תואם לתמונת הקלט. ערך ה-"steps" ישפיע באופן משמעותי על איכות הפלט. ערכי ה-"vae decode" משפיעים גם הם על איכות הפלט וגם על מהירות הדור. במודול "export mesh", אפשר להגדיר את שם הקובץ של המודל התלת-ממדי. יש לוודא שכל ההגדרות של "postprocess mesh" מוגדרות ל-"true". הגדרת "maximum phase number" חשובה גם היא. מודלים בעלי פוליגונים נמוכים מתאימים למשחקים ויישומים בזמן אמת, בעוד שמודלים בעלי פוליגונים גבוהים מציעים פירוט רב יותר עבור CGI ועיבודים מציאותיים.

התחלת יצירה

לאחר סיום התאמת ההגדרות, יש ללחוץ על "Q" כדי להתחיל ליצור את המודל התלת-ממדי. בפעם הראשונה שתריצו את זה, זה ייקח יותר זמן כי צריך להוריד מודלים נוספים. הבינה המלאכותית מתחילה לעבד ו-ComfyUI עובד דרך המודולים אחד אחד. לאחר סיום התהליך, יופיע המודל התלת-ממדי שנוצר בתצוגה המקדימה הראשונה של מודול התלת-ממד.

אופטימיזציה של הגדרות רשת ומרקם

אם לא מרוצים מהמודל, אפשר לעבור למודול "Hunyuan 3D generate mesh" ולשנות את מצב בקרת ה-"seat" ל-"randomize". זה ייצור גרסה אחרת כאשר תלחצו על "Q". אם אוהבים את המודל התלת-ממדי אבל רוצים להתאים רק את המרקם, שמרו את זרעי הרשת על "fixed" ובמקום זאת שנו את בקרת הזרעים ל-"randomize" במודול "sample multiv view". כאשר תלחצו על "Q", זה ייצור רק את דגימת המרקם וייתן לכם תחושת מרקם שונה.

ייבוא לבלנדר ותוכנות תלת-ממד אחרות

כדי למצוא את קבצי המודל, יש לעבור ל-"ComfyUI output 3D". כל פלט כולל גם את גרסאות הרשת וגם את גרסאות המרקם כקבצי GLB. קבצים אלה עובדים עם רוב תוכנות התלת-ממד כמו בלנדר, שם אפשר לשנות את המודל, להתאים מרקמים, להמחיש את המודל בסביבות שונות ועוד הרבה יותר כדי להתאים אישית ולכוונן את המודל עוד יותר. אפשר גם לייבא את המודלים האלה ל-After Effects, שתומך כעת בהבאת מודלים תלת-ממדיים ישירות לקומפוזיציות ולהוסיף אותם לסרטונים.

סרטוני AI

המחבר יצר הדרכה נוספת על יצירת סרטוני AI בחינם במחשב באמצעות Huan.

Summarize any YouTube video in seconds

Get summaries like this one for any video, in your language, with the free Summ app.

Download on the Apple Store
Get it on Google Play

Transcript

YouTube Transcript Generator

0:00 instead of spending hours on 3D modeling you can use AI to transform 2D images into full 3D models for free using comy UI and the hu 3D model you can then import the generated model into any 3D software and tweak it further for projects like animation game development and even 3D printing in this video I will walk you through the entire process from setting everything up to getting the best results before moving on I noticed that many of you watching are not subscribed so if you find this tutorial helpful make sure you subscribe and support the channel by liking this video I create these tutorials based on your requests so feel free to suggest specific topics

0:45 in the comments to get started you first need to install comy UI I've made a dedicated video guide for this so if this is your first time using it watch that video first you'll also need to install the hanu and 3D wrapper nodes which is an extension that runs on top of conf while there is a guide available it might be a bit overwhelming so I will walk you through it step by step if you encounter any issues with these nodes check the issues tab for existing Solutions you can also get help from our friendly Discord community and I will leave a link to that down below to install the hu and 3D wrapper nodes open your comfyi folder navigate to custom nodes select the folder path replace it with CMD and press enter in the command

1:32 window type get clone and paste the hyan 3D wrapper link and press enter to download the nodes besides that you will need to install a few dependencies return to your confy UI portable folder and repeat the process select the folder path delete it type CMD and press enter to open the command window and paste this command line which I will put in the description box and then press enter after that command is executed paste the second command also in the Des description box and hit enter to complete the installation before creating 3D models you will need to download the honey and 3D model file I will provide a link to this page below find the save tensors file right click the download button and select save link

2:18 as in your confy folder go to models open diffusion models create a new folder named h3d gen and save the honey model there you are now ready to launch confy UI if you've had it installed for a while make sure it's up to date by going to manager and clicking update all next download the honey 3D wrapper workflow from this page which I will link below so you can start converting images to 3D models simply drag and drop the downloaded file into your comi interface to load the workflow if you get a message about missing nodes go to manager and select install missing custom nodes install all the nodes shown in this list after that

3:04 restart confy UI and once it reconnects you can close this window if you still see red outlined nodes simply refresh the page the workflow consists of four node groups each handling a different part of the image to 3D process I'll guide you through each group and highlight the key settings you need to pay attention to in order to get the best results start by using the load image node to select your image for this demo I'm going to use a picture of a running shoe below the load image node you can adjust your image resolution while you can use the size of your original image for better results lower resolutions process faster I prefer to go with 1024x 1024 in the loader node

3:49 make sure the model is loaded correctly if it's not showing up in the list despite being downloaded go to edit and select refresh node definition to make sure the model is detected by comi in the generate mesh node the guidance scale setting controls how closely the 3D output matches your input image a higher scale creates a more faithful output while a lower scale gives more creativity to the AI and the default value of 5.5 works well as a starting point the steps value will significantly affect the output quality more steps enhance mesh quality but increase computation time I personally keep this at at 50 the vae decode settings also

4:35 impact both output quality and generation speed you can lower it down for faster generation but I prefer to set this at 512 for better detail I've noticed the number of chunks greatly affects generation Speed without much difference on the visual quality and I haven't fully tested its exact function yet since I'm not a 3D expert if any of you understand what this does please let me know in the comments below low now moving on to the export mesh node here you can set your 3D models file name right below that we have the postprocess mesh make sure to keep all these settings set to true the maximum phase number setting is another important one more faces mean a smoother 3D model

5:22 choose your face count based on your intended use for example low poly models have fewer faces making them suitable for games and real time applications while high poly models have more faces offering greater detail for CGI and realistic renders the default value of 50,000 faces works well as a starting point you can test with this setting first and adjust based on your needs this is the 3D preview node which I will explain in more detail later below that is the Delight group these nodes will remove the original lighting from the image to create consistent shadows and highlights the first first node will download the dlight model automatically during the process make sure to set the

6:07 width and height to match the dimensions you used in the imagery size node and do the same thing for the solid mask next comes the texture generation group both the render size and texture size are set to 1024 this works well for me since no other changes are needed here let's look at the texture sampling nodes this section will apply the render texture to your 3D model the hanu and 3D paint model will download automatically during the process below this you can increase the view size to 1024 you can also increase the steps for better texture quality the image size node is set to 1024x 1024 which works well there are also upscaling nodes that when enabled will further enhance your texture

6:53 quality I typically try to prioritize quality so I will enable these upscaling nodes by selecting them and pressing crl M if you enable them you will need to download an upscaling model for this I'll provide a link in the description box find the upscaling model on the linked page and save it in comy UI models upscale models I've already downloaded mine here and to ensure your image goes through the upscaling process connect the upscale image nodes output to the input of the bake from multiv view node let's move on to the 3D export mesh node here you can set the file name of your textured 3D model by default it has the same name as the 3D mesh file so I will add textured to distinguish

7:38 between both at the very end there's another preview 3D node and we'll see the difference between this and the other preview node in just a bit once you've finished adjusting the settings click Q to start generating your 3D model quick note the first time you run this it will take longer because it needs to download additional models as you will see the AI begins processing and CI Works through the nodes one by one the VA decode node handles most of the Intensive work and it's running a bit slow due to the high OCT Tre resolution even though we're prioritizing quality the process uses relatively low vram this is great news for users with lower end gpus you should be able to run this on your system

8:24 without issues once the process finishes you will see your generated 3D model in the first preview 3D node and just like that we've created a detailed 3D model from a single image and inside the preview node which has a bunch of settings to play with you can even view the model in different materials although we're not done yet but you can already see how well honey1 3D predicts what objects look like from different angles it even generated the sole and inside of the shoe when switching to wireframe you will see the structure and faces of your 3D model from all angles while this isn't perfect we can tweak this further and I will explain how in a minute looking at the delighting nodes you will notice the original lighting has been removed making the image appear

9:11 flatter with more consistent shadows and highlights the process is now upscaling the generated texture this is the final step before applying textures to our 3D model now take a look at this even when zooming in the texture details remain crisp and clear if you're not satisfied with the model here's what to do go to the honey and 3D generate mesh node and switch the seat control mode to randomize this will create a different version when you click Q if you like the 3D model but want to adjust only the texture keep the mesh seeds set to fixed and instead change the seed control to randomize in the sample multiv view node when you click Q it will only generate the texture sampling giving you a different texture feel free to experiment until you get the look you

9:57 want to find your model files go to confy UI output 3D in this folder each output includes both the mesh and textured versions as glb files these files work with most 3D software like blender where you can modify the model adjust textures visualize the model in different environments and much more to customize and tweak the model further you can also import these models into After Effects which now supports bringing 3D models directly in your compositions and adding them to your videos speaking of videos I've created another tutorial about generating AI videos for free on your computer using huan so if you're interested you can watch that video next [Music]

Share

YouTube Video Summaries