prman-pixar / RenderManForBlender

RenderMan for Blender render addon
MIT License
808 stars 133 forks source link

Portal lights not working? #460

Closed jdent02 closed 7 years ago

jdent02 commented 7 years ago

Doing a test for the lighting challenge using an HDR for window light. Tried putting portals on the windows but it doesn't seem to work. Instead the portals are turned into regular PxrDome lights judging by the RIB (Area.002 is the portal). I'd troubleshoot it myself but the Renderman docs are really poor when it comes to giving any real detail on how the portal lights are configured. Also the intensity multiplier and color tint controls do not appear in the light tab when in Blender, so I'm not even sure if the exporter is parsing the portal ARG file correctly. Scene.0016.zip

jdent02 commented 7 years ago

FYI the RIB was from an IPR session. I read through the code and there's some language in there that makes me wonder if the portals are only exported during final render.....Is that the case?

bsavery commented 7 years ago

Maybe? I'll take a look tonight.

bsavery commented 7 years ago

https://github.com/bsavery/PRMan-for-Blender/commit/4c20559b29169460a87427294317a39bca3ad1aa

jdent02 commented 7 years ago

Hey Brian. The portals work, kind of. There are some interesting issues though....

Originally I had a rotated Hemi lamp for the HDRI. I added a portal to the larger bay window of the kitchen and got the following render:

rerender_1

Which looks correct. Even after deleting the hemi lamp the portal still worked and seemed to keep the rotation of the HDRI (not sure how). When I went to add a second portal (at the sink window) I ended up with this:

rerender_2

The color is different, almost like the HDRI was rotated differently.

I checked the RIB (see attached) and there is no indication of Z rotation on the portals so I don't know how the once portal got it right but then adding a second one seemed to change it. I also noticed the two portal picture is cleaner with the same number of samples.

Scene.0016.zip

bsavery commented 7 years ago

Can you attach the .blend file?

jdent02 commented 7 years ago

kitchen.zip

FYI I disabled the second portal in the scene outliner in this file

bsavery commented 7 years ago

Hmmm... Yes I was hoping we could implement these simply. But I think we have to do them the RenderMan for Maya way:

  1. You have to have a Dome light first
  2. Attach portals to the dome light
  3. When rib gen-ing we pass the Dome light params and coord sys down the portals instead of emitting the dome light.
jdent02 commented 7 years ago

Well it might be simple still. Realistically you'd only use one dome light per scene right? So if you have any portals in the scene, they can just copy the dome light info when rib'ing. No need to manually link them to the dome....

Sent from my iPhone

On Mar 23, 2017, at 2:33 PM, bsavery notifications@github.com<mailto:notifications@github.com> wrote:

Hmmm... Yes I was hoping we could implement these simply. But I think we have to do them the RenderMan for Maya way:

  1. You have to have a Dome light first
  2. Attach portals to the dome light
  3. When rib gen-ing we pass the Dome light params and coord sys down the portals instead of emitting the dome light.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/bsavery/PRMan-for-Blender/issues/460#issuecomment-288835661, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AM5RFEIGAKE6julj7XAVw4bkvFtEnvi0ks5roskEgaJpZM4McHY_.

bsavery commented 7 years ago

Well yes and no. Sigh, Sometimes I wonder if we should have just supported the world light and not dome lights. But Technically you could use two dome lights.

I think maybe the solution is to drag portals under the hemi in the outliner

On Thu, Mar 23, 2017 at 1:41 PM, Jon D notifications@github.com wrote:

Well it might be simple still. Realistically you'd only use one dome light per scene right? So if you have any portals in the scene, they can just copy the dome light info when rib'ing. No need to manually link them to the dome....

Sent from my iPhone

On Mar 23, 2017, at 2:33 PM, bsavery <notifications@github.com<mailto: notifications@github.com>> wrote:

Hmmm... Yes I was hoping we could implement these simply. But I think we have to do them the RenderMan for Maya way:

  1. You have to have a Dome light first
  2. Attach portals to the dome light
  3. When rib gen-ing we pass the Dome light params and coord sys down the portals instead of emitting the dome light.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ bsavery/PRMan-for-Blender/issues/460#issuecomment-288835661, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ AM5RFEIGAKE6julj7XAVw4bkvFtEnvi0ks5roskEgaJpZM4McHY_.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/bsavery/PRMan-for-Blender/issues/460#issuecomment-288853407, or mute the thread https://github.com/notifications/unsubscribe-auth/ABzffJ9hRX0kdCSPpKebGFkPFhMiLWVlks5rotkLgaJpZM4McHY_ .

-- brian.savery@gmail.com 508-274-8700

jdent02 commented 7 years ago

That could work. Each portal pulls the lighting info from it's parent....

bsavery commented 7 years ago

I wanted to do this with filters but you can have filters on more than one light technically... can't have portals on more than one light.

On Thu, Mar 23, 2017 at 2:07 PM, Jon D notifications@github.com wrote:

That could work. Each portal pulls the lighting info from it's parent....

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/bsavery/PRMan-for-Blender/issues/460#issuecomment-288860160, or mute the thread https://github.com/notifications/unsubscribe-auth/ABzffPHUjHzdrJpvmXp0i-4FgMRkQCWGks5rot8XgaJpZM4McHY_ .

-- brian.savery@gmail.com 508-274-8700

bsavery commented 7 years ago

Ok. So to fix this correctly I think we'll have to wait till the refactored code, because we are retouching the rib gen completely. But for now I can fix this correctly with a fixed Hemi Light rotation.

bsavery commented 7 years ago

See this https://github.com/bsavery/PRMan-for-Blender/commit/e01a1e2f16061e38f03c3e04d64aac1606f26700

bsavery commented 7 years ago

Ok better fix now. Here's an example how to use:

portal.blend.zip

jdent02 commented 7 years ago

Looks like it works. IPR changes on the portal result in a black screen but that's something I can work around. Thanks for fixing this one Brian!

bsavery commented 7 years ago

I bet you just need to pass the lamp.parent to export_light_shaders On Thu, Mar 23, 2017 at 7:49 PM Jon D notifications@github.com wrote:

Looks like it works. IPR changes on the portal result in a black screen but that's something I can work around. Thanks for fixing this one Brian!

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/bsavery/PRMan-for-Blender/issues/460#issuecomment-288918949, or mute the thread https://github.com/notifications/unsubscribe-auth/ABzffE9-wyNJKU2dAI52-XnK4H2D_gaVks5roy8ogaJpZM4McHY_ .

-- brian.savery@gmail.com 508-274-8700

jdent02 commented 7 years ago

I'll consider this one fixed and closed.