Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Test Subject
Original Poster
#1 Old 29th May 2022 at 12:51 PM Last edited by java_finch : 30th May 2022 at 4:26 PM.
Default Odd lighting on a custom object
I wanted to add a model from TF2 as a custom stereo, and everything works as it should, except the lighting is behaving weirdly on the object. It's cloned from the pink boombox, so it has all the same properties.
The front of it looks dark, and the back is oddly lit in comparison. In a way, it's like the lighting is sort of inverted, but not quite? And the only way I found that makes the front lit, is if the light comes from below the object. It's hard to explain, so I made a video.

What could be the reason for this, and how can I solve it?
Advertisement
Mad Poster
#2 Old 29th May 2022 at 3:09 PM
Have you used Milkshape in the process? If so, did you at any point rotate the object in Milkshape?

Rotating the object using the regular rotation functions in Milkshape can mess with the "normals" of the mesh, causing lighting issues. There are some ways to get around this without causing lighting issues, though.

(Note: If the object already had issues when you imported it, which is to some degree visible in Milkshape, you may have to fix the normals manually).

1: Rotate using joints and animating, export while in anim mode, then import the rotated version into your work file

2: Rotate using a different meshing program that doesn't have the normals issue (Blender or similar), and import again to your project.

3: (more time consuming) Fix normals manually. If you're already stuck with a mesh that's got bad normals, and don't have the original mesh, this is pretty much what you can do (but don't do "align normals" on a mesh with a lot of angles, or you get even more issues).
Test Subject
Original Poster
#3 Old 29th May 2022 at 3:39 PM
Thank you so much for explaining, I did rotate it in Milkshape... It's originally meant to be worn like a backpack, so it was positioned at a weird angle. This thought crossed my mind, but due to my limited understanding I didn't pay attention to it.
Quote:
3: (more time consuming) Fix normals manually. If you're already stuck with a mesh that's got bad normals, and don't have the original mesh, this is pretty much what you can do (but don't do "align normals" on a mesh with a lot of angles, or you get even more issues).

I'm going to retry with Blender, but can you tell me where this information is stored, for future reference?
Mad Poster
#4 Old 29th May 2022 at 4:22 PM Last edited by simmer22 : 30th May 2022 at 10:03 PM.
Align normals is in the "Vertex" menu at the top. You have to be careful using it, because it can and will seemingly break the look of your mesh if you don't use it properly.

On meshes with a lot of angles you have to select each piece individually, do "align normals", then go to the next piece (selecting faces in Milkshape can be a real challenge sometimes, so the difficulty level varies). If you don't, it smooths all the angles where vertices meet, and you're stuck with even worse issues. It is a handy tool when you want to smooth angled pieces, and when you know how to use it, though. Takes a bit of practice.

Rotating with joints or using Blender is easier, but Blender has some issues with edge smoothing, so sometimes I prefer the Joints method over Blender, just so I don't have to go the route with fixing normals.

