Inkipedia:3D Models: Difference between revisions
m (Added fix and models repositories) |
GloverMist (talk | contribs) m (Some grammar/formatting cleanup) |
||
Line 2: | Line 2: | ||
The '''3D Models''' project's goal is to construct pseudo-3D images of the weapons in ''Splatoon'' that can be freely rotated. | The '''3D Models''' project's goal is to construct pseudo-3D images of the weapons in ''Splatoon'' that can be freely rotated. | ||
== Example == | ==Example== | ||
{{#invoke:3D viewer advanced|viewer_new | {{#invoke:3D viewer advanced|viewer_new | ||
| 3d-image-1 = S2 Weapon .96 Gal | | 3d-image-1 = S2 Weapon .96 Gal | ||
Line 8: | Line 8: | ||
}} | }} | ||
{{Quote| {{!!}} '''This is not for the faint of heart. It requires a bit of knowledge on how Blender works | {{Quote| {{!!}} '''This is not for the faint of heart. It requires a bit of knowledge on how Blender works and a lot of time and patience since a lot of models will not be centered correctly by default or would require manually editing the textures, thus requiring plenty of tweaking to get them ready for the process.''' }} | ||
== Requirements == | ==Requirements== | ||
* [https://www.blender.org/download/ Blender - 3D Model Viewer] | * [https://www.blender.org/download/ Blender - 3D Model Viewer] | ||
* [https://github.com/RadiatorSyrup/SplatoonImageGenerator Blender addon: SplatoonImageGenerator] | * [https://github.com/RadiatorSyrup/SplatoonImageGenerator Blender addon: SplatoonImageGenerator] | ||
You | The rendering system works as a Blender addon, so you will need to install the latest version of Blender. You will also need the latest version of the addon itself. | ||
Select "Code" and then "Download Zip" from the menu and you should be good to go. | Select "Code" and then "Download Zip" from the menu and you should be good to go. | ||
== Initial setup == | ==Initial setup== | ||
If you have never used Blender before, you | If you have never used Blender before, you will want to play around with it a bit to get used to the basics. | ||
This might be a good video to follow: [https://www.youtube.com/watch?v=Z8sg0nHNTTo {{YT}} ABSOLUTE Beginner Basics.. Blender For Noobs] | This might be a good video to follow: [https://www.youtube.com/watch?v=Z8sg0nHNTTo {{YT}} ABSOLUTE Beginner Basics.. Blender For Noobs] | ||
=== Installation === | ===Installation=== | ||
Once you | Once you have got Blender up and running, you will need to install the Addon itself. This is pretty straightforward. | ||
Click Edit → Preferences and select the Addons sub-menu.<br> | |||
Click on the "Install" button at the top right and then select the zip file you have downloaded. | |||
You should see the SplatoonImageGenerator addon pop up. Tick the checkbox to the left of the menu to enable the addon. | |||
In the case that the button | Now that you have got the addon installed, you will need to install the libraries the addon needs to run. Expand the menu that just appeared with the dropdown arrow and click on "Install Dependencies". This will install the Python library [https://pillow.readthedocs.io/en/stable/ Pillow] so that it can be used by Blender. | ||
In the case that the button does not work, or an error appears either near the button or on the bottom bar, don't panic! Open your command prompt and navigate to the location where your python.exe application is by entering the command <code>cd {path}</code>. Copy the path where your application is located and then enter the command <code>python -m pip install pillow</code>. | |||
Once you successfully install the required libraries, you should see a new category in the tools panel (press N on your keyboard to open the tools panel when in the 3D layout). | |||
That's it! You're all set up and ready to start loading in your models. | That's it! You're all set up and ready to start loading in your models. | ||
===Getting | ===Getting models=== | ||
You can get almost all of the Splatoon models from https://www.models-resource.com/nintendo_switch/splatoon2 | You can get almost all of the ''Splatoon'' models from https://www.models-resource.com/nintendo_switch/splatoon2. The addon has only been tested with a select few weapon models, so don't be too surprised if it does not work out of the box for some of the other types. However, with a bit of tweaking, you should be able to take images of any model of your choice, ''Splatoon'' or otherwise! | ||
The addon has only been tested with a select few weapon models, so don't be too surprised if it | |||
===Importing | ===Importing models=== | ||
Importing models is quite straightforward, simply File | Importing models is quite straightforward, simply go to File → Import → fbx, and select the model you would like to take an image of. | ||
== Using the addon == | ==Using the addon== | ||
===Addon | ===Addon structure=== | ||
'''PIC OF ADDON''' | '''PIC OF ADDON''' | ||
The helper functions can be found under "Basic Settings" and help complete commonly used tasks on the model to prepare it for rendering. Their exact functions are as follows: | The main meat of the addon is its ability to rotate and render 3D models to form the pseudo-3D images you see around the wiki. However, it comes with a few helper functions to make your life easier when rendering the models. The helper functions can be found under "Basic Settings" and help complete commonly used tasks on the model to prepare it for rendering. Their exact functions are as follows: | ||
====Base armature==== | ====Base armature==== | ||
This is to select the top-level | This is to select the top-level armature object of the model, which will dictate which model is rotated and processed. If something is not working right, check that the correct armature is selected! | ||
====Rotate and Scale==== | ====Rotate and Scale==== | ||
Rotate and Scale does exactly what it says | Rotate and Scale does exactly what it says, it rotates the model and scales it up so it is easier to navigate from the default Blender view. It relies on the fact that each model comes with the same starting rotation, though, so take care to check it has done its job correctly. | ||
====Position Cursor==== | ====Position Cursor==== | ||
The addon rotates the 3D model around the 3D cursor when rendering, rather than object origin, since the origin is rarely at the centre of mass of the model. This button places the 3D cursor at an approximate midpoint of the model. Again, it | The addon rotates the 3D model around the 3D cursor when rendering, rather than object origin, since the origin is rarely at the centre of mass of the model. This button places the 3D cursor at an approximate midpoint of the model. Again, it is not infallible, so check that it looks approximately right before rendering. | ||
====Position Camera==== | ====Position Camera==== | ||
This button positions the camera to look at the model side on, with enough margin around the edges to leave some space if the model grows when rotating. Check that the model is centred | This button positions the camera to look at the model side-on, with enough margin around the edges to leave some space if the model grows when rotating. Check that the model is centred well and that it fills the camera with a bit of margin. | ||
====Fix Object Material==== | ====Fix Object Material==== | ||
For some reason, Splatoon models are imported with backfaces visible. This button simply disables this for all meshes, so that you | For some reason, ''Splatoon'' models are imported with backfaces visible. This button simply disables this for all meshes, so that you do not have to do it yourself. You can easily see what it does to an imported model in the Rendered view. | ||
====Set HDRI==== | ====Set HDRI==== | ||
This just adds a | This just adds a skatepark HDRI to the scene to add some organic lighting. | ||
Some further options are available in Advanced Settings: | Some further options are available in Advanced Settings: | ||
====X Rotations==== | ====X Rotations==== | ||
Sets the number of rotations in the X axis displayed on the final image. More leads to a smoother rotation experience, at the cost of higher storage space. | Sets the number of rotations in the X-axis displayed on the final image. More leads to a smoother rotation experience, at the cost of higher storage space. | ||
====X Resolution and Y Resolution==== | ====X Resolution and Y Resolution==== | ||
These determine the resolution of the image rendered by Blender, '''NOT''' the final generated image. | These determine the resolution of the image rendered by Blender, '''NOT''' the final generated image. There does not appear to be much of a use for this, except to tweak the aspect ratio, but it has been left in anyway. | ||
====Output Format==== | ====Output Format==== | ||
Does what it says | Does exactly what it says. Choose between PNG (transparent) or JPEG (lower file size) | ||
Finally, to render, there are the following options: | |||
====Output Folder==== | ====Output Folder==== | ||
The folder where the final image will be placed. '''CAUTION:''' The addon uses folder called 'tmp' within the selected folder to store images | The folder where the final image will be placed. '''CAUTION:''' The addon uses a folder called 'tmp' within the selected folder to store images, so maybe make a separate folder to store the outputs if you already have a folder called tmp with the important stuff. | ||
====Render to Wiki Image==== | ====Render to Wiki Image==== | ||
Renders the final images, generates a weapon.{output format} file and a weaponoffsets.txt file with the description needed to get it to work. | Renders the final images, generates a weapon.{output format} file and a weaponoffsets.txt file with the description needed to get it to work. | ||
=== Taking images === | ===Taking images=== | ||
The basic steps to take an image are quite straightforward. Import your model, select the armature, go down the list of buttons in Basic settings, select your output folder and render! However, use each of the steps with care, as every Splatoon model is different | The basic steps to take an image are quite straightforward. Import your model, select the armature, go down the list of buttons in Basic settings, select your output folder and render! However, use each of the steps with care, as every ''Splatoon'' model is different and the addon may make mistakes. Check each step to see whether it has worked as intended. Checks are as follows: | ||
====Rotate and Scale==== | ====Rotate and Scale==== | ||
Check that the model is in the right orientation (muzzle facing left/right, handle facing down, etc.) | Check that the model is in the right orientation (muzzle facing left/right, handle facing down, etc.) If this is not the case, you will have to rotate the armature manually to fix it. | ||
Also check that the model rotates as intended (i.e local axis are lined up). The local Y-axis should pitch the | Also, check that the model rotates as intended (i.e. local axis are lined up). The local Y-axis should pitch the armature up and down as if it were aiming towards higher and lower targets. If this is not the case, you will have to reposition the armature and apply scale as necessary to get this to happen. | ||
====Position Cursor==== | ====Position Cursor==== | ||
This usually works fine, but check that the cursor is at the approximate centre of the model. You can also set Blender's pivot point to 3D cursor, and check that the model rotates naturally around it. If not, reposition the armature (or 3D cursor) so that it | This usually works fine, but check that the cursor is at the approximate centre of the model. You can also set Blender's pivot point to a 3D cursor, and check that the model rotates naturally around it. If not, reposition the armature (or 3D cursor) so that it is about right. | ||
====Position Camera==== | ====Position Camera==== | ||
Check that the model is fully framed | Check that the model is fully framed and that when rotated it never leaves the frame. You could, at this point, zoom the camera in to frame the model even closer to get a higher resolution final image, being careful that nothing leaves the frame. | ||
====Fix Object Material==== | ====Fix Object Material==== | ||
Just check that the mesh | Just check that the mesh does not look weird and inside-out after using this. Sometimes you will not have to use this button at all. If the material still looks wrong because of colour issues, shininess, surface detail or missing glow, check Advanced Usage to modify the material. | ||
====Set HDRI==== | ====Set HDRI==== | ||
Check that the model lights up in | Check that the model lights up in rendered view. If you do not want to use the skatepark HDRI, simply select your own and skip this button, which would normally overwrite it. | ||
===Advanced | ===Advanced usage=== | ||
====Setting materials==== | |||
If your material looks a bit off, the FBX import likely did not use all the textures needed for your model. It is easy enough to fix this, but some experience with Blender's shader editor is useful but not necessary. Here are some common issues and their fixes: | |||
==== | =====Missing glow===== | ||
The model is likely missing an emission shader. Add an image texture to the object material and import the texture ending with _emm from the model's images folder. Connect this as the fac value to a MixRGB node and plug this into the emission input of Principled BSDF. Turn up the emission strength, set one colour to black and the other to one of your choosing, and you should be good to go. | |||
=====Missing surface detail===== | |||
It is possible that the normal map for the model is not being applied strongly enough. Turn up the strength on the Normal Map node connected to the normal input of the Principled BSDF. | |||
=====Missing | =====Missing colours or black sections===== | ||
This might be due to a Team Colour not being applied. Add an image texture to the material and import the image ending with _tcl from the model's images folder. Connect this as Fac to a MixRGB node. Connect the albedo texture that should be already connected to Base Color to one color input. Choose a color for the other input and plug the output of the MixRGB into the Base Color of the Principled BSDF. This hopefully should fix any colour issues with the model. | |||
===== | =====Not shiny enough===== | ||
Possibly due to a missing metallic texture or roughness texture. Check which nodes on the Principled BSDF have nothing connected, out of Metallic and Roughness. Find the image ending with _mtl for Metallic, or _rgh for Roughness in your model's images folder. Add the ones you need as image textures and connect them up to the relevant node on the Principled BSDF block. | |||
==== | ====Changing lighting==== | ||
Feel free to add any other lighting if needed, if you feel it improves the look of the model. For instance, consider area lights to improve surface detail and cast shadows or coloured sunlight to add a tint to the model. You can also change the HDRI to add a different lighting effect. Just remember not to press the "Set HDRI" button as this will overwrite any HDRIs you use. | |||
== | ==Uploading your image== | ||
Upload your weapon.png image file with [[Special:Upload]]. In-case of files larger than 5 MB size, upload with [[Special:UploadWizard]]. | |||
Copy the text in weaponoffset.txt to the file's page and enter the link address of the file page to the URL parameter between the <nowiki> tags. | |||
Copy the text in weaponoffset.txt to the file's page and enter the link address of the file page to the | |||
== Models | ==Models repositories== | ||
* Splatoon: [https://www.models-resource.com/wii_u/splatoon/ models-resource] for | * ''Splatoon'': [https://www.models-resource.com/wii_u/splatoon/ models-resource] for special weapons, [https://steamcommunity.com/sharedfiles/filedetails/?id=685895429 .mdl models from the SFM Pack] | ||
* Splatoon 2: [https://www.models-resource.com/nintendo_switch/ models-resource] | * ''Splatoon 2'': [https://www.models-resource.com/nintendo_switch/ models-resource] | ||
==Help develop the addon!== | ==Help develop the addon!== | ||
===Needed features=== | |||
====Auto import textures==== | |||
It | It would be nice to have a system that would automatically import emission maps, team colour textures etc. | ||
===Known bugs=== | |||
====Github==== | ====Github==== | ||
You can find the Github here: https://github.com/RadiatorSyrup/SplatoonImageGenerator | You can find the Github here: https://github.com/RadiatorSyrup/SplatoonImageGenerator | ||
Any | |||
Any contributions are very welcome. | |||
== Weapons == | == Weapons == |
Revision as of 14:30, 25 August 2021
The 3D Models project's goal is to construct pseudo-3D images of the weapons in Splatoon that can be freely rotated.
Example
“ | Template:!! This is not for the faint of heart. It requires a bit of knowledge on how Blender works and a lot of time and patience since a lot of models will not be centered correctly by default or would require manually editing the textures, thus requiring plenty of tweaking to get them ready for the process. | ” |
Requirements
The rendering system works as a Blender addon, so you will need to install the latest version of Blender. You will also need the latest version of the addon itself.
Select "Code" and then "Download Zip" from the menu and you should be good to go.
Initial setup
If you have never used Blender before, you will want to play around with it a bit to get used to the basics.
This might be a good video to follow: ABSOLUTE Beginner Basics.. Blender For Noobs
Installation
Once you have got Blender up and running, you will need to install the Addon itself. This is pretty straightforward.
Click Edit → Preferences and select the Addons sub-menu.
Click on the "Install" button at the top right and then select the zip file you have downloaded.
You should see the SplatoonImageGenerator addon pop up. Tick the checkbox to the left of the menu to enable the addon.
Now that you have got the addon installed, you will need to install the libraries the addon needs to run. Expand the menu that just appeared with the dropdown arrow and click on "Install Dependencies". This will install the Python library Pillow so that it can be used by Blender.
In the case that the button does not work, or an error appears either near the button or on the bottom bar, don't panic! Open your command prompt and navigate to the location where your python.exe application is by entering the command cd {path}
. Copy the path where your application is located and then enter the command python -m pip install pillow
.
Once you successfully install the required libraries, you should see a new category in the tools panel (press N on your keyboard to open the tools panel when in the 3D layout).
That's it! You're all set up and ready to start loading in your models.
Getting models
You can get almost all of the Splatoon models from https://www.models-resource.com/nintendo_switch/splatoon2. The addon has only been tested with a select few weapon models, so don't be too surprised if it does not work out of the box for some of the other types. However, with a bit of tweaking, you should be able to take images of any model of your choice, Splatoon or otherwise!
Importing models
Importing models is quite straightforward, simply go to File → Import → fbx, and select the model you would like to take an image of.
Using the addon
Addon structure
PIC OF ADDON
The main meat of the addon is its ability to rotate and render 3D models to form the pseudo-3D images you see around the wiki. However, it comes with a few helper functions to make your life easier when rendering the models. The helper functions can be found under "Basic Settings" and help complete commonly used tasks on the model to prepare it for rendering. Their exact functions are as follows:
Base armature
This is to select the top-level armature object of the model, which will dictate which model is rotated and processed. If something is not working right, check that the correct armature is selected!
Rotate and Scale
Rotate and Scale does exactly what it says, it rotates the model and scales it up so it is easier to navigate from the default Blender view. It relies on the fact that each model comes with the same starting rotation, though, so take care to check it has done its job correctly.
Position Cursor
The addon rotates the 3D model around the 3D cursor when rendering, rather than object origin, since the origin is rarely at the centre of mass of the model. This button places the 3D cursor at an approximate midpoint of the model. Again, it is not infallible, so check that it looks approximately right before rendering.
Position Camera
This button positions the camera to look at the model side-on, with enough margin around the edges to leave some space if the model grows when rotating. Check that the model is centred well and that it fills the camera with a bit of margin.
Fix Object Material
For some reason, Splatoon models are imported with backfaces visible. This button simply disables this for all meshes, so that you do not have to do it yourself. You can easily see what it does to an imported model in the Rendered view.
Set HDRI
This just adds a skatepark HDRI to the scene to add some organic lighting.
Some further options are available in Advanced Settings:
X Rotations
Sets the number of rotations in the X-axis displayed on the final image. More leads to a smoother rotation experience, at the cost of higher storage space.
X Resolution and Y Resolution
These determine the resolution of the image rendered by Blender, NOT the final generated image. There does not appear to be much of a use for this, except to tweak the aspect ratio, but it has been left in anyway.
Output Format
Does exactly what it says. Choose between PNG (transparent) or JPEG (lower file size)
Finally, to render, there are the following options:
Output Folder
The folder where the final image will be placed. CAUTION: The addon uses a folder called 'tmp' within the selected folder to store images, so maybe make a separate folder to store the outputs if you already have a folder called tmp with the important stuff.
Render to Wiki Image
Renders the final images, generates a weapon.{output format} file and a weaponoffsets.txt file with the description needed to get it to work.
Taking images
The basic steps to take an image are quite straightforward. Import your model, select the armature, go down the list of buttons in Basic settings, select your output folder and render! However, use each of the steps with care, as every Splatoon model is different and the addon may make mistakes. Check each step to see whether it has worked as intended. Checks are as follows:
Rotate and Scale
Check that the model is in the right orientation (muzzle facing left/right, handle facing down, etc.) If this is not the case, you will have to rotate the armature manually to fix it.
Also, check that the model rotates as intended (i.e. local axis are lined up). The local Y-axis should pitch the armature up and down as if it were aiming towards higher and lower targets. If this is not the case, you will have to reposition the armature and apply scale as necessary to get this to happen.
Position Cursor
This usually works fine, but check that the cursor is at the approximate centre of the model. You can also set Blender's pivot point to a 3D cursor, and check that the model rotates naturally around it. If not, reposition the armature (or 3D cursor) so that it is about right.
Position Camera
Check that the model is fully framed and that when rotated it never leaves the frame. You could, at this point, zoom the camera in to frame the model even closer to get a higher resolution final image, being careful that nothing leaves the frame.
Fix Object Material
Just check that the mesh does not look weird and inside-out after using this. Sometimes you will not have to use this button at all. If the material still looks wrong because of colour issues, shininess, surface detail or missing glow, check Advanced Usage to modify the material.
Set HDRI
Check that the model lights up in rendered view. If you do not want to use the skatepark HDRI, simply select your own and skip this button, which would normally overwrite it.
Advanced usage
Setting materials
If your material looks a bit off, the FBX import likely did not use all the textures needed for your model. It is easy enough to fix this, but some experience with Blender's shader editor is useful but not necessary. Here are some common issues and their fixes:
Missing glow
The model is likely missing an emission shader. Add an image texture to the object material and import the texture ending with _emm from the model's images folder. Connect this as the fac value to a MixRGB node and plug this into the emission input of Principled BSDF. Turn up the emission strength, set one colour to black and the other to one of your choosing, and you should be good to go.
Missing surface detail
It is possible that the normal map for the model is not being applied strongly enough. Turn up the strength on the Normal Map node connected to the normal input of the Principled BSDF.
Missing colours or black sections
This might be due to a Team Colour not being applied. Add an image texture to the material and import the image ending with _tcl from the model's images folder. Connect this as Fac to a MixRGB node. Connect the albedo texture that should be already connected to Base Color to one color input. Choose a color for the other input and plug the output of the MixRGB into the Base Color of the Principled BSDF. This hopefully should fix any colour issues with the model.
Not shiny enough
Possibly due to a missing metallic texture or roughness texture. Check which nodes on the Principled BSDF have nothing connected, out of Metallic and Roughness. Find the image ending with _mtl for Metallic, or _rgh for Roughness in your model's images folder. Add the ones you need as image textures and connect them up to the relevant node on the Principled BSDF block.
Changing lighting
Feel free to add any other lighting if needed, if you feel it improves the look of the model. For instance, consider area lights to improve surface detail and cast shadows or coloured sunlight to add a tint to the model. You can also change the HDRI to add a different lighting effect. Just remember not to press the "Set HDRI" button as this will overwrite any HDRIs you use.
Uploading your image
Upload your weapon.png image file with Special:Upload. In-case of files larger than 5 MB size, upload with Special:UploadWizard.
Copy the text in weaponoffset.txt to the file's page and enter the link address of the file page to the URL parameter between the <nowiki> tags.
Models repositories
- Splatoon: models-resource for special weapons, .mdl models from the SFM Pack
- Splatoon 2: models-resource
Help develop the addon!
Needed features
Auto import textures
It would be nice to have a system that would automatically import emission maps, team colour textures etc.
Known bugs
Github
You can find the Github here: https://github.com/RadiatorSyrup/SplatoonImageGenerator
Any contributions are very welcome.