Page 11 of 12 FirstFirst ... 9101112 LastLast
Results 201 to 220 of 240
  1. #201
    Portals work with sun lamps. It just doesn't help finding the sun lamp (or any other lamp), but it still helps with environment light from sky. So sun lamp+portal are still a working combination.
    I too find that portals don't always mean better sampling and less noise.



  2. #202
    that's a really cool feature
    i tried it and it worked well for me so far http://pre14.deviantart.net/55d1/th/...am-d8s4w13.png
    but my friend tried it and got a brighter scene http://imgur.com/a/vMdkr , then noticed that the portal actually emits light and when he set the value to 0 it got rendered correctly
    i used yesterday's gooseberry branch build for 64-bit linux , he used today's gooseberry branch build 64-bit windows



  3. #203
    Member mib2berlin's Avatar
    Join Date
    May 2008
    Location
    Germany
    Posts
    3,485
    Hi, it does not emit light or it should not.
    Please check it with regular master build and report in bugtracker.

    Cheers, mib
    EDIT: I checked with latest master and it work as expected.
    Portals does not emit light.
    Last edited by mib2berlin; 04-May-15 at 16:37.
    OpenSUSE Leap 42.1/64 i5-3570K 16 GB Blender 2.7 Octane 3.03
    GTX 760 4 GB, GTX 670 2 GB Driver 375.26 | Blender for Octane



  4. #204
    I confirm it, Works as expected. It doesn't emit light when portal is ON.



  5. #205
    Member Lell's Avatar
    Join Date
    May 2010
    Location
    Italy
    Posts
    550
    Hi! This new feature is very cool and useful! Thankyou Lukas!
    I would like to know exactly how they work (from the point of view of Cycles and the rays it casts). I supposed that the portal tells Cycles where to cast rays to find the environment (to not waste rays against walls that doesn't contribute with environment lighting). So I supposed that, reducing the portal area leads to a darker scene (if the portal doesn't cover the entire window). But this doesn't happen. So my doubt about their functioning remains. I would like to understand this well to better use them. Thanks!



  6. #206
    Member
    Join Date
    Mar 2014
    Location
    Germany
    Posts
    338
    Okay, here we go:

    First of all, you need to know how a Unidirectional Path Tracer like Cycles works internally. If you already know, you can ignore this paragraph.
    For every pixel and sample, a ray is traced from the camera. The nearest intersection with the scene is found, and the shader there is evaluated. Based on the shader, a new outgoing direction is chosen and the ray is continued in this direction, again finding the next intersection etc. If the ray hits a light source / object with Emission shader, the light is accumulated.
    While this works in theory, in practise it's extremely noisy. That's why basically every renderer uses "Next event estimation": Before you continue into a new direction, you try to directly connect to a light source. To do so, you pick a direction towards a light and then check whether it is occluded or not. This is done with all lamps and the emission shaders that have "Multiple Importance Sampling" checked and usually reduces noise A LOT (Cycles would be virtually unusable without it). Of course, there are technical details, but that's the basic approach.

    Now the question is: How to pick those directions? For regular lamps it's easy (Point light: Just the direction towards it, Sun Lamp: The direction it is facing etc.), but for the background it's rather tricky: If you enabled World MIS in 2.74 and earlier, it would pick a direction proportional to the brightness: If you use a indoor HDR with a window in it, for example, the directions towards the bright window would be chosen more often. However, if you have an indoor scene, most of these directions are occluded: It's no use to sample bright parts of the HDR if they are behind a wall.

    So that's where portals come in: If you have a portal in your scene and Cycles wants to find a direction towards the Background, it picks one that goes through the portal (using the exact same code that's used to pick directions towards an area light, by the way). This way, it will always hit the background (unless the portal covers some occluders like window borders as well). If you enable World MIS as well, half of the directions will be sampled from portals and half will be from the background brightness (as before).

    The thing with size <-> darkness is: Portal sampling is just one way of picking directions, it is still possible to find the non-portal-covered background by random bouncing. The brightness stays the same because of the way Monte-Carlo Integration (the theoretical basis of "just take many random samples and average them") works: You also calculate the probability of picking some direction, and divide the brightness by it. Now, the smaller the portal is, the more likely it is to pick some direction, because there are fewer of them that go through the portal (tecknical detail: You might wonder how one can count directions as there are essentially infinitely many. You can't, the exact formulation would be "probability density function of directions with respect to the solid angle of the infinitesimal cone subtended by the direction". "Fewer of them" is easier ). Therefore, the weighting of the portal-sampled directions increases, and the weighting of the randomly-bounced directions increases.

    If you want more detail, I can recommend:
    An Area-Preserving Parametrization for Spherical Rectangles, a paper from Solid Angle (here, the company, not the mathematical concept) that's used by Cycles for Area and Portal light sampling.
    Portal-Masked Environment Map Sampling, a pretty new paper that gives an improved sampling method (Cycles currently uses their "Approach 3", combining EnvMap and Portals by MIS). And yes, their new approach might end up in Cycles
    Physically Based Rendering, Second Edition, a great book with more details about the theory behind rendering and Path Tracing.



  7. #207
    Member Lell's Avatar
    Join Date
    May 2010
    Location
    Italy
    Posts
    550
    Hi! Thankyou for the explanation and for the documents. I don't understand the choise of casting random rays even when there are portals in scene. It doesn't seems sensed (probably it's a technical issue?).

    Anyway, I made a test and I have a question: is it possible that in old scenes, adding portals doesn't have effects?

    Here's the test: a simple box with a window. In the first the portal covers the entire window, in the second the portal covers half of the window, in the third the portal is in the wall (with window dimensions), in the fourth the portal is off. The noise increase in every step, but the luminosity on the scene doesn't change much. I can't understand why.

    (I had a gif with the tests but I have problems posting it, I'll try later)



  8. #208
    Just a quick question on portal placement. Most everything I have read is using simple default cubes with a hole cut in for a window.

    My question is, if you are using real window geometry that includes glass.... should the portal be positioned inside the window geometry or on the outside of it?
    "Relapse" WIP
    Check out - "Final Inspection" -A film about Vegas, vices, and one very bad day.
    My action short- Unmanned Vengeance



  9. #209
    Member Lell's Avatar
    Join Date
    May 2010
    Location
    Italy
    Posts
    550
    Here's the gif

    https://www.dropbox.com/s/ry0fkcbpwy...rison.gif?dl=0

    Why doesn't it animate?

    a simple jpg of the tests
    portals test.jpg
    Last edited by Lell; 09-Jul-15 at 05:02.



  10. #210
    Member Manolo76's Avatar
    Join Date
    Apr 2012
    Location
    Univers Zéro
    Posts
    238
    Originally Posted by Lell View Post
    Anyway, I made a test and I have a question: is it possible that in old scenes, adding portals doesn't have effects?
    +1 I also tried with an old scene and no change with or without portals. I saw the Plamasolutions video :https://www.youtube.com/watch?v=CWPVRsGHlP8 about using portals and did what Thomas said but no difference.

    It's a room with 2 windows on the same side.



  11. #211
    Member Lell's Avatar
    Join Date
    May 2010
    Location
    Italy
    Posts
    550
    Originally Posted by Manolo76 View Post
    +1 I also tried with an old scene and no change with or without portals. I saw the Plamasolutions video :https://www.youtube.com/watch?v=CWPVRsGHlP8 about using portals and did what Thomas said but no difference.

    It's a room with 2 windows on the same side.
    And the consequent question is: how to convert the scene to be affected by portals? Just append geometries in a new 2.75 file?



  12. #212
    Member Manolo76's Avatar
    Join Date
    Apr 2012
    Location
    Univers Zéro
    Posts
    238
    I don't know but I did a simple scene in Blender 2.75 and it's even a little bit noiser with portals ?! I think I'm doing something wrong.

    Here's the test scene : http://www.pasteall.org/blend/36980



  13. #213
    Member
    Join Date
    Apr 2012
    Posts
    1,731
    Originally Posted by Manolo76 View Post
    I don't know but I did a simple scene in Blender 2.75 and it's even a little bit noiser with portals ?! I think I'm doing something wrong.

    Here's the test scene : http://www.pasteall.org/blend/36980
    I have seen this before - portals seems to be very hit and miss if you have a sun lamp in the scene as well as the environment light.

    I deleted the sun lamp in your scene and portals-on renders much cleaner.

    The best way to light a portals scene is with a HDRI map with multiple importance sampling switched on. If you need sharp shadows - make sure your HDRI has the sun in it and perhaps up the size of the multiple importance sample map (it's default is 256 - perhaps up it to 512 or even 1024).



  14. #214
    Member Manolo76's Avatar
    Join Date
    Apr 2012
    Location
    Univers Zéro
    Posts
    238
    Yes you're right, I tried with an HDR without the sun and the difference is obvious. Thanks.



  15. #215
    Can someone try and answer my question on portal placement in post #208 .... thanks
    "Relapse" WIP
    Check out - "Final Inspection" -A film about Vegas, vices, and one very bad day.
    My action short- Unmanned Vengeance



  16. #216
    Member J_the_Ninja's Avatar
    Join Date
    Sep 2010
    Location
    Portland, OR, USA
    Posts
    1,664
    Originally Posted by harleynut97 View Post
    Can someone try and answer my question on portal placement in post #208 .... thanks
    Outside the window. It's a guide for the sky light, so you don't want anything else between it and the sky.



  17. #217
    @J_the_Ninja Thanks for the reply J...unfortunately I tested this morning one of my scenes and it doesn't look like portals are going to be of much help. Most likely because I am using spot lights and a sun in addition to HDRI
    "Relapse" WIP
    Check out - "Final Inspection" -A film about Vegas, vices, and one very bad day.
    My action short- Unmanned Vengeance



  18. #218



  19. #219
    Member
    Join Date
    Apr 2012
    Posts
    1,731
    Originally Posted by joshbailey View Post
    I have seen cycles renders that are as good as that. Check out Andrew Price's tutorial on architectural rendering.



  20. #220
    Member Lell's Avatar
    Join Date
    May 2010
    Location
    Italy
    Posts
    550
    Originally Posted by J_the_Ninja View Post
    Outside the window. It's a guide for the sky light, so you don't want anything else between it and the sky.
    Rays are shoot from scene to the sky in Cycles, so it should be the opposite. But in reality, there is no difference. The portal just guide the rays, desn't sobstitute the environment. So doens't change if they are inside or outside.

    I still would like the author to discuss about the results of my tests, which should clarify a bit better how to use them effectivelly.



Page 11 of 12 FirstFirst ... 9101112 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •