lighting of a wheel (func_rotating)


(]UBC[ McNite) #1

Hey @ all,

here comes another of my probs from making TheRiver… today its the lighting of a wheel. The room is the engine room for the tramengine. The wheels are clipped brushes, all 1 func_rotating. You can see it on the large wheels: there is one light area, and most of it is dark. So I guess the lighting of the wheel gets calculated while its not rotating, and the part of the wheel in the engine (where its dark) doesn’t get lit.

What bothers me is that the small red sidecap of the rotating axis isnt lightet correctly either on all surfaces. I already placed a small light exactly in its axis which should get light with the same intensity all over.

So what I m going to try is to place a lot of lights inside the engine, but it’s impossible to place enough lights in there to get it brightened up from all side (apart from the fact that it will look weird that the inside of an engine is all illuminated).
So what I d like to know is: Is there s a trick I haven’t found out about yet that gives all surfaces of a brush the same intensity of brightness/lighting?

edit: I know this should be possible… look at the engine room in the RtCW map Tram Siege.


(thore) #2

func_rotatings imo have a static lighting as you are experiencing. you can see the same effect on
common func_door_rotatings… they keep their closed-state lightmap even while and when open(ing).

what you could try is setting a ridiculus high lightmapscale and letting shadows and highlights blur all
over the surface. but i’m not familiar with those problems, so you might want to skip that proposal :smiley:


(nUllSkillZ) #3

I haven’t worked with func_rotating-entities so far.

But the “wheel” has some kind of rotational-symetry.
So it repeats after several degrees of rotation.
You could rotate the wheel by this small amount (for example 5 degrees).
And then set it’s state to the original orientation (very fast).
And repeat this.
So the lighting of the wheel is almost the same (except the 5 degrees).

But you can rotate it at the beginning 5 degrees in the opposite direction (very fast again).


(thegnat) #4

You could try to set _rs to 0 on the func_rotating. (disables receive shadows)
Then there shouldn’t be any shadows on the wheel, but it should be lit like the surrounding.


(zl1corvette) #5

I had a very similar problem on a wheel I had, the way I solved it was just to light it with a fake lightmap that is all just one color.


models/emperor/wheel_r_f
{
	surfaceparm metalsteps
	{
	map models/emperor/wheel.jpg
	tcmod rotate -417
	}
	{
	map $whiteimage
	rgbGen const ( 0.5 0.5 0.5 )
	blendfunc filter
	}
}

just modify the rgb const to suit your lighting, if you play with the values enough you can get it to look pretty good.


(Shaderman) #6

tcmod rotate -417
:eek:
Would you please explain me this value? What’s the difference to -57?


(zl1corvette) #7

Would you please explain me this value? What’s the difference to -57?

The difference would be someone who does sloppy math :smiley: (thanks btw)