Announcement

Collapse
No announcement yet.

Corrupt Maya File, is it possible to work out a lights transform from its TransformHex value in VRscene file?

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

  • Corrupt Maya File, is it possible to work out a lights transform from its TransformHex value in VRscene file?

    Hi I am at a bit of a loss. I have a maya scene which is corrupt and needs rebuilding. I have everythng other than the Sun transform from the file. I have a temp vrscene which contains the information but I cant convert it into something I can use in Maya, is this possible?

    LightDome VRayLightDomeShape1 {
    enabled=1;
    transform=TransformHex("0000000000000000FEFF7F3FFF FF7F3F000000000000000000000000FFFF7F3F000000000000 00000000000000000000000000000000000000000000000000 00");

    If anyone can help me it would be much appreciated

    Thanks!

  • #2
    Was you Maya scene saved as an MA file rather than MB? If so you can open it in a text editor and delete corrupt parts there, its worked for me before.

    Comment


    • #3
      Unfortunately it wasn't. It was saved as MB. Good point though, it might be a good idea to begin saving MA files for that very reason.

      Thanks

      Comment


      • #4
        You can try this little tool we have for converting vrscene files from hex-encoded transform and mesh data back to vectors: https://docs.chaosgroup.com/display/...vrscenedehexer
        Run it in a command prompt like this: vrscene_dehexer -u <yourScene>.vrscene <resultingDehexedScene>.vrscene
        It will create a new file where the data is de-hexed.

        If you only need your sun, you can just copy-paste only the lightDome plugin into a new file, save it as a .vrscene from your text editor and run it with the tool, to have a resulting file that only contains what you need.
        Alex Yolov
        Product Manager
        V-Ray for Maya, Chaos Player
        www.chaos.com

        Comment


        • #5
          Thanks for this, I have used the tool and unhexed the vrscene file, here is the result for the specific light.

          Code:
          SunLight VRaySunShape1 {
          transform=Transform(Matrix(Vector(0.6, 5.551115e-017, 0.8), Vector(0.4115966, 0.8574929, -0.3086974), Vector(-0.6859943, 0.5144957, 0.5144957)), Vector(-1000, 750, 750));
          target_transform=Transform(Matrix(Vector(0.9999999 , 0, 0), Vector(0, 0.9999999, 0), Vector(0, 0, 0.9999999)), Vector(0, 0, 0));
          turbidity=2;
          ozone=0.7;
          intensity_multiplier=0.1;
          size_multiplier=25;
          filter_color=Color(1, 1, 1);
          ground_albedo=Color(0.5, 0.5, 0.5);
          blend_angle=5.739171;
          horizon_offset=0;
          up_vector=Vector(0, 1, 0);
          invisible=0;
          horiz_illum=25000;
          sky_model=3;
          shadows=1;
          atmos_shadows=1;
          shadowBias=0.02;
          shadow_subdivs=8;
          shadow_color_tex=AColor(0, 0, 0, 1);
          photon_radius=50;
          photonSubdivs=500;
          causticSubdivs=1000;
          diffuseMult=1;
          causticMult=1;
          enabled=1;
          affectDiffuse=1;
          affectSpecular=1;
          diffuse_contribution=1;
          specular_contribution=1;
          channels=List(
          );
          channels_raw=List(
          );
          channels_diffuse=List(
          );
          channels_specular=List(
          );
          channels_full=List(
          vrayRE_Light_Select
          );
          }

          Do you have any pointers on how to apply this back into Maya as translate coordinates?

          Many Thanks,

          Comment


          • #6
            Ah, I have just realised that it is clearly the last section in the line that I need, i.e.

            Code:
             
             Vector(-1000, 750, 750));
            Thanks for the help, this will surely get me out of sticky situations in the future, although I have to say this was a particularly strange one

            Comment


            • #7
              Ah, forgot to mention that, yes. The last vector is the translation. There's some useful matrix attributes in Maya that I usually use and just pass it the vectors, which Maya puts into the transform matrix and voila. Glad to know you've sorted this out.
              Last edited by yolov; 14-03-2018, 10:15 AM.
              Alex Yolov
              Product Manager
              V-Ray for Maya, Chaos Player
              www.chaos.com

              Comment


              • #8
                Yes, I have, thanks for the help.

                Comment

                Working...
                X