How to make a Sims 4 lamp that lights correctly
Apr 4, 2016 1:31:59 GMT -5
Bakie, Asyli, and 18 more like this
Post by orangemittens on Apr 4, 2016 1:31:59 GMT -5
Introduction
EA's lamp items use the light resource to create a light effect that brightens spaces where the lamp is placed. They use vertex paint on the mesh to determine how much the light cast by the lamp will affect the lamp itself when the lamp is turned on and what parts of the lamp will be affected.
This picture shows the lamp used for the tutorial before the light resource was edited and before vertex paint was applied to the mesh compared to how it looks just sitting in a room with its light off and how it looks with light resource editing and vertex paint with the light turned on.
As you can see vertex paint limits the light effect on the mesh allowing you to control which parts of the mesh will light up when the lamp is turned on and how much those parts will light up. Editing of the light resource allows fine tuning of the size of the light effect cast in the room around the lamp and where that light effect will appear in relation to the lamp. This tutorial will show you how to take advantage of vertex paint and light resource editing to fine tune the appearance of your lamp item in the game.
What you will need
Sims 4 Studio
Blender 2.70
Instructions
1. Clone the EA lamp you wish to work with and click the Meshes tab.
2. Export the LOD 0 and open it in Blender. Go to Vertex Paint mode and choose Solid Shading. This will allow you to see EA's vertex paint on the original item. You will note that the lamp shade is a very pale grey or white. The base of the lamp is almost black at the bottom and there is a grey gradient between these two extremes. In the game wherever there is white vertex paint the lamp mesh will brighten significantly when the lamp is turned on. Parts that are vertex painted black will be unaffected by the lamp light. Dark grey vertex painted parts will brighten less than parts with lighter grey vertex paint.
3. Switch back to textured shading if you like. Import your .obj mesh, append your .blend mesh, or create your new mesh.
4. Change your mesh's cut number so that it matches the cut number of the EA mesh you are replacing. Note, your mesh group does not have to have the same name as the mesh group you are replacing but it does need to have the same cut number.
5. Delete the EA mesh group so that your mesh group and the shadow plane mesh group are all that remain. Edit the shadow plane mesh group so it fits your new mesh as usual.
6. Switch to Face select and switch to Solid Shading again. Select a part of your mesh that will require vertex paint. Here I've selected the dome of the mesh because this dome is separated from the bulb by a solid stone part of the lamp. This dome is thus outside the area where light would reach it if the lamp were to be turned on so it will need to have black vertex paint.
7. Switch back to Vertex Paint mode. Click the small cube icon just to the right of the Shading menu. This is the "face selection masking for painting" option. Clicking it will turn it on and its grey background will change color slightly when you click it indicating that it is enabled. When this feature is enabled only the faces you select in Edit mode will be affected as you apply vertex paint in Vertex Paint mode. This is very helpful in easily controlling where vertex paint is applied. Since Blender applies vertex paint in a spray paint like fashion using the masking feature is one easy way to get that paint where you want it and nowhere else. Once you click it you will notice a difference in color between the parts of your mesh you had selected and the parts of the mesh that were unselected. The selected parts will be brighter white. These brighter white parts are the only parts that you will be able to apply paint to until you switch back to Edit Mode and select different faces.
8. To change the color of your vertex paint slide the small dot up and down in the brush color bar. As you move it you will see the color change in the circle just to the left. The color there is what will be applied as you paint your mesh. For all standard EA lamps the colors you will want are black, white, and various shades of grey between. You can change the size of the area that is sprayed with vertex paint by altering the radius. You can change how heavily it is applied by altering the strength. Here, since I want a large area painted a solid color I've increased the radius and left the strength at the default of 1.000.
To apply vertex paint position your mouse over the vertices you want to paint and click the left mouse button. Paint will be applied when you mouse click on a vertex rather than when you click the face between vertices and it will be applied in a fashion that radiates outward from that vertex. This will create a gradient which is sometimes what you want. In this case I don't want a gradient so I have clicked until the entire dome turns solid black.
9. For areas on your mesh where you want a gradient of illumination you can first apply one shade of grey to the whole thing and then change the color and apply light touches to add that gradient. Here I applied a shade of grey, selected a darker color to apply in the brush bar, changed the radius of the brush so that it was smaller, and lowered the strength significantly. Then a tap or two on each of the top vertices of the relevant faces made a slightly darker band at the top of this section.
10. This will result in a subtle shading that adds detail to your light effect in the game.
11. Continue painting your entire mesh so that the areas closest to the light source are brightest and those furthest away (or blocked completely from it as the dome on this item is) are darkest. When you're done you should have something that looks like a lamp the shape of your lamp was put in the game with a grey texture. Note that for this mesh, the center part where the light source is was left white while areas that would be partially lit are various shades of grey.
12. Switch back to Edit Mode and, if you want to, back to Textured Shading. Switch back to Vertex select also. Select a vertex that is in the vicinity of the center of the light source part of your mesh.
13. Click n on your computer keyboard to bring up the side bar menu. Scroll to the top so you can see the Transform section. This will give you the exact location of the selected vertex. The height of the vertex is in the Z field. Click in that field and click c on your keyboard to copy the number there.
14. Save the .blend. Back in Studio import the mesh and then click the Warehouse button.
15. Select the Light resource line on the left. Click the Edit Items button in the Lights section on the right.
16. Paste the number you copied in Blender into the Transform field. The Transform field lists the numbers in X,Z,Y order so your Z value should go between the X and Y numbers as shown.
17. The At field values describe a field of space in the game, filled with light, that is relative to the transform position and determines what direction and how large that field will be. To lower the point at which that field is brightest you can lower the z value for example. To flip the direction up instead of down you can add a negative sign to the z value. Edit yours according to the requirements of your light. You may have to play around with it a bit to get the result you're aiming for until you're used to how it works.
18. When you're done making your edits in the Warehouse return to the Studio tab to work on the rest of the LODs and to import your mesh's textures. Save your .package and test in the game.
If you have any questions about this tutorial post them in the thread below.
EA's lamp items use the light resource to create a light effect that brightens spaces where the lamp is placed. They use vertex paint on the mesh to determine how much the light cast by the lamp will affect the lamp itself when the lamp is turned on and what parts of the lamp will be affected.
This picture shows the lamp used for the tutorial before the light resource was edited and before vertex paint was applied to the mesh compared to how it looks just sitting in a room with its light off and how it looks with light resource editing and vertex paint with the light turned on.
As you can see vertex paint limits the light effect on the mesh allowing you to control which parts of the mesh will light up when the lamp is turned on and how much those parts will light up. Editing of the light resource allows fine tuning of the size of the light effect cast in the room around the lamp and where that light effect will appear in relation to the lamp. This tutorial will show you how to take advantage of vertex paint and light resource editing to fine tune the appearance of your lamp item in the game.
What you will need
Sims 4 Studio
Blender 2.70
Instructions
1. Clone the EA lamp you wish to work with and click the Meshes tab.
2. Export the LOD 0 and open it in Blender. Go to Vertex Paint mode and choose Solid Shading. This will allow you to see EA's vertex paint on the original item. You will note that the lamp shade is a very pale grey or white. The base of the lamp is almost black at the bottom and there is a grey gradient between these two extremes. In the game wherever there is white vertex paint the lamp mesh will brighten significantly when the lamp is turned on. Parts that are vertex painted black will be unaffected by the lamp light. Dark grey vertex painted parts will brighten less than parts with lighter grey vertex paint.
3. Switch back to textured shading if you like. Import your .obj mesh, append your .blend mesh, or create your new mesh.
4. Change your mesh's cut number so that it matches the cut number of the EA mesh you are replacing. Note, your mesh group does not have to have the same name as the mesh group you are replacing but it does need to have the same cut number.
5. Delete the EA mesh group so that your mesh group and the shadow plane mesh group are all that remain. Edit the shadow plane mesh group so it fits your new mesh as usual.
6. Switch to Face select and switch to Solid Shading again. Select a part of your mesh that will require vertex paint. Here I've selected the dome of the mesh because this dome is separated from the bulb by a solid stone part of the lamp. This dome is thus outside the area where light would reach it if the lamp were to be turned on so it will need to have black vertex paint.
7. Switch back to Vertex Paint mode. Click the small cube icon just to the right of the Shading menu. This is the "face selection masking for painting" option. Clicking it will turn it on and its grey background will change color slightly when you click it indicating that it is enabled. When this feature is enabled only the faces you select in Edit mode will be affected as you apply vertex paint in Vertex Paint mode. This is very helpful in easily controlling where vertex paint is applied. Since Blender applies vertex paint in a spray paint like fashion using the masking feature is one easy way to get that paint where you want it and nowhere else. Once you click it you will notice a difference in color between the parts of your mesh you had selected and the parts of the mesh that were unselected. The selected parts will be brighter white. These brighter white parts are the only parts that you will be able to apply paint to until you switch back to Edit Mode and select different faces.
8. To change the color of your vertex paint slide the small dot up and down in the brush color bar. As you move it you will see the color change in the circle just to the left. The color there is what will be applied as you paint your mesh. For all standard EA lamps the colors you will want are black, white, and various shades of grey between. You can change the size of the area that is sprayed with vertex paint by altering the radius. You can change how heavily it is applied by altering the strength. Here, since I want a large area painted a solid color I've increased the radius and left the strength at the default of 1.000.
To apply vertex paint position your mouse over the vertices you want to paint and click the left mouse button. Paint will be applied when you mouse click on a vertex rather than when you click the face between vertices and it will be applied in a fashion that radiates outward from that vertex. This will create a gradient which is sometimes what you want. In this case I don't want a gradient so I have clicked until the entire dome turns solid black.
9. For areas on your mesh where you want a gradient of illumination you can first apply one shade of grey to the whole thing and then change the color and apply light touches to add that gradient. Here I applied a shade of grey, selected a darker color to apply in the brush bar, changed the radius of the brush so that it was smaller, and lowered the strength significantly. Then a tap or two on each of the top vertices of the relevant faces made a slightly darker band at the top of this section.
10. This will result in a subtle shading that adds detail to your light effect in the game.
11. Continue painting your entire mesh so that the areas closest to the light source are brightest and those furthest away (or blocked completely from it as the dome on this item is) are darkest. When you're done you should have something that looks like a lamp the shape of your lamp was put in the game with a grey texture. Note that for this mesh, the center part where the light source is was left white while areas that would be partially lit are various shades of grey.
12. Switch back to Edit Mode and, if you want to, back to Textured Shading. Switch back to Vertex select also. Select a vertex that is in the vicinity of the center of the light source part of your mesh.
13. Click n on your computer keyboard to bring up the side bar menu. Scroll to the top so you can see the Transform section. This will give you the exact location of the selected vertex. The height of the vertex is in the Z field. Click in that field and click c on your keyboard to copy the number there.
14. Save the .blend. Back in Studio import the mesh and then click the Warehouse button.
15. Select the Light resource line on the left. Click the Edit Items button in the Lights section on the right.
16. Paste the number you copied in Blender into the Transform field. The Transform field lists the numbers in X,Z,Y order so your Z value should go between the X and Y numbers as shown.
17. The At field values describe a field of space in the game, filled with light, that is relative to the transform position and determines what direction and how large that field will be. To lower the point at which that field is brightest you can lower the z value for example. To flip the direction up instead of down you can add a negative sign to the z value. Edit yours according to the requirements of your light. You may have to play around with it a bit to get the result you're aiming for until you're used to how it works.
18. When you're done making your edits in the Warehouse return to the Studio tab to work on the rest of the LODs and to import your mesh's textures. Save your .package and test in the game.
If you have any questions about this tutorial post them in the thread below.