Lighting prop models? Created 8 years ago2016-01-06 10:02:36 UTC by Dallas Dallas

Created 8 years ago2016-01-06 10:02:36 UTC by Dallas Dallas

Posted 8 years ago2016-01-06 10:02:36 UTC Post #328104
I have some custom prop models in a map, and it seems pretty tricky to get them to light correctly. Often the models are lit much darker than I would expect, or almost nearly black.

Are there any tricks to getting models to light better? Should I be placing their joint somewhere specific in relation to the model, or the model's origin?

What are the rules around how the models sample their lighting?

And, i'm placing them using a cycler_sprite.

Thanks :)
Posted 8 years ago2016-01-06 10:27:38 UTC Post #328105
No matter how you build the mesh, the first bone, BIP01, must be some units over the floor, and that floor must be lit. In my Mod, I've had abunch of problems identical to yours, until I make this bone in all of the buildings of the map be in the enlighted part of the map, no matter where the mesh is located, in fact some of them are in areas where no light is applied and because the bip01 is in the lighted zone, the model is lit aswell.

Look at this pics, the first show the same prob you have,look at the turbines on the right of the door; the second show the new models with the Bip01 set on the very center of the map, which is where the main light of the map is applied. I must say that ther's only one central light in the map,ONLY ONE. ;)
User posted image
User posted image
Posted 8 years ago2016-01-06 11:08:23 UTC Post #328106
Yeah, as abbadon said, lighting on models is determined by the first bone of the model. On non animated prop models, this tends to be directly in the center.

This can cause unusual lighting on prop models, which is why I only ever use props for small objects and clutter in GoldSource. Larger objects just look unusual and it's not exactly nice to look at.
monster_urby monster_urbyGoldsourcerer
Posted 8 years ago2016-01-06 13:51:13 UTC Post #328107
Yes, I agree with that. When doing big props like in ZWC ( the map is 170 times the size of a regular player, and three of those props are equal in size!) you must even be careful with the size of the textures and also the "temperature" of the colours you use, and, of course, how you build the parts visible of the prop and the size of the textures applied to each of those parts to avoid the effect of looking a too oversized tiny model.
Posted 8 years ago2016-01-06 14:47:40 UTC Post #328109
Thanks for the information.

I think my problem is that I was not adding any bones, and just a single joint to my props.

It's just one regular bone that is needed to control the lighting origin?
Posted 8 years ago2016-01-06 15:01:19 UTC Post #328111
Ah yeah, joints. Sorry, I got my words mixed up.

You just need the single base joint. If the model compiles then you've got everything you need. The position of that joint determines where the model gets it's lighting info from.
monster_urby monster_urbyGoldsourcerer
Posted 8 years ago2016-01-26 14:57:23 UTC Post #328503
Is there a way to have a model play an animation in standard HL1 goldsource?

I don't think i can make a cycler_sprite play an animation right?

Could I add it to the level in a different method - like a monster_generic?
Posted 8 years ago2016-01-26 16:22:16 UTC Post #328504
Yeah if you use a cycler_sprite you can choose which sequence to play.
You can't choose one by name however, it's numerical. I'm pretty sure they follow the list shown in HLMV.

Also if you're making static models, I've had success putting moving the root bone away from the mesh edges, so the bone isn't sitting on a brush edge - they seem to get lit better IMO.

The root bone can be named whatever, so long as the mesh is parented to it.
Tetsu0 Tetsu0Positive Chaos
Posted 8 years ago2016-01-26 17:52:54 UTC Post #328505
I've been modding GoldSource for years and I didn't knew that bones caused those black models. Shame on me.

You are right Tetsu0, "cycler_sprite" uses animation index.
Posted 8 years ago2016-01-26 18:13:15 UTC Post #328506
I've been modding GoldSource for years and I didn't know.... XYZ
I learn something new probably 3x a week. and I've been futzing with GldSrc since 2004; Join the club :hammer: :walter:
Tetsu0 Tetsu0Positive Chaos
Posted 8 years ago2016-01-26 20:13:51 UTC Post #328508
Wait a moment!, are you saying that a cycler_sprite could be used in a ai_scripted sequence?. :rly:
Posted 8 years ago2016-01-26 20:24:11 UTC Post #328509
No, sorry you must have misunderstood. I meant animation sequence.
If you open a model with HLMV and go to the animations tab, it lists the animation sequences. The first in the list is 0, i think..
But you use that number to control the model animation if used with a cycler_sprite
Tetsu0 Tetsu0Positive Chaos
Posted 8 years ago2016-01-27 08:16:14 UTC Post #328510
Just what I needed, thank you!
Posted 8 years ago2016-01-27 18:17:04 UTC Post #328514
No, sorry you must have misunderstood. I meant animation sequence.
Ok, what a pity... then I'm forced to start coding my own custom model entity ;) ,haha!

