Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    volumetric light volume shadows

    Scheduled Pinned Locked Moved SDK Help
    9 Posts 0 Posters 665 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 03/12/2010 at 04:09, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   10.5-12 
      Platform:   Windows  ; Mac  ;  Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Hi,

      I have a volumetric environement shader and I would like to know which structure I need to change to make volumetric lights react to my shader and cast volumetric shadows.

      I have no surface (CalcSurface returns vd->trans = 1.0) in my shader but volumetrics and I am already casting "normal" shadows (CalcTransparency) but this does not affect the "volumetric light" part. Pyrocluster can do it so I assume it must be possible to do this in an environement object, I just see now way in the sdk how to accomplish this. This is really important and it would be great if you (sdk support) could let me knowif it´s possible or not and if so what light information to modify or which function to overload. Really appreciated.

      Thanks

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 06/12/2010 at 05:38, xxxxxxxx wrote:

        Can you please send me a scene with Pyrocluster and a volumetric light casting shadows just so I know for sure what you mean. Thanks.

        cheers,
        Matthias

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 06/12/2010 at 06:58, xxxxxxxx wrote:

          just done so. thx

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 06/12/2010 at 07:03, xxxxxxxx wrote:

            Ok, checked the scene file. This is something I'll have to ask the developers.

            cheers,
            Matthias

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 06/12/2010 at 07:19, xxxxxxxx wrote:

              FYI, it works fine with the ParticleVolume.cpp shader from the SDK examples.

              cheers,
              Matthias

              1 Reply Last reply Reply Quote 0
              • H Offline
                Helper
                last edited by

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 06/12/2010 at 07:34, xxxxxxxx wrote:

                Strange it doesn´t work for me then. Is CalcTransparency or CalcVolume the one for this? could you turn off CalcTransparency in the particlevolume example (I have no ready to build example sdk here).

                Thanks

                1 Reply Last reply Reply Quote 0
                • H Offline
                  Helper
                  last edited by

                  THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                  On 06/12/2010 at 07:40, xxxxxxxx wrote:

                  It seems that CalcTransparency is crucial for the shadow calculation. In the example CalcVolumetric and CalcTransparency are used.

                    
                  void ParticleVolume::CalcSurface(BaseMaterial *mat, VolumeData *vd)  
                  {  
                    vd->trans = 1.0;  
                  }  
                    
                  ...  
                    
                  void ParticleVolume::CalcVolumetric(BaseMaterial *mat, VolumeData *vd)  
                  {  
                    Real cov=GetCoverage(render,vd);  
                    vd->col=Vector(0.0,0.0,cov);  
                    vd->trans=1.0-cov;  
                  }  
                    
                  void ParticleVolume::CalcTransparency(BaseMaterial *mat, VolumeData *vd)  
                  {  
                   Real cov=GetCoverage(render,vd);  
                   vd->trans=1.0-cov;  
                  }  
                  

                  cheers,
                  Matthias

                  1 Reply Last reply Reply Quote 0
                  • H Offline
                    Helper
                    last edited by

                    THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                    On 06/12/2010 at 07:51, xxxxxxxx wrote:

                    I also have both overloaded. My "normal" shadow calculations also work perfectly fine. Shadows are correctly casted but only these volumetric light shadows are not and I don´t have any constraints (like only overloading for certain raybits).

                    Anyway, you seem right. The RAYBIT_VOLUMETRICLIGHT is only passed in CalcTransparency so I must have something in there.

                    thanks, I guess I can figure out the rest myself. Seems to be my shaders fault I´d say spontaneously.

                    1 Reply Last reply Reply Quote 0
                    • H Offline
                      Helper
                      last edited by

                      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                      On 06/12/2010 at 08:12, xxxxxxxx wrote:

                      ok, got it figured out. Was indeed a shader issue. thx again

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post