AlHanson Posted October 22, 2022 Share Posted October 22, 2022 I have a custom tool to create lighting arrays with color patterns and gradients that I was excited to give a go in 2023 now that it supports more than 8 lights in Shaded Render mode, but straight out of the box my plugin isn't working right. I started by loading up a test file of a lighting array created in v2022 and all the lights show the correct color at the source, but only project white light in Shaded Mode. Rendering in Final Quality will produce the correct color however. If I insert a fresh PIO using the tool none of the lights will actually output anything in Shaded Render, but again will render as intended in Final. If convert the PIO to a group and have access to the individual light objects, they still do not work until I manually change the color and then they will start rendering correctly in Shaded. I dug through the VectorScript Function reference and nothing seems to be new or different here in regards to lights that's immediately jumping out at me as something that would impact this in the code. While I'm sure the code I've written is a bit old, janky and in need of some cleanup, the overall function is very basic in terms of Create a Light and Set its values, so nothing here seems like it should be a code problem necessarily. Anybody else encountering anything like this and have some knowledge on working with lights in the updated rendering mode that might help explain this? Quote Link to comment
JBenghiat Posted October 23, 2022 Share Posted October 23, 2022 Are these just a line of light objects in Spotlight mode? Can you share the code where you apply the color? Quote Link to comment
AlHanson Posted November 9, 2022 Author Share Posted November 9, 2022 (edited) Didn't ever see any alerts that there was a response here! Correct, this is just a bunch of light objects in spotlight mode. The code creates some lists for the general properties for the light and then applies everything using the basic property adjustment commands for the spotlight in a For loop for the list of insert points. I've tried disabling some of the other property setting commands to make sure they aren't having any possible impact and I still get the same results when running. So this is the bare bones of what's going on: for pt in ptList: #for each point in the list of insertion points hLight = vs.CreateLight(pt[0], pt[1], pt[2], lightTypeDic[lightType], bLightIsOn, bCastShadows) #Insert a light vs.SetLightColorRGB(hLight, rgb[0], rgb[1], rgb[2]) #Set the color of the light Everything is still functioning correctly in the tool. Colors are clearly set correctly on the light objects, they just don't render any output properly in Shaded Render mode, but will render correctly in Final Quality. This screams bug to me based on that fact unless there's something else I'm overlooking. Edited November 9, 2022 by AlHanson Quote Link to comment
JBenghiat Posted November 9, 2022 Share Posted November 9, 2022 In your file, open Document Settings. You will see a preference for 8 light limit. Uncheck that. This was added so that files created in earlier versions render the same when up-converted (for better or worse). Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.