Hacks and Tips on How To Make a 3D Sci-Fi Gun
In this blogpost I will try to share as much workflow hacks, shortcuts and tips as possible by showing a breakdown on one of my latest works: The Morphine spine injector.
The beginning, awakening of an idea, gathering references
Because this was a school assignment I had a concrete subject, –Medic.
The best site hands down for references and inspiration is Pinterest.
For this course we may use existing concepts, if we declare it in a correct way.
These were the 3 concepts I liked the most.
Out of these 3 I took the third one, a beautiful concept from Kris Thaler.
It didn't quite fit the theme, but that can be solved with a simple fotobash.
Once I’m done I place all my references and other pictures in a Pure.ref file.
Pure ref - this free program is amazing, can't stress it enough.
First I place a reference plane into my scene with the image of the concept.
Ideally you would want 4 planes with a front back side and top view. Since we're working with concepts, one plane will have to do.
In the layer panel we freeze the plane. Then press right on the layer, properties, there you should see – show frozen in gray. Turn that off.
You can use the default alt+x shortcut to make the object transparent.
But what I'm using is a custom transparent material where the user controls the amount of transparency.
- Start by making a default gray material and apply this onto you model
- Go to grapeditors then look for curve editor
- Once in the curve editor you open the material branch of the object
- Then click the extended parameters and look for opacity
- Here you place a key on position 0, the value will be the amount seethrough ex. 60
- On position 100 you use the value 100
- Now you van use the home and end keys to toggle or use the timeslider.
In the blockout phase I try to keep the polycount as low as possible. When I use pro boolean, I use plenty to get the cutout as accurate as possible. It's easier to remove some edges than to add some afterwards.
In this article the pro boolean is explained in greater detail. I highly recommend looking more into it. Sometimes there’s some cleanup to-do, but there's a quick trick to clean up dead vertices.
- In the ribbon look for the selection tab
- Make sure you’re in vertex subobject mode
- And fill in 2 and click on =
- Delete this selection
For the cylinder piece I’ve also used the proboolean technique.
Don't forget to use the symmetry modifier to save a lot of time, 90% of this model is symmetrical. I continue to model until I can't see a difference between the main shape of my model and the reference.
Converting to base mesh & making it highpoly
In this phase I added detail to the blockout Mesh. After this stage you shouldn't be adding new parts. When I’m sure all the parts are modeled, I split the mesh up in different parts for the highpoly on a logical manner. Like it would be in real life.
I use the quadchamfer plugin to activate and deactivate control edges in a super quick way. It's placed on the mesh as a modifier so it’s nondestructive and you can change the parameters anytime.
There are many ways you can use this plugin. I use the crease over smoothing-groups, so they are already correct for the bake.
Place your smoothing-groups according to where you want your edges to be.
I start by adding the smooth modifier on the mesh with auto smooth enabled.
After that I use the polysmoother plugin to visualize the smoothing-groups in a incredible handy way. It gives every smoothing group there own color.
Sometimes there's pinching but by changing or assigning multiple smoothing groups to the poly it should be fixed.
When you’re done:
- Add the quadchamfer plugin
- Change it to smoothing-group
- Add an turboSmooth modifier.
Tada... that part is now highpoly.
If you want a smoother result just go back in the modifier stack to the quadchamfer and increase the value.Don't forget to place the symmetry modifier underneath the turbosmooth. You can't just use turbosmooth for the more extreme angles, like the ammo holder.
For these situations I use the ZBrush method, explained in the article about proboolean.
The ZBrush Method
Because our smoothing groups are already assigned correctly, we can convert these to Zbrush polygroups.
Before we do that we need to fix some ngons by adding the turn to poly modifier and cleaning up the sharp corners manually.
Then export the part as obj with the zbrush preset and don't forget to turn on smoothing groups.
Now in ZBrush with the Smooth group Import plugin we can convert our smoothing groups to polygroups what saves us a lot of time.
- Open Zbrush
- Go to zplugin
- Crease groups > crease smooth groups
- Select the obj you’ve created
- Drag drop model
Now the polygroups should be matching the smoothing groups
- divide the mesh 2 or 3 times
- uncrease and divide again 2 of 3 times to get that smooth edge
Sometimes there are still some holes in the mesh, you can solve that in ZBrush directly or go back and forth to max.
Now everything should be Highpoly.
Making the lowpoly
Because we used a non-destructive workflow turning it back to low poly is easy.
Make sure you copy the whole highpoly onto a new layer.
Just delete the turbosmooth and quad-chamfer modifier and you’re 80% there.
The pieces are still separated like the highpoly, so now optimize the mesh and make it all one piece if possible.
Again we can use our smoothing groups to our advantage, take a piece of your mesh and in the explode tab click flatten by smoothing group.
Now all the uv islands are made according to the smoothing groups.
There will be some manual stitching left to do, but its minimal. Also don't forget to use the relax tool it can save you a lot of time. Islands are the patches polygons that are stitched together in the unwrap.
Now it's just puzzling the pieces into a nice uv tile.
Also take Texel density in consideration, try to make the whole object as uniform as possible.
Texel density is the amount of pixels each island receive from the uv.
All the islands should proportionally have the same amount of pixels. If you want to know more about this here you can read a beautiful article.
Make sure you don't have multiple smoothing groups on the same island otherwise there's a big chance you will have gradients in your normal map.
If a part of the model requires an other shader (ex. glass) you can use a second uv for that.
Before we start baking we need to rename our meshes, match the high and low poly meshes in name and add the _Highpoly and _Lowpoly suffix at the end.
This can easily be done by selecting the meshes, right click in the layer window and press rename. Now a useful window will popup.
If you have multiple high poly meshes for one low poly give them all the same base name.
In Substance Painter I use these settings, bake your AO afterwards without subsampling.
The front and rear distance value depends on the model but shouldn't be much higher than this. If you have gradients in your normal map, check your smoothing groups or uv islands.
Most of the time I start by using the color id map to seperate my mesh in groups, and get a global overview of the color scheme and materials I'm going to use.
Once I’m working I frequently jump back and forth between layers. To keep it clean I use the colors in the layer tab, these were added recently.
Green are the layers that are fine at that moment.
Purple is my active layer where I'm working on.
Blue are the main or important layers and orange are layers that still need some work but are on hold.
For texturing I don't use a lot of hacks/tricks, accept using reference for every material that you are trying to make.
Look at their characteristics and properties and build them up in layers.
Also look on Artstation how other people tackle that material.
If I can't get the desired result I download a material pack or use share and continue to work on top of that.
Lighting in Unreal
Once you’re done texturing, load the textures into Unreal.
With the textures that calculate parameters do the following: turn off sRGB and put them in grayscale mode. Otherwise you will get wrong results.
You can do this easily by selecting all the textures you need, click right, asset actions and look for bulk edit via property matrix.
Here you can change all the parameters at once.
If you want to make the hdri visible in your render you can use this material. It’s very versatile: you can change the rotation, exposure, strength …
Place this on a sphere bsp and scale it ginormous.
On the site hdrihaven you can download all kinds of high quality free HDRI’s.
For lighting I work in this order:
- EV on 0 to be as neutral as possible
- Game settings off
- Set the fov on something realistic like 30 to 45 deg
Place a skylight with an hdri in your scene. Rotate and change the value to give it a neutral but interesting look.
Don't forget to ‘turn off lower hemisphere is solid color’ in your skylight.
Change your EV again to make it more appealing.
Before continuing, I add a postprossesing volume and turn off infinite extend. If you use bloom, always use the convolution setting. Lock the exposure min on 1 max on 1. Screenspace reflections quality on 100 and max roughness needs to be on 0.8
In rendering features you can play with your AO and make it pop more. I do the color correcting after the lighting.
Placing the lights:
Begin by saving your position by pressing ctrl + 1,2,3,...
Then add a directional light in the scene and rotate it. Try to get highlights on the edges. If you want to make a beautiful render of your object you need to have nice highlights and a lot of rimlight to show off the shape.
For every pose I make a new light setup and each can easily have 20+ light per pose.
Once you’re done with your pose and color correcting, you can start taking screenshots. If you don't want a background on the render add a custom depth pass to the mesh.
You can increase the screen percentage to get even sharper results but if you combine this with a custom depth pass Unreal will crash, it’s bugged.
Don’t forget to press G (game mode) when taking a screenshot to hide the grid, outline and gizmo.
In Photoshop play around with the levels until you get a nice popping result. We want to give the render with the transparent background a neutral background. This is easy by using the gradient tool and putting it on radial. If you export the image sometimes ‘banding’ will occur.
This can be solved by adding a noise to the gradient:
- Change the image mode 16-bit
- In the filter tab - add a median noise
- Then in filter tab - add gaussian blur
After that you can change it back to 8bit if necessary.
The values that you need to use depends on the image, play around with it.
This video explains it in much more detail.
If all went right the project should be ready to summit to the Rookies.
Thanks for reading this blogpost.
My intention was to teach every reader something new that they didn't know.
Hopefully I succeeded!