• Possible to fix Ambient Occlusion on models that don't?
    13 replies, posted
I don't really know if the problem is that they don't have AO but I do know is that some models turn transparent when AO is turned on. Is there maybe a way to fix this?
You would have to recompile the model to have Ambient Occlusion. Or, if you don't care much for it, and don't mind that specific model not having it... Put the following in the VMF for it. "$ambientocclusion" "0" Spaces, quotes, everything. It will look something along the lines of this when you're finished. [IMG]http://i.imgur.com/nXrD7D5.png[/IMG]
Will it look ugly if I have a scene where everything has AO except for that one model? It's a human character btw. Thanks too, that worked just like you said it would. Is it hard to recompile a model to have AO?
It can be time consuming, especially if you're new. And Ambient Occlusion just adds a little extra shadow, nothing a few well placed lights can't fix.
It doesn't need to be recompiled to have AO affect it, you can just edit the VMT files and give it phong (which requires an $bumpmap parameter), if you don't want your model to have phong, you can set $phongboost to 0, as long as the model has a normal map and phong enabled, it'll have AO, even if the phong boost is set to 0 If you don't have a normal map, you can either make one, or use Team Fortress 2's flat_normal in the materials/models/effects directory
Interesting, I was not aware of this method. However, I just attempted it on a model, and it's still transparent. What exactly did I do wrong with this VMF? I'm possibly just misunderstanding your post. [QUOTE] "VertexLitGeneric" { "$baseTexture" "models\RvB\tex" "$bumpmap" "models\RvB\SpartanNormalST" "$surfaceprop" "metal" "$normalmapalphaenvmapmask" 1 "$envmap" "" "$envmapcontrast" 1 "$envmapsaturation" "[.3 .3 .3]" "$envmaptint" .7 "$halflambert" 1 "$selfillum" 1 "$alphatest" 1 "$ambientocclusion" "1" "$phong" "1" //"$phongexponenttexture" "models\H3spartan\masterchief_base_exponent" "$phongexponent" "15" "$phongboost" "0" //"$lightwarptexture" "models\H3spartan\h3_lightwarp" "$phongfresnelranges" "[0.04 0.4 0.5]" //"$rimlight" "1" //"$rimlightexponent" "4" }[/QUOTE]
Disabling phong should fix the transparency issue, of course then you'll have no phong. You COULD always render it in 2 passes, one with phong enabled but AO disabled (for the whole shot) then another pass of JUST AO (with phong disabled) then you blend the AO pass back on top of the beauty render by using a multiply blend mode. Kind of a crazy solution but it should technically work.
[QUOTE=Vel;42089628]Interesting, I was not aware of this method. However, I just attempted it on a model, and it's still transparent. What exactly did I do wrong with this VMF? I'm possibly just misunderstanding your post.[/QUOTE] Alphatest and translucent will disable ao on that portion of the model always. I see you still have that.
$mostlyopaque !! it has to have $mostlyopaque !!
[QUOTE=Grub;42100733]$mostlyopaque !! it has to have $mostlyopaque !![/QUOTE] Which is a QC ciommand, not a VMT one.
A quick fix if you don't want to recompile is removing $alphatest 1, but obviously, if it uses alphas then it's gonna disable it.
It really is easier to just recompile with $mostlyopaque. If people really find it so daunting, I can write up a barebone-basic guide on how to do it. Would people like me to do so? Just rate this post "Informative" if you would like me to write such a guide. It won't be comprehensive or hand-holding, but will give you the information you need to do a basic recompile with $mostlyopaque.
[QUOTE=Gmod4ever;42110245]It really is easier to just recompile with $mostlyopaque. If people really find it so daunting, I can write up a barebone-basic guide on how to do it. Would people like me to do so? Just rate this post "Informative" if you would like me to write such a guide. It won't be comprehensive or hand-holding, but will give you the information you need to do a basic recompile with $mostlyopaque.[/QUOTE] I am now quoting this and rating myself agree EDIT I can't rate myself agree
[QUOTE=mech126;42269950]I am now quoting this and rating myself agree EDIT I can't rate myself agree[/QUOTE] Thank you for reminding me. Here it is. Like I said, not very comprehensive or hand-holding. Hopefully I remembered everything. Let me know what you guys think, and how well it works. [url=https://dl.dropboxusercontent.com/u/8416055/Permanent/PDF/Recompiling%20%20Source%20Models%20to%20have%20Ambient%20Occlusion%20in%20the%20Source%20Filmmaker.pdf]PDF - Recompiling Source Models to have Ambient Occlusion in the Source Filmmaker[/url]
Sorry, you need to Log In to post a reply to this thread.