1. Forums
  2. Discord
  3. About Mapcore
  4. Patreon Supporters
  • Login
  • Register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • More Options
  1. Mapcore
  2. Discussions
  3. Level Design

Source engine - MDL - UV channel 2

  • DIFTOW
  • March 28, 2011 at 6:46 AM
  • DIFTOW
    • March 28, 2011 at 6:46 AM
    • #1

    This is just an inquiry I have.

    How many UV channels can be stored in an .MDL in Source engine?

    Regardless of that answer, how do I use 2 UV channels in Source?

    Is it automatic based on my settings in Max when I export?

    Do I have to specify anything in the QC file when compiling SMD?

    Do I have to specify anything in the VMT file for the VTF textures? (Thinking this most likely is where I would have to do anything)

    In case you're wondering why. I'm using lighting from 3D Studio Max mental ray, to generate light-maps for the MDLs in my scene.

    This creates both high quality direct shading, as well as G.I.; indirect shading, and color bleeding.

    For shading of dynamic MDLs (NPCs, vehicles, players) that may interact with any of the lightmapped MDLs... I will be relying on Env_projectedtexture.

    Unfortunately, the UVs made for the lightmaps, will not work well with surfaces where it is ideal to tile instead of have a packed texture map for.

    Some surfaces can reuse the same UV coordinates for both lightmap and diffuse detail, but others it is more ideal for tiling to be used with the diffuse detail.

    The tiling can not be done in VMT, because the UVs for the lightmap are minor-stretched, rotated, flipped, and separated to get the most out of the resolution.

    I need to have 2 UV channels thus for this to work out with the best quality.

    Images

    • campaignjunkie_tintern.webp
      • 51.68 kB
      • 1,280 × 600
    • kungfusquirrel_bender.webp
      • 69.98 kB
      • 1,024 × 576
    • minotauro_zest.webp
      • 95.6 kB
      • 900 × 563
    • SamCom_Waystation.webp
      • 97.36 kB
      • 1,440 × 810
    • sargemat_cubeX3.webp
      • 127.34 kB
      • 1,920 × 1,080
    • tlovemark_secretTemple.webp
      • 337.14 kB
      • 1,440 × 1,080
    • vfig_escherisch.webp
      • 105.6 kB
      • 1,024 × 768
    • wookash_b_turm.webp
      • 112.06 kB
      • 1,024 × 768
  • Schmung
    • March 28, 2011 at 4:11 PM
    • #2

    I might be wrong here, but fairly sure that Source doesn't support multiple UV channels.

  • Minos
    • March 28, 2011 at 6:08 PM
    • #3

    One thing you could try (if this is a small scene) is to use the coordinates in UV Channel 02, bake diffuse map/spec/normal maps, combine that with the vray solution in a single texture and move the UV coordinates in Channel 02 to 01. Perhpas that could work but it would be one hell of a bad workflow if you are working on a larger map.

  • Campaignjunkie
    • March 28, 2011 at 6:21 PM
    • #4

    env_projectedtexture is kind of wonky in the current engine, you'll have to wait for Source 2011 (Portal 2) for decent projected light support

  • DIFTOW
    • March 28, 2011 at 8:58 PM
    • #5

    Thankfully that is this coming April, but I have to hope that it doesn't require Portal 2 to get the update.

    Quote from Minotauro

    One thing you could try (if this is a small scene) is to use the coordinates in UV Channel 02, bake diffuse map/spec/normal maps, combine that with the vray solution in a single texture and move the UV coordinates in Channel 02 to 01. Perhpas that could work but it would be one hell of a bad workflow if you are working on a larger map.

    That is what I do so far, and for a surface where a diffuse detail would normally tile, now yields blurry low res results.

  • cman2k
    • March 29, 2011 at 8:12 AM
    • #6

    Sorry to burst your bubble, but Portal 2 being released in April does not automatically imply that we will get an SDK update in April.

    This is a pretty neat idea. Despite the obvious heavy workload overhead, it could lead to really great results if it worked. That being said, I don't think that the MDL format supports a 2nd UV channel at all. I'd imagine that kind of feature is not possible to add without Valve's help, as it would involve changing the model compiler itself.

  • DIFTOW
    • March 29, 2011 at 10:46 AM
    • #7
    Quote from cman2k

    Sorry to burst your bubble, but Portal 2 being released in April does not automatically imply that we will get an SDK update in April.This is a pretty neat idea. Despite the obvious heavy workload overhead, it could lead to really great results if it worked. That being said, I don't think that the MDL format supports a 2nd UV channel at all. I'd imagine that kind of feature is not possible to add without Valve's help, as it would involve changing the model compiler itself.

    Well what about me using just 1 UV, and getting this to work?

    Code
    "UnLitGeneric"
    
    
    {
    
    
    	"$baseTexture"			"models/NYC/WTC_Column_Lightmap"
    
    
    	"$detail" "models/NYC/WTC_Column_Diffuse"
    
    
    	"$detailscale" 1
    
    
    	"$model" 1
    
    
    }
    Display More

    in CSS, I use that, and only the "baseTexture" displays. I can't see "detail". But it is supposed to work. It worked in a map called dod_kolsch for Day of Defeat.

  • hessi
    • March 30, 2011 at 12:41 PM
    • #8

    i am sick of getting asked the same questions about this lightmap hack over and over, so here is a "tutorial" on how this shit works. though it was warby's idea, but i think he didnt write it down somewhere. feel free to hotlink this image or reference it when needed:

    [Blocked Image: http://www.thomashess.net/lightmaphack.gif]

  • insta
    • March 30, 2011 at 3:35 PM
    • #9

    You are like an angry wikipedia, hessi.

  • hessi
    • March 30, 2011 at 4:43 PM
    • #10
    Quote from insta

    You are like an angry wikipedia, hessi.

    lol, that should stand below my username: "angry wikipedia"

  • ⌐■_■
    • March 30, 2011 at 5:53 PM
    • #11
    Quote from insta

    You are like an angry wikipedia, hessi.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!

Register Yourself Login
Discord

The Mapcore Discord is our lively IRC channel of the 2000s reborn. Chat about level design, gaming, and more.

Latest Posts

  1. Building a Huge Library of Free Images for Everyone

    Thrik
    September 7, 2026 at 10:09 PM
  2. POLYSTRIKE - Finally Announced After Years of Development!

    Mocherad
    August 23, 2026 at 7:56 AM
  3. [CS:GO][WiP] cs_opera

    leplubodeslapin
    August 20, 2026 at 12:31 AM
  4. Any of the old guard still around? D:

    Chunks
    August 7, 2026 at 11:08 PM
  5. CS:S | cs_manoir | Map creation process by D'artagnan

    Thrik
    August 3, 2026 at 10:42 AM
  6. Custom Gamemodes Contest

    Angel
    July 20, 2026 at 11:46 AM
  7. FAQ

    Angel
    July 20, 2026 at 10:14 AM
  8. Tangerine

    Harry Poster
    July 18, 2026 at 11:10 AM
  9. About our archived forums

    Thrik
    June 30, 2026 at 2:12 PM
  10. Mapcore Discord

    mason_fan123
    June 24, 2026 at 8:52 PM

Users Viewing This Thread

  • 1 Guest
  1. Privacy Policy
  2. Contact
Powered by WoltLab Suite™