Announcement

Collapse
No announcement yet.

Texture maps for VRayEnvironmentFog

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

  • Texture maps for VRayEnvironmentFog

    Are we limited to procedurals for fog density and for color? I have a few bitmap images that i want to use with a gizmo....one for the density and one for colour....but for the life of me i can't get it to work. I've read the documentation and I'm still a little unclear. Any help would be great.
    -----Dwayne D. Ellis-----

  • #2
    You will need to use either Object XYZ or World XYZ mapping for the bitmaps - explicit map channel or environment mapping is not going to work.

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment


    • #3
      Thanks Vlado...that helped.
      -----Dwayne D. Ellis-----

      Comment


      • #4
        How does the "fog color" map slot differ from using the "fog emission" color slot?

        I can change the color of the fog with "fog emission" but I can't get an image or a map to generate anything when placed in the fog color map slot.
        Daniel Black
        Archtagon LLC
        www.archtagon.com

        Comment


        • #5
          The "Fog color" modifies the way the fog reacts to lights and GI; if you have no lights in scene, it will not have any effect. The "Fog emission" color works independently of lighting.

          Best regards,
          Vlado
          I only act like I know everything, Rogers.

          Comment


          • #6
            Vlado,

            Is there anyway that you could show an example of how you could script the assigning of a VRayEnvironmentFog to a boxgizmo through maxscript? Basically i have a bunch of BoxGizmos and i want to assign all the VRayEnvironmentFogs i've made to them. I muddled through and was able to script the creation of all the VRayEnvironmentFogs with all the parameters that i want.....but i don't want to go in and pick a gizmo for each one...166 times or whatever. I'm not a scripter by any stretch but i saw in the listener:

            VRayEnvironmentFog : atmospheric {4d0f78a2,1694416f}
            .gizmos : node array

            ...i just don't know how to use it. I can explain a bit more if its needed but its basically:
            VRayEnvironmentFog01 assigned to BoxGizmo01.

            If i can get this to work more efficiently I'll post back what i'm using it for...pretty cool in my opinion!

            Thanks!
            -----Dwayne D. Ellis-----

            Comment


            • #7
              You can use the regular MaxScript functions for accessing atmospheric gizmos (getGizmo/deleteGizmo/appendGizmo), for example:
              Code:
              appendGizmo (getAtmospheric 1) $sphereGizmo01
              Best regards,
              Vlado
              I only act like I know everything, Rogers.

              Comment


              • #8
                Thanks a tonne...i'll try this and post back!
                -----Dwayne D. Ellis-----

                Comment


                • #9
                  That worked perfectly Vlado...thanks! hate to keep bugging..and maybe someone else can jump in....i need to switch the texture coordinates to Planar from Object XYZ for each. This is what i have so far for creating and assigning automatically.

                  addAtmospheric (VRayEnvironmentFog ())
                  (getAtmospheric 01).name = "VRayEnvironmentFog01"
                  (getAtmospheric 01).fog_distance = 1
                  (getAtmospheric 01).texmap_fog_density = Bitmaptexture fileName:"C:\Images\IM-0001-0001.jpg"
                  (getAtmospheric 01).step_size = 0.25
                  (getAtmospheric 01).texture_samples = 6
                  appendGizmo (getAtmospheric 1) $BoxGizmo01

                  I searched the maxscript help file hoping there would be a sample but all i found was this:

                  <textureMap.coords>.coordType Integer default: 0

                  ...which i realize is probably what i'm looking for since the default value of zero says its:

                  0- Object XYZ (Uses planar mapping based on the object’s local coordinates (disregarding the pivot point location).)

                  ...anyway...hope someone can help with this last but, i really want to see this thing fully rendered! I'll keep plugging away but thanks in advance!
                  -----Dwayne D. Ellis-----

                  Comment


                  • #10
                    It may differ from texture to texture, but for bitmaps specifically, you can use the .coords.mapping property, for example:
                    Code:
                    t=meditmaterials[1].texmap_diffuse -- Get the diffuse texture of the first material in ME (assume VRayMtl)
                    t.coords.mapping=2 -- Planar from Object XYZ
                    Best regards,
                    Vlado
                    I only act like I know everything, Rogers.

                    Comment


                    • #11
                      Vlado...you rock man! Your little sample of code helped...this is the line that i was missing from my above setup:

                      (getAtmospheric 01).texmap_fog_density.coords.mapping=2

                      Cool...i'll post an image up soon. Thanks again!!!
                      -----Dwayne D. Ellis-----

                      Comment

                      Working...
                      X