Announcement

Collapse
No announcement yet.

Render To Texture (texture baking) and VrayPhysicalCameras

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

  • Render To Texture (texture baking) and VrayPhysicalCameras

    I'm very new to Vray and max, so I hope this is a no-brainer to an experience Vray user. I'm using max 2009 and Vray 1.5 SP2 (latest?).

    I purchased a scene with a building in it and I swapped a light out and opted for a HDRI environment map to light the scene. I noticed that the VrayPhysicalCamera was required to see the lighting correctly and think this might affect baking somehow.

    Are there any issues with baking textures you're used to seeing through the VrayPhysicalCamera? The lighting on the texture that is baked looks fine in the baking window. I then grab the shell material it makes and assign it a slot in my material editor (instancing it) and it's applied to my object automatically (something not explained in the tutorial). I wish to use the baked texture in rendering to speed things up, so I set the render material as the baked texture. Somehow, every single time, my diffuse color is set to red. I did as the tutorial suggested and chose the self-illumination slot as my target. I check the self-illumination option and set the value of self-illumination to 100 (pure white). My object comes out red (ambient/diffuse color?). So I instance the map that's set for self-illumination to diffuse and ambient. Now my texture is very dark. Like, RGB(80,80,80) dark.

    Mind you, I disabled all lights (unchecked from global vray settings, and turned each one off on each lights properties). I also removed the HDRI map from environment (max and vray environment override). The texture shows up, verrryyy dimly lit, even with no lights, so the texture is working to some extent.

    This all comes down to noticing that this might be an artifact of using a VrayPhysicalCamera at this point. I examined the camera properties and disabled exposure and found that the texture gets a ton brighter.

    Does any of this sound familiar to anyone? Should I expect to use a standard camera? Any settings I should consider in using baked textures with a scene that was previously lit using a HDRI map? Is it even possible to bake a whole scene like that, even when it involves reflections? The reason I ask is the scene only looks normal on lighting through a VrayPhysicalCamera (and I don't know why yet). A normal camera has no light (can't calculate a VrayHDRI map?). So does the baking know to use a VrayPhysicalCamera in the calculations? Are the calculations flattened in such a way that using a VrayPhysicalCamera after baking is bad?

    Thanks for any tips in general on baking! I have a simple scene that unfortunately takes 3 days to render 1200 frames due to needing to use the highest quality lighting, or otherwise I get some serious light (dark spoting) artifacts. Using very high irradiance is so costly I'm hoping to figure out texture baking.
    Last edited by om1nous; 08-12-2008, 12:28 PM.

  • #2
    In the settings of each V-Ray bake element, there is an option "Apply color mapping"; it needs to be ON for the camera exposure to be taken into account. The other option is to use the V-Ray color mapping settings to bring the brightness down.

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

    Comment


    • #3
      Thanks for your reply.

      I am already using that option as it has been in a few posts in this forum. I've searched a bit in here (mostly on google) and saw someone mention that. Unfortunately that doesn't brighten up the texture.

      To reproduce and explain what I'm doing, here's my steps:

      1. Select objects to bake
      2. Rendering > Render to Texture
      3. in Output, choose path to save textures
      4. in Mapping Coordinates, select Use Automatic Unwrap
      5. in Add Texture Elements - Output, I'm using a Vray_CompleteMap
      6. in Baked Material at bottom select: Save Source (Create Shell)
      7. in Baked Material at bottom select: Create New Baked - Standard:Blinn
      8. back up in Target Map Slot, select: Self-Illumination
      9. in width / height select: 1024 x 1024 (for example)
      10. in Selected Element Unique Settings check: Apply color mapping

      I do not have Vray Virtual Frame Buffer enabled, if that matters. I then just hit the Render button at the bottom of Render to Texture (after having my scene settings all correct, single-frame and no render-to-file in 3ds max render - common settings).

      A window opens up and I see it make a huge texture of the first object. It takes forever because in V-Ray:: DMC Sampler I increased Global subdivs multiplier to 10.0, and set Noise threshold to 0.001 as mentioned in some suggestions. I also have Irradiance set to Very High. For V-Ray: Image sampler (Antialiasing) I find the details are pretty good on Fixed (for fine detail) at 4 subdivs with VRayLanczosFilter (Catmull-Rom is decent but too sharp methinks).

      After that, in the material editor I click Get Material and select scene, and I see my 2 shell materials (I selected 2 objects to bake). I drag these into free material editor slots (and select instance). I see they are already applied to my object.

      I set the render mode to use the baked material on both materials I baked.

      I open the baked material on both and check Self-Illumination and choose white (100) as the value. I drag the [M] map that was automatically placed in Self-Illumination from baking into the diffuse/ambient map slots to instance it.

      I turn off all lights in my scene and disable Lights, Default Lights, Hidden Lights and Shadows in V-Ray: Global switches. I turn off (uncheck) my Environment Map in max Environment and and in V-Ray: Environment. I click the map slots in the environment map assignment and set it to None instead of VRayHDRI.

      I render, and I get very dark textures.

      Am I doing anything obvious wrong?

      edit:

      Incase it matters, here are all my VrayPhysicalCamera settings:

      BASIC PARAMETERS:
      type: Still Cam
      targeted: checked
      film gate (mm): 914.4
      focal length (mm): 1016.0
      zoom factor: 1.0
      f-number: 8.0
      target distance: 86280
      distortion: 0.0
      distortion type: Quadratic
      vertical shift: 0.0

      Specify focus: unchecked
      focus distance: 5080

      exposure: checked
      vignetting: checked 1.0
      white balance: custom (246,244,242)

      shutter speed: 21.0
      shutter angle: 180
      shutter offset: 0.0
      latency: 0.0

      film speed (ISO): 100.0

      BOKEN EFFECTS:
      blades: unchecked 5
      rotation (deg): 0.0
      center bias: 0.0
      anisotropy: 0.0

      SAMPLING:
      depth-of-field: unchecked
      motion blur: unchecked
      subdivs: 8

      MISCELLANEOUS:
      horizon line: unchecked
      clipping: unchecked
      near clipping plane: 0.0
      far clipping plane: 25400
      near env range: 0.0
      far env range: 25400
      Last edited by om1nous; 08-12-2008, 02:21 PM.

      Comment


      • #4
        Here is a screenshot of most of my setup and a couple example outputs how I'm seeing them. Sorry for the large file size, didn't want compression to make it unreadable.

        Here:
        http://files.ertp.com/ExampleBaking.jpg

        I made this example using 512x512 mapping and only medium quality lighting as it's unimportant to what's going on. I just rendered a small test region for quickness.

        We're not going for realism in this first off haha, it's nothing at all the quality of the other people here with ultra-realistic renders. This is just a simple cute little building colored white which suits ours purposes.

        The top image on the upper right is the render (it's the side of a building and some windows redlecting a VRayHDRI map). The building should be a near-white color like you see. It has some simple rectangles making those vertical lines (it's not a texture, it's geometry).

        The middle image is the process I listed above and what results.

        The bottom image is if I turn off the VRayPhysicalCamera's exposure and vignette options.

        It's a very flat looking texture. Should it look anything more like the rendered image?
        Last edited by om1nous; 08-12-2008, 03:08 PM.

        Comment


        • #5
          I posted in general sort of on this topic but about lighting, which is the real reason I want to bake in the first place. To increase render speed, because my scene is going to take 5 days to render, and it's a very simple scene. I was told I might save a lot of time if I'm just panning a camera around the outside of a building by baking the textures.

          The reason I want to bake is the dark splotching I'm getting using anything other than "Very High" irradiance calculation settings. When I pan my camera around my building, this is what happens on "Very Low", and continues up through "High" (to a lesser degree, but is still there):

          example.wmv (7MB WMV)

          I just want to pan this camera around this building, which as you can see isn't cranked up on quality or geometry complexity or anything. I'm only using a VRayHDRI map for lighting. The building is largely a box with the vertical lines being more boxes and the fake glass being extremely fast rendering (low subdiv interpolated reflection only, no refraction). I thought this scene would be a cinch for max/vray to render but it's taking 125 hours or 5 days to render 1500 frames of this.

          That's why I want to see if I can bake it.. The details look very simple. Is this an ideal scene to bake so I don't need to let a dual quad (x5365) xeon sit and render for 5 days? God forbid I want to change something later and spend another 2 days re-rendering a segment..

          I just want smooth lighting without the dark spots appearing. For those that don't want to download the 7mb WMV, here's an example, screenshots of the camera panning and changing angle (about 2 feet per screen):







          I'm just trying to get a smooth appearance on the side of the building. Meaning no spots. Just fake-looking perfect CGI-esque (not high quality), animation-esque smoothness. I'm not trying for a realistic scene that much, just don't want these spots.

          Thanks for any tips in speeding up rendering! Using "Very High" is just taking too much time. I hope baking can solve some of this.

          edit:

          Here's a sample of what it looks like using "Very High" settings, which I'm not crazy about due to the whiter hard lines appearing and such. But overall it's better than the dark spots. I think this scene is about as simple as it gets for Vray. I'm totally not sure why it takes so long on a 24ghz machine to render. I'm sure I'm a noob and have some setting cranked up and am costing myself days of time for absolutely no reason:

          exampleveryhigh.wmv (9MB WMV)

          Obviously from the random google image searched overhanging door texture I slapped on there, I'm not trying for anything realistic or hollywood haha. So I just can't believe the settings I need to use to get erm, well, not good results, just not "bad" spotty results.
          Last edited by om1nous; 09-12-2008, 07:27 AM.

          Comment

          Working...
          X