VonHelton Posted October 21, 2022 Share Posted October 21, 2022 Ok, I've made some beautiful ceiling fans for Fallout 4. But, they no longer casts a spinning shadow on the ceiling. But if I put a default fan next to mine, suddenly it casts shadows.I tried to click "cast shadows" in my BGEM file, but for some reason, it doesn't take. Ideally, I want my ceiling fans to cast a shadow without having to hang a default fan next to it.Is there something in 3ds Max, Nifskope or Creation Kit I'm overlooking? :mellow: Link to comment Share on other sites More sharing options...
ChuckYufarley Posted October 24, 2022 Share Posted October 24, 2022 Does your custom fan have a light, similar to the vanilla ceiling fan? If so, does it use the same BSValueNodes as the vanilla ceiling fan, specifically AddOnNode244? The vanilla ceiling fan light doesn't use shadow casting addon node lights, but AddOnNode244 uses a light with a gobo to project the blades' "shadow". I'm not certain how gobos work, but since the light itself is not a shadow casting light, I suspect there's some trickery at work where a texture that looks like a shadow is projected onto nearby surfaces, saving the game from having too many shadow casting lights in the same cell. With a non shadow casting light source, it wouldn't matter if you've ticked "cast shadows" in your material file. Lastly, if you're using the same BSValueNodes as the vanilla ceiling fan, have you ticked Bit 4 in the BSXFlags? This must be ticked in order for nifs to be able to utilize BSValueNodes. If your fan has blades that are different in shape, number or size from the vanilla ceiling fan, the gobo effect from AddOnNode244 might not look right since it's made to look like a shadow for the vanilla ceiling fan blades. In this case, if you want an actual shadow that matches your actual mesh, you could change the value of the BSValueNode in your nif to 60, which is the CK addon node index number for a shadow casting light. I could help you set this up if I could have a look at your fan nif. That way I can see how you have it set up and maybe determine why it's not working for you. Link to comment Share on other sites More sharing options...
VonHelton Posted October 25, 2022 Author Share Posted October 25, 2022 (edited) "you could change the value of the BSValueNode in your nif to 60" I did this, and it did give me a shadow, but the shadow is on the wall, not the ceiling.BUT! This will come in VERY handy with floor lamps & table lamps! :thumbsup: :thumbsup: :thumbsup: :thumbsup: :thumbsup: :thumbsup:Now we just need to figure out how to get it on the ceiling........ :confused: EDIT: I got it! To cast to a wall, you have the node horizontal to the object, to cast to the ceiling, you have the node BELOW the object, and to cast to the floor, you want the node ABOVE the object. OUT f***ing STANDING, good sir! :dance: :dance: :dance: :dance: :dance: Edited October 25, 2022 by VonHelton Link to comment Share on other sites More sharing options...
ChuckYufarley Posted October 25, 2022 Share Posted October 25, 2022 Glad it worked out for you. Link to comment Share on other sites More sharing options...
VonHelton Posted October 25, 2022 Author Share Posted October 25, 2022 Glad it worked out for you. Ok, but it's NOT working on wall lamps! WTF?? :confused: :confused: :confused: :confused: :confused: https://staticdelivery.nexusmods.com/mods/1151/images/64383/64383-1666726388-798002465.jpeg Link to comment Share on other sites More sharing options...
ChuckYufarley Posted October 27, 2022 Share Posted October 27, 2022 (edited) I can't tell from the image what the complete structure of the light mesh is, or what part of it should be casting a shadow and where. The part up against the wall looks to be open, so there really wouldn't be anything to cast a shadow on the wall. Where in relation to the bulb portion is the BSValueNode situated? I typically center it in the middle of the bulb portion of a mesh. What you mentioned initially when you got it to work is placing it above, below or horizontally to the object, which should work with a value of 60, since that light is omnidirectional, but perhaps in the case of your wall lamp it's inside the mesh, or behind the wall? If it's inside or behind a mesh that has a two sided material, then that mesh would block out the light. If it's behind or inside a mesh with one sided material, then the mesh wouldn't cast a shadow. One sided material will only cast a shadow from if the light is coming from outside the visible portion of the mesh itself. In other words, if your mesh has one sided material, and the light is coming from inside or behind the visible portion of the mesh, it won't cast a shadow. Also, the light used in the addon node with value 60 has a radius of 256 units and a near clip value of 16. With a radius of 256, the shadow would project outwards to the length of a standard wall unit, but not all the way across a larger area. Not sure what the near clip value determines. This is from the Bethesda Creation Kit site: https://www.creationkit.com/fallout4/index.php?title=Light Near Clip: Controls the shadow bias of shadow-casting lights, the default value (7.2174) needs tweaking in most cases. If this value exceeds the Radius value, the light will disappear. If the default value is 7.2174, and addon node 60 has a value of 16, maybe that's causing the issue. Not sure though. You could try making a custom addon node in the CK and giving it a custom light with different values to see if that helps. One more thing to look into, with regard to position and rotation of the BSValueNode. Although it shouldn't matter when using an omnidirectional addon node (usually this applies more with spotlights) the default rotation of the light source is 90 degrees to the right, if you're looking at your mesh from the front. I know "front" view in Nifskope is actually from the rear of the mesh, but you want to be looking at it from the front as in how it looks in your 3D app or in game. In the attached screenshot, from the front of the mesh, the default rotation of a light placed in the middle of the mesh, points in the direction of the arrow. Like I said, I've only dealt with this when using spotlights, but maybe it applies to omnidirectional lights as well. Rotate the BSValueNode to change the direction the light will shine. Kind of hard to do in Nifskope without a visual representation of the light, but you can make a dummy object like an arrow that points to the right, rotate that, then copy the dummy's transform to your BSValueNode. I know my explanation gets rather convoluted. It's easier for me to do it rather than explain how to do it. Edit: Everything I said about the default rotation of the light is when the BSValueNode is set to a 0,0,0 rotation. If you copied the node from another nif, it might have some wild rotation already assigned to it and it's anybody's guess which way the light itself actually points. Hope this helps. Edited October 27, 2022 by ChuckYufarley Link to comment Share on other sites More sharing options...
VonHelton Posted October 27, 2022 Author Share Posted October 27, 2022 (edited) I can't tell from the image what the complete structure of the light mesh is, or what part of it should be casting a shadow and where. The part up against the wall looks to be open, so there really wouldn't be anything to cast a shadow on the wall. Where in relation to the bulb portion is the BSValueNode situated? I typically center it in the middle of the bulb portion of a mesh. What you mentioned initially when you got it to work is placing it above, below or horizontally to the object, which should work with a value of 60, since that light is omnidirectional, but perhaps in the case of your wall lamp it's inside the mesh, or behind the wall? If it's inside or behind a mesh that has a two sided material, then that mesh would block out the light. If it's behind or inside a mesh with one sided material, then the mesh wouldn't cast a shadow. One sided material will only cast a shadow from if the light is coming from outside the visible portion of the mesh itself. In other words, if your mesh has one sided material, and the light is coming from inside or behind the visible portion of the mesh, it won't cast a shadow. Also, the light used in the addon node with value 60 has a radius of 256 units and a near clip value of 16. With a radius of 256, the shadow would project outwards to the length of a standard wall unit, but not all the way across a larger area. Not sure what the near clip value determines. This is from the Bethesda Creation Kit site: https://www.creationkit.com/fallout4/index.php?title=Light Near Clip: Controls the shadow bias of shadow-casting lights, the default value (7.2174) needs tweaking in most cases. If this value exceeds the Radius value, the light will disappear. If the default value is 7.2174, and addon node 60 has a value of 16, maybe that's causing the issue. Not sure though. You could try making a custom addon node in the CK and giving it a custom light with different values to see if that helps. One more thing to look into, with regard to position and rotation of the BSValueNode. Although it shouldn't matter when using an omnidirectional addon node (usually this applies more with spotlights) the default rotation of the light source is 90 degrees to the right, if you're looking at your mesh from the front. I know "front" view in Nifskope is actually from the rear of the mesh, but you want to be looking at it from the front as in how it looks in your 3D app or in game. In the attached screenshot, from the front of the mesh, the default rotation of a light placed in the middle of the mesh, points in the direction of the arrow. Like I said, I've only dealt with this when using spotlights, but maybe it applies to omnidirectional lights as well. Rotate the BSValueNode to change the direction the light will shine. Kind of hard to do in Nifskope without a visual representation of the light, but you can make a dummy object like an arrow that points to the right, rotate that, then copy the dummy's transform to your BSValueNode. I know my explanation gets rather convoluted. It's easier for me to do it rather than explain how to do it. Edit: Everything I said about the default rotation of the light is when the BSValueNode is set to a 0,0,0 rotation. If you copied the node from another nif, it might have some wild rotation already assigned to it and it's anybody's guess which way the light itself actually points. Hope this helps. What I was expecting to see was dark patterns on either side of the wall lamp, due to the fact that 60 uses the actual 3D mesh to make its shadows. Unfortunately, that hasn't happened. But 60 is still working, I just need to try a different placement? 60 will cast a shadow even if the object in question is NOT animated? :ermm: EDIT: Is there any additional Branches I need to make 244 work?Also, I have AddOnNode 209 in there as well. Could it be doing something? If so, what? :confused: :confused: :confused: :confused: Edited October 27, 2022 by VonHelton Link to comment Share on other sites More sharing options...
ChuckYufarley Posted October 28, 2022 Share Posted October 28, 2022 Try deleting 209. I don't know what type of effect it creates in the vanilla ceiling fan to have the 2 light sources placed close together like that. But, since 209 and 244 are non-shadow lights, they must not affect one another. On the other hand, having one non-shadow (209) and one shadow (60) in close proximity to one another, there might be some conflict going on. You did mention earlier that initially when you change the value of 244 to 60, the shadow you got was only pointing in one direction. Perhaps 209 was blocking the shadow that 60 was casting towards it. I don't know if you read the Creation Kit link I posted, but there's a lot of good information about lights in it. Link to comment Share on other sites More sharing options...
VonHelton Posted October 29, 2022 Author Share Posted October 29, 2022 Try deleting 209. I don't know what type of effect it creates in the vanilla ceiling fan to have the 2 light sources placed close together like that. But, since 209 and 244 are non-shadow lights, they must not affect one another. On the other hand, having one non-shadow (209) and one shadow (60) in close proximity to one another, there might be some conflict going on. You did mention earlier that initially when you change the value of 244 to 60, the shadow you got was only pointing in one direction. Perhaps 209 was blocking the shadow that 60 was casting towards it. I don't know if you read the Creation Kit link I posted, but there's a lot of good information about lights in it. This is the effect (ultimately) that I'm after........ (33 Colors) DEMMEX 2019 Turkish Moroccan Mosaic Table Lamp with US Plug & Socket, Swan Neck Handmade Desk Bedside Table Night Lamp Decorative Tiffany Lamp Light, Antique Color Body (28) - - Amazon.com :smile: :smile: :smile: :smile: :smile: Link to comment Share on other sites More sharing options...
ChuckYufarley Posted October 29, 2022 Share Posted October 29, 2022 (edited) Yikes! That's a tall order. You can definitely get the lighted, multi-color glass effect for the globe part, but I don't think casting multi-color light onto surrounding surfaces is possible, at least not in a way that would work IRL. In my experience, in game light cast through a colored glass material doesn't take on the glass material color, but instead remains it's original color. One way that could work, however, is to create multiple custom lights in the CK, colored to represent each of the colors used in the glass globe, and assign a unique gobo to each of them that would block out everything except those corresponding colored areas of the globe. Think of it like shining a flashlight through a tin can that has several holes punched in the bottom. In this case, the gobo would be the tin can. Each light would be assigned to a custom addon node in the CK, and each value of these addon nodes would be assigned to a BSValueNode contained in your custom light nif. I must admit, as I'm thinking of a way to achieve this effect, I'm a bit intrigued by the idea of getting it to work. A couple things that give me pause are not knowing how many addon nodes can be placed at the same spot without creating conflict with one another, and whether or not light from one addon node would be visible when cast onto the blacked out portion of a gobo from another addon node. Like I said previously, I've never worked with gobos, and I can't say for certain if the "shadow" they create are simply areas where light does not shine through, or if they're more like textures projected onto nearby surfaces. I guess the way of going about this would be to start simple, with just two colored lights, and if it works, build from there. I've looked at the vanilla gobo textures, and they seem simple enough for me to figure out how to create something that might work in this instance. One thing that might not be possible is the refracted, kaleidoscope effect the light casts in the images from your link. Edited October 29, 2022 by ChuckYufarley Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now