Joint method:
- make sure there aren't any other joints in the file. The "Joints" tab should be empty.
- Select the "Joints" button in the "Model" tab.
- Click in one of the grey viewports, so it makes a joint, it should show up in red.
- Go to the "Move" button, and move the joint so it's approximately in the middle/bottom of your item in all three viewports.
- Click "Group", and select your item/group so it shows up red.
- Go to "Joints" tab. In the first box where it currently says "--none--", select "joint1" and directly below this in the colored box, either drag the box to 100 or write 100. Click "Assign".
- "Edit --> select none" (to deselect everything).
- Click the "Anim" button at the bottom left.
- In the "Joints" tab, double-click "Joint1" in the list at the top to select it.
- "Model" tab, "Rotate" button, write "180" in the "Y" box and click "rotate" next to it. This rotates the item 180 degrees (you can rotate other angles, too, but do it step by step. Might have to change the "Rotate options" for some of them if you don't get the result you want).
---> Now, you can save the file here if you think you need to make changes to the rotation and don't want to go through this process again. Do "Edit --> select all" and "Animate --> set Keyframe". Then turn off the "Anim" button and save the file. You'll see the item rotate back to the original position.
- (If you saved the file, click the "Anim" button again to turn the item into the preferred position. If you didn't, leave it on)
- File --> Export as Wavefront OBJ (You will get a notification warning you not to export in Anim mode, you can ignore this one for now - it's an issue when you're making animations, not when cheating the system like here). Close the file (don't save).
- Open your work file, import in the new OBJ. The object should now be turned the right way and not have issues with lighting.
- You probably have to fix the position of the item with "move".


It sounds like a long process, but honestly it's not too difficult, and it can come in handy sometimes, especially if you have meshes where Blender keeps making ugly edges and you want soft edges (there's that issue, too).
Test Subject
Original Poster
#5 Old 30th May 2022 at 12:45 PM
Quote: Originally posted by simmer22
It sounds like a long process, but honestly it's not too difficult, and it can come in handy sometimes, especially if you have meshes where Blender keeps making ugly edges and you want soft edges (there's that issue, too).


It was easier than it sounds! Thank you, this is extremely helpful!



Am I allowed to upload this on MTS, or not, since I'm not the one who made the original model?
Mad Poster
#6 Old 30th May 2022 at 10:06 PM
You'll probably want to check out the creator/upload guidelines: https://modthesims.info/rubrics/
Theorist
#7 Old 31st May 2022 at 5:40 PM
Quote: Originally posted by simmer22
Align normals is in the "Vertex" menu at the top. You have to be careful using it, because it can and will seemingly break the look of your mesh if you don't use it properly.

On meshes with a lot of angles you have to select each piece individually, do "align normals", then go to the next piece (selecting faces in Milkshape can be a real challenge sometimes, so the difficulty level varies). If you don't, it smooths all the angles where vertices meet, and you're stuck with even worse issues. It is a handy tool when you want to smooth angled pieces, and when you know how to use it, though. Takes a bit of practice.

Rotating with joints or using Blender is easier, but Blender has some issues with edge smoothing, so sometimes I prefer the Joints method over Blender, just so I don't have to go the route with fixing normals.

Joint method:
- make sure there aren't any other joints in the file. The "Joints" tab should be empty.
- Select the "Joints" button in the "Model" tab.
- Click in one of the grey viewports, so it makes a joint, it should show up in red.
- Go to the "Move" button, and move the joint so it's approximately in the middle/bottom of your item in all three viewports.
- Click "Group", and select your item/group so it shows up red.
- Go to "Joints" tab. In the first box where it currently says "--none--", select "joint1" and directly below this in the colored box, either drag the box to 100 or write 100. Click "Assign".
- "Edit --> select none" (to deselect everything).
- Click the "Anim" button at the bottom left.
- In the "Joints" tab, double-click "Joint1" in the list at the top to select it.
- "Model" tab, "Rotate" button, write "180" in the "Y" box and click "rotate" next to it. This rotates the item 180 degrees (you can rotate other angles, too, but do it step by step. Might have to change the "Rotate options" for some of them if you don't get the result you want).
---> Now, you can save the file here if you think you need to make changes to the rotation and don't want to go through this process again. Do "Edit --> select all" and "Animate --> set Keyframe". Then turn off the "Anim" button and save the file. You'll see the item rotate back to the original position.
- (If you saved the file, click the "Anim" button again to turn the item into the preferred position. If you didn't, leave it on)
- File --> Export as Wavefront OBJ (You will get a notification warning you not to export in Anim mode, you can ignore this one for now - it's an issue when you're making animations, not when cheating the system like here). Close the file (don't save).
- Open your work file, import in the new OBJ. The object should now be turned the right way and not have issues with lighting.
- You probably have to fix the position of the item with "move".


It sounds like a long process, but honestly it's not too difficult, and it can come in handy sometimes, especially if you have meshes where Blender keeps making ugly edges and you want soft edges (there's that issue, too).


You are so clever and helpful. Thank you for this!
Mad Poster
#8 Old 31st May 2022 at 6:18 PM
I hope someone else can get some use out of this. I figured out it was possible back when I was learning to make poseboxes. Accessories move with the sim, and if you export the sim and accessory together in ANIM mode, both are exported in the correct pose and with the proper normals, so I thought it could work with objects, too - just needed separate/new joints. It's saved me a lot of work (rotating in Milkshape can be such a headache sometimes).

You can (while in ANIM mode) move and rotate it wherever and however you want. You can even set keys if you want to test things out, or want to export the model in different positions and rotations without having to make several Milkshape files (just remember to set keys, and save the file with ANIM mode off). You can have multiple objects and joints, too - but I suggest to keep it simple until you're comfortable working with jonts and bone assignments (since you have to do those manually).

Just make sure you don't do the same when working with a mesh that has a working skeleton attached (clothes and animated furniture). This only applies to meshes that don't already have joints.
Back to top