DIFTOW Posted March 28, 2011 Report Posted March 28, 2011 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. Quote
Schmung Posted March 28, 2011 Report Posted March 28, 2011 I might be wrong here, but fairly sure that Source doesn't support multiple UV channels. Quote
Minos Posted March 28, 2011 Report Posted March 28, 2011 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. Quote
Campaignjunkie Posted March 28, 2011 Report Posted March 28, 2011 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 Quote
DIFTOW Posted March 28, 2011 Author Report Posted March 28, 2011 Thankfully that is this coming April, but I have to hope that it doesn't require Portal 2 to get the update. 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. Quote
cman2k Posted March 29, 2011 Report Posted March 29, 2011 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. Quote
DIFTOW Posted March 29, 2011 Author Report Posted March 29, 2011 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? "UnLitGeneric" { "$baseTexture" "models/NYC/WTC_Column_Lightmap" "$detail" "models/NYC/WTC_Column_Diffuse" "$detailscale" 1 "$model" 1 } 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. Quote
hessi Posted March 30, 2011 Report Posted March 30, 2011 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: Quote
insta Posted March 30, 2011 Report Posted March 30, 2011 You are like an angry wikipedia, hessi. Quote
hessi Posted March 30, 2011 Report Posted March 30, 2011 You are like an angry wikipedia, hessi. lol, that should stand below my username: "angry wikipedia" Quote
⌐■_■ Posted March 30, 2011 Report Posted March 30, 2011 You are like an angry wikipedia, hessi. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.