Jump to content

Shaded Render Mode Lighting Issues with Plug-In


Recommended Posts

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. 

131144649_Screenshot2022-10-22135449.thumb.png.5468b27bb6d20b91c5078ec18bed971b.png1594817361_Screenshot2022-10-22135432.thumb.png.8f57a853a67517fcafb1d83f27f3cee9.png

 

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? 

 

Link to comment
  • 3 weeks later...

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 by AlHanson
Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...