model: weird i.e. no lighting


(]UBC[ McNite) #21

Well… i had to look that up too. Its mudguard or mudwing.

The German word for them is: “Kotflügel” which in direct translation would be shitwing (or faeces-wing)… seems that when cars came up in Britain there was only mud on the streets and we in Germany had the streets covered with droppings of horses (and worse) :smiley:


(seven_dc) #22

Hmm I was sorry to confuse. I should have addessed that my solution were for dissapearing truck model. The model might not be visible if the orgin is in structural brush.
The lighting this is tricky. Are you using lightgrid brush?


Arizona marijuana dispensary


(]UBC[ McNite) #23

I don’t use a lightgrid brush. And as Hummer pointed out, it didn’t help him anyway in his map. I tried different gridsizes (128 128 256, 128 128 128, 128 128 64) as was suggested to Hummer, but nothing changed in my map anyway.
It can well be that Detoeni is right about the shader, I haven’t tried on that one (i m at work right now), but I don’t want to spend several days on just some trucks whose only purpose is being decoration.


(zl1corvette) #24

what Detoeni was saying is that the truck model won’t light correctly if used as a misc_model, I have ran into this also, either use a misc_gamemodel or try this shader


models/mapobjects/blitz_sd/blitz_sd_body
{
   qer_editorimage models/mapobjects/blitz_sd/blitz_sd.tga
  implicitmap -
}

I think that’s what he is saying, I haven’t tried it myself and I suck at shaders :smiley:
But you see to also have problems with the truck as a misc_gamemodel, you can see if it’s a problem with your lightgrid by setting your _mingridlight key in your worldspawn, try a high value like 50, if that doesn’t light up your truck I don’t know what’s wrong.


(]UBC[ McNite) #25

Ok, these are the shaders I d need to modify according to Detoeni. I tried to use an implicitmap on them, taking the blitz_sd_body_mm script as an example. For this I copied the sections from the models_mapobjects.shader into my own shader, changing them (the original settings are behind the //)
Now I get the well known orange-black-pattern on the trucks and windows of the trucks… can anybody plz tell me exactly what to put in where and how to get this issue working?

This is what I put into the shader of my map:

models/mapobjects/blitz_sd/blitz_sd_body
{
	qer_editorimage models/mapobjects/blitz_sd/blitz_sd.tga
	{
		map models/mapobjects/blitz_sd/blitz_sd.tga
		implicitMap models/mapobjects/blitz_sd/blitz_sd.tga //rgbgen lightingDiffuse
	}
}

models/mapobjects/blitz_sd/blitz_sd_windows
{
	qer_editorimage models/mapobjects/blitz_sd/blitz_sd.tga
	{
		map textures/effects/envmap_slate.tga
		rgbGen lightingdiffuse //implicitMap models/mapobjects/blitz_sd/blitz_sd.tga
		tcGen environment
	}
	{
		map models/mapobjects/blitz_sd/blitz_sd.tga
		blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
		rgbgen lightingDiffuse
	}
}

models/mapobjects/blitz_sd/blitz_sd_windows_mm
{
	qer_editorimage models/mapobjects/blitz_sd/blitz_sd.tga
	{
		map textures/effects/envmap_slate.tga
		implicitMap models/mapobjects/blitz_sd/blitz_sd.tga //rgbGen lightingdiffuse
		tcGen environment
	}
	{
		map models/mapobjects/blitz_sd/blitz_sd.tga
		blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
		rgbgen lightingdiffuse
	}
}

models/mapobjects/blitz_sd/blitz_sd_windows_s
{
	qer_editorimage models/mapobjects/blitz_sd/blitz_sd_s.tga
	{
		map textures/effects/envmap_slate.tga
		implicitMap models/mapobjects/blitz_sd/blitz_sd_s.tga //rgbGen lightingdiffuse
		tcGen environment
	}
	{
		map models/mapobjects/blitz_sd/blitz_sd_s.tga
		blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
		rgbgen lightingDiffuse
	}
}

@ Detoeni: Your truck works perfect as misc_gamemodel. How do I get the windows looking right when I use the model as misc_model? Also, how much does one standard truck (body, box, 4 wheels) add to a map in tris/polycount? I d say its quite a bit, isn’t it?


(Detoeni) #26

Your shaders not quite right, you need a custom path, or it will conflict with the original and as your texture has a diffrent name to the shader, it needs to be named in the shader (qer_editorimage is not used by the game).

you need some thing like this in your script

remapshader models/mapobjects/blitz_sd/blitz_sd_body models/mapobjects/my_map/my_blitz_body 
remapshaderflush

and a shader like this:


models/mapobjects/my_map/my_blitz_body 
{ 
      qer_editorimage models/mapobjects/blitz_sd/blitz_sd.tga 
     surfaceparm nomarks
     implicitMap models/mapobjects/blitz_sd/blitz_sd.tga 
} 

for the glass remap to this:

models/mapobjects/my_map/my_blitz_glass
{
	qer_editorimage models/mapobjects/blitz_sd/blitz_sd.tga
	surfaceparm nomarks
	{
			map textures/effects/envmap_slate_90.tga
	         	rgbGen vertex
	         	tcGen environment
	}
	{
	         	map models/mapobjects/blitz_sd/blitz_sd.tga
	         	blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
	         	rgbGen vertex

	}
}


(Detoeni) #27

seems that when cars came up in Britain there was only mud on the streets

:smiley:

umm, back in them days we didn’t have streets, just mud and lots of it, things have not got much better since :lookaround:

edit
Ooops sorry mcnite, you posted while I was composing,
I think my post above ansawed a few of your problems,tris count on my models is not alot for what they are.

edit again
see the read me in dt_oblitz for the info on how to remap the shaders on my models.


(G0-Gerbil) #28

I’d probably say the easiest way would be to reskin the truck in milkshape. I did this for my truck in church after I had no end of shader problems with it.
Of course, then I started seeing my truck version in other maps without credit, but that’s life :wink:


(]UBC[ McNite) #29

Well, I m not going to learn a prog just for some stupid truck model in the only map I ll ever do for ET… if it doesn’t work with shaders I ll use Detoenis Truck as misc_gamemodel, that option works fine. I ll just try to go for misc_model to improve game performance.


(G0-Gerbil) #30

For a single truck it’s really not worth bothering with the ‘performance’ issue, just go with what works.
I mean, do you really want to sit down and work out whether misc_gamemodel with it’s AABB in viewport calculations + card-side backface culling* is slower or faster than the misc_model causing more BSP splits but with early backface culling?

Seriously, for a single truck, don’t sweat it. Just stick it in the way it works and you’ll be fine :slight_smile:

  • I ‘think’ it uses the graphics card to back-face cull, could be wrong.

(]UBC[ McNite) #31

Well, its 3 trucks that are relevant cuz they are in the open area (all the other ones don’t get drawn when the player is in the open terrain cuz I messed with hints till that worked.
I m pretty afraid I reach tris-limits that are no good, so I figured using misc_models would at least reduce the network traffic and runtime entity count (I also have a lot of entities around, mainly func_explosives). Maybe it helps reducing the risk of client lag. Well I try to optimize where i can :blah: