problems with model compile


pedroleum
09-03-2006, 08:32 AM
i'm trying to lower the lod on the default hedge model for my new map, so i decompiled it and removed a good amount of faces. now after i recompile the model, it's strangely lit ingame. it seems to me the default hedge model is not fully exposed to the light in the map or something similar. i tried some stuff and it seems to be a problem with exporting or compiling, not with the texture, since the ones on the pics share the same vtf and vmt.

here's a pic of what i'm talking about.
http://img235.imageshack.us/img235/1489/strangelightinghj8.jpg

the default hedge is lit much smoother and those black parts do not appear.
i first thought its related to culling, but both models (original and modified) use the nocull command in the .qc file.

does anyone know what i am doing wrong?

ultranew_b
09-03-2006, 03:53 PM
Maybe try using an info_light entity?


Possibly post the .vmt file, maybe there is a small error in it?

MeleeMe!
09-03-2006, 05:51 PM
I had the same problems with a custom hedge model I made. I never found out what the problem was though. The origin for your model is above the ground in that pic right? Thats really the only thing I could ask. I have no clue why that happens but if you find out please post why so I could fix mine also.

Ranson
09-04-2006, 12:59 AM
My only guess would be that the normals went fubar. I'd suppose that the normals of each hedge part in the default model point into the same direction. While in your recompiled model the normals of the lighter parts are inverted or somehow off.
It doesnt matter if the material is set to nocull, the lighting is defined by original side of the face. Try to enable backface culling in the viewport of your modeling program and check if all faces are pointing into the same direction. Also use whatever your modeling tool offers to reset the normals.

Might also be a compile option the decompiler didn't recreate. Tho I dunno any that would affect lighting.

pedroleum
09-04-2006, 04:37 AM
i'll try that, ranson. sounds plausible to me. thanks for your help!

pedroleum
09-04-2006, 04:42 AM
Originally posted by ultranew_b
Maybe try using an info_light entity?


Possibly post the .vmt file, maybe there is a small error in it?

a info_light entity for every hedge would be madness ;) i have around 200 of them in my map. i really think it's some compile error, because i can decompile the hedge and recompile it again and the error is there. i do not even need to open it in modelling program and change stuff.
also the vmt is exactly the same file. its not even a copy of it.

i'll try what ransons said.
i'll have a look at the normals of the default hedge in hlmv and compare to the ones i get when i import the decompiled model.

pedroleum
09-05-2006, 04:19 PM
hmm... i took a look at the normals and turned them, so they look all in the same direction. it's now better than before, but still not nearly as good as the default model. somehow the modified one is much brighter (now everywhere) and some parts (small parts on top of the hedge) are still with the wrong lighting. (i can turn them over, but it doesn't change lighting) it seems like there's something else they used to do the lighting on that hedge...

well.. if noone knows what it could be, i'll just use the default one :(

pedroleum
09-05-2006, 04:24 PM
Originally posted by MeleeMe!
The origin for your model is above the ground in that pic right?

sorry, overread your question before...
yes, its at the same position as the default one :(

Trp. Jed
01-26-2007, 03:39 PM
If your faces are single sided and you use nocull the recreate backface is lit as per the front. This can be a probkem if the inner side should be dark and in fact gets rendered light.

It's possible you've got something similar going on. If I were you I'd double check all your vertexes are welded, smoothed and your normals are correct.

pedroleum
01-26-2007, 05:13 PM
the faces are single sided and nocull is used. the funny thing is, if i decompile and recompile with those modelfiles (i don't edit them), its all messed up. i have no idea what is done during that process.

i'll check on the normals again... thanks for the help!

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.