Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: How to turn 3D models into sprites. [TUTORIAL]  (Read 12871 times)

kazi

  • Admiral
  • *****
  • Posts: 714
    • View Profile
How to turn 3D models into sprites. [TUTORIAL]
« on: December 05, 2013, 03:10:51 AM »

Gotten a few PMs and saw several posts invoking my name and asking how I convert 3D models to sprites. Here's a semi-detailed overview of how I do things. Mostly copy/pasted from another thread where I was trying to help somebody out.

Here's the end result of this tutorial:


Before you render or do anything else, make sure you are in love with your models when viewed from the top. I know everything looks more awesome when you view them from an angle, but the only thing people are going to see is the top, which makes most models look absolutely awful (happened for my first few ships). Add lots of armor plating, fins, and other things that stick out from the hull a little bit to add more of a 3D feeling (you want as much structural detail in the z-axis as possible- it makes the models "pop" more). Smoothen edges by beveling and break up long flat faces with a small amount of curvature to improve your modeling software's shading of your model. Also, avoid long and skinny models, bulkier ships tend to play and handle more naturally in-game (the AI also has trouble flying and/or targeting super long and skinny ships because it treats everything like it's a circle). Don't add weapons yet unless you want them to be built into the sprite and never move! If you want details on the sides of your ships to show up, you'll need to slope the sides of your ships a bit. Use lots of angles and curves to keep things interesting (90 degree angles usually don't look very good). For reference, my two most recent models had between 1k and 2k faces (much of those were from repetitive details on the engine nacelles, so you probably won't need to shoot quite so high). I recommend working on one sprite/model at a time. Typically I learn a few new things after doing each one and this way I don't end up wasting time revising my other models (or give up on them completely) as I go along. Not really a modeling tip, but I find turning on some music and just "zoning out" while I model helps a lot. Been listening to a lot lately  ;).

When you've got a model you're happy with, put your main light source above and slightly in front of the ship's center. Put another, dimmer light behind the ship to simulate an engine glow (don't go overboard here). Make sure ambient occlusion (set to multiply) and antialiasing are enabled (makes everything look prettier). Change the color of raytraced shadows to be a super-dark grey (but not completely black). Change the colors of the materials you are using to whatever you want the main ship colors to be (you can add paint and highlights later). Fool around with the material's characteristics until you get something that reflects light the way you want (takes a lot of fiddling). Render occasionally as you go along to make sure you like what you see.

When you're ready to make your final render, do a render the normal way (with all of the shading/lights/etc). Do all of the rendering to .png, in RGBA format (the background should be transparent). Make sure the camera is set to render in perspective (and not orthographic). Now disable all of the shading and everything if you can. The way I do this in blender is by checking a little box in the materials properties menu that says "shadeless." It should make your ship look totally flat with no details besides the base colors of your materials. Render again. You should now have two renders, both exactly the same size and shape. Here's a scaled down version of what mine looked like for my most recent sprite.

                 Full render                                         "Shadeless" render

You need the program GIMP (free) for this next part (not sure if photoshop has the magic tool that makes everything work  ???). Open the normal render as your base layer in a new image. Open the shadeless render in another layer on top. Set the layer mode to "grain extract." This will "rip" all of the shading out of your normal render into a very grey image. It should look like the image below. Export the "extraction" image to .png at the same size as your renders.


Now for the awesome part. Open a new image in GIMP. Use the original "shadeless" render as the base layer. Now open the "extraction" image in another layer on top. Set the extraction's layer mode to "grain merge." Your image should now look like the original render with all of the shading. Like this:


So what did we just accomplish? Although it may seem like we are back where we started, we now have two layers: one with your model's coloring, and another with all of its shading information. This makes coloring and detailing your model a breeze. Just add layers of painting/details in between your "extract" layer and your "shadeless" render. This will make it so that all of your painting and details are shaded automatically as if they were part of the original model. I'm actually pretty bad with GIMP/photoshop (I use these modeling tricks to make up for my crappy art skills), but here's sorta the progression on how I did the actual spriting. If you've done the modeling well, the painting will look amazing since it literally shades itself (even if you suck at GIMP/photoshop like me  ;)). Check out some of the other tutorials for help on the actual painting and whatnot.



Anyhow, good luck! Why am I sharing all of my super-duper secret modeling tips with all of you? Because I want to see more and better art in the mods for this game (and I'm tired of seeing kitbash after kitbash after battleships forever sprite). I always enjoy seeing and playing new stuff! Just keep in mind that my method of modeling and painting is probably one of the most time-consuming ways possible to go about making sprites. That said, it's idiot-proof and looks quite good even if you're terrible with photoshop. You just need to be willing to invest the time required to do a good job.

PM me if you've got any burning questions and let me know if you found this tutorial helpful.
Logged

Runoved

  • Lieutenant
  • **
  • Posts: 62
    • View Profile
Re: How to turn 3D models into sprites. [TUTORIAL]
« Reply #1 on: December 05, 2013, 07:25:31 AM »

Many thanks for the excellent guide. And will it work if you use this method using engineering software for creating and rendering models such as Solidworks or ProEngineer? By the way, this music really helps.)
Logged

kazi

  • Admiral
  • *****
  • Posts: 714
    • View Profile
Re: How to turn 3D models into sprites. [TUTORIAL]
« Reply #2 on: December 07, 2013, 01:26:37 AM »

Hah, glad you liked the music!

This guide should work perfectly as long as you have some way of creating the "shadeless" render with your software. I've found that simply turning off ambient occlusion, shadows, and specular rendering is often enough, although ideally you should get rid of the diffuse lighting as well.
Logged