Announcement

Collapse
No announcement yet.

GeoSun's Azimuth and Latitude static during rendertime

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • GeoSun's Azimuth and Latitude static during rendertime

    Hi,

    We're animating the sun by animating time of year/month/day and we would like to be able to mix different HDR images depending on the sun position. Therefore I wish to be able to create expressions which involve reading the azimuth and the altitude of the GeoSun.

    However, these values are not being updated when rendering. So even if everything looks fine in the Maya UI, the expressions won't evaluate properly while rendering. The values of azimuth and altitude is locked to whatever frame was active when saving the scene.

    Would it be possible for you to make this values evaluate on rendertime or is there a workaround you can come to think of?

    // Fredrik
    Last edited by Fredrik Averpil; 27-01-2015, 04:30 AM.
    Best Regards,
    Fredrik

  • #2
    Azimuth and Altitude are actually shown just for information and are derived from the rest of the settings. The work-around is to use the "manual position" and calculate the final position with your expression.
    V-Ray/PhoenixFD for Maya developer

    Comment


    • #3
      Hi Ivaylo,

      You mean positioning the sun manually?
      This is for animation where the sun rises and sets - and for many, many different archviz scenes and clients so we would like to take advantage of setting the long/lat, time of year/month/day and "simulate" away. So it would not be an option for us to go manual position, I think, as it would require a lot more work than doing what we currently do. So your suggestion does not seem like a workaround for us.

      I searched the vray installation for files containing the word "azimuth" and "altitude" but I could not find the formula being used anywhere. I was thinking that I could have tapped into your code to get the very same values you are showing in the vrayGeoSun.azimuth/altitude values by a MEL query. But I guess this is all embedded in the plugin?
      No way to fetch this data (at rendertime) through a MEL command?

      If it will not be possible to make those values update on rendertime, do you have any suggestions on what values I can grab and use to calculate the azimuth and altitude myself?
      Last edited by Fredrik Averpil; 27-01-2015, 04:31 AM. Reason: typo
      Best Regards,
      Fredrik

      Comment


      • #4
        Hm, I see, you just want to read them and the attributes are not updated properly. I found a work-around for now - to force recalculation, f.e.:

        setAttr VRayGeoSun1.ghour `getAttr VRayGeoSun1.ghour`;

        Maybe this can be added to the pre render frame MEL. Will add this as a bug, maybe we don't do something right there.
        V-Ray/PhoenixFD for Maya developer

        Comment


        • #5
          Thanks Ivaylo, it works!

          But it would be even better if this worked right out of the box without a custom pre frame render MEL.

          Cheers!
          Best Regards,
          Fredrik

          Comment


          • #6
            Yep, I think we can fix it.
            V-Ray/PhoenixFD for Maya developer

            Comment

            Working...
            X