http://articles.thewavelength.net/212/
Posted 8 years ago2016-01-27 18:44:35 UTC Post #328515
Nice! seems easy!
Tetsu0 Tetsu0Positive Chaos
Posted 8 years ago2016-01-28 11:24:34 UTC Post #328516
Yes!, TWL has very good tutorials as TWHL has ;)

Edit: I mean. TWL (The Wavelenght )
Posted 8 years ago2016-02-24 23:02:05 UTC Post #329010
Hmm i was just searching around tutorials and i found this
https://sites.google.com/site/svenmanor/tutorials/advancedlight at
ZHLT keyvalues
So i understand i can change the "light origin target" in brush entities
but at the end theres a note

"You can also use custom light origin for model-based entities"

soo...can i use same thing for monster_furniture, cycler? or is it something just for sven coop?? did i just misunderstood ;/
Posted 8 years ago2016-02-25 17:27:54 UTC Post #329019
It's a good way to do it, but keep in mind the max edicts limit of the hl engine if you are modding for Goldsource: 1 model= 1 light + 1 target + 1 light origin target + the model itself and the light... 6 edicts for each model, if I'm not wrong...
Posted 8 years ago2016-02-25 18:51:02 UTC Post #329021
It's a good way to do it, but keep in mind the max edicts limit of the hl engine if you are modding for Goldsource: 1 model= 1 light + 1 target + 1 light origin target + the model itself and the light... 6 edicts for each model, if I'm not wrong...
isnt this just for MP? btw didnt they fix it??
http://forums.svencoop.com/showthread.php/35541-How-to-fix-quot-No-free-edicts-quot-error-once-and-for-all

anyway still can't make custom light source for a model in editor ;(
Posted 8 years ago2016-02-25 20:55:11 UTC Post #329022
isnt this just for MP? btw didnt they fix it??
Sadly no. :(, those settings are just for SOURCE engine, I cannot understand why Valve doesen´t release an upgraded HL.exe. Times have changed and also computers!!, HL1 was designed to run on a P133 with 32 MB of RAM at 100 Hz and a 3DFx VooDoo of... 1MB!!!, now we have 3.2 GHz running on 5 simultaneous core with Videocards with more than 2 GB of memory and all under configurations that vary from 4 GB to 64 GB of RAM DDR4 at 3000 MHz!!!

Valve, please, release that HL.exe, for MOD´s sake ^^ ;)
Posted 8 years ago2016-02-26 12:58:15 UTC Post #329025
The analogy "If it ain't broke - don't fix it" applies here.
rufee rufeeSledge fanboy
Posted 8 years ago2016-02-26 15:01:24 UTC Post #329026
Mmmm, probably you're right. Yes, who cares of the Modding community!!, Valve released Source!!, so if you want more capacity start forgiving all stuff you're mastering for years and start all from scratch. I think that it cost nothing to release a better exe, they have released a lot of updated shls, why not an updated exe then?
Posted 8 years ago2016-02-26 16:23:27 UTC Post #329029
Im here to say that if you transition to source, you're not losing much.
You still build maps with brushes and lights.
Scripted stuff is easier, triggers are easier.
The code is just modified HL1 code.

It's a shame more people don't jump to source.
Tetsu0 Tetsu0Positive Chaos
Posted 8 years ago2016-02-26 16:51:11 UTC Post #329032
Shhh
monster_urby monster_urbyGoldsourcerer
Posted 8 years ago2016-02-26 19:52:06 UTC Post #329033
anyone source 2 ? :>
Posted 8 years ago2016-02-26 20:10:02 UTC Post #329034
I cannot understand why Valve doesen´t release an upgraded HL.exe
They did. WON users still whine about it.

And now for the alternative joke:
I cannot understand why Valve doesen´t release an upgraded HL.exe
They did. It's called HL2.exe.
Archie ArchieGoodbye Moonmen
Posted 8 years ago2016-02-27 11:50:38 UTC Post #329038
Ok, ok, I'm whinning too much. But I'm not talking about fancy things like bumpmapping, specular, advanced physics, etc. I' whinning about the problem with model's limitations, edicts, etc. Also, in my personal case, I am struggling with the normal SDK every day, I will surely turn crazy with something different or more advanced!!, XD
Posted 8 years ago2016-02-27 11:51:35 UTC Post #329039
Ok, ok, I'm whinning too much. But I'm not talking about fancy things like bumpmapping, specular, advanced physics, etc. I' whinning about the problem with model's limitations, edicts, etc. Also, in my personal case, I am struggling with the normal SDK every day, I will surely turn crazy with something different or more advanced!!, XD
You must be logged in to post a response.