Jump to content

Question about emiting light shader in MD3


Recommended Posts

Is it possible to make a bulb model and give it a shader that will emit the light?

 

if you mean retexturing a model with a lightemitting one, then yes. - infact, if there would be a lightbulb pack, downloadable here at the Hub,

one could just load the model in Gtk and place it somewhere, without creating brushes with light textures. That would make mapping more fun :)

Link to comment

Is emitting light via a shader dynamic lighting?

Nope, it needs to be on a map surface during the lighting compile. The light from light-emitting surfaces can also be bounced.

 

i.e. you need to compile the map with the misc_model that is converted into map triangles, not placed by the game.

It should work.

Link to comment

OK!

http://wrzucaj.net/LeI

http://wrzucaj.net/LeK

The problem is i think is that i create a bulb but the smaller emiting shader bulb was inisde the bigger glass bulb http://wrzucaj.net/LeM

So i took a chair model, _remap it to the emiting light shader and as You see it works... but not with glass bulb which i think block the light. So glass cant pass the light in the Md3 model right? (the bulb glass texture is just common/glassreflective and it works fine)

Link to comment

EDIT: ninja'd

 

Yes, so long as your model is compiled into map triangles and uses a light emitting shader.

 

Something like this:

map_objects/mymodel/mytexture {
	q3map_lightimage map_objects/mymodel/mytexture
	q3map_surfacelight 800
	q3map_lightsubdivide 256
    {
        map map_objects/mymodel/mytexture
        rgbGen identity
    }
}
Link to comment

Hmm i checked it and it is very strange because... The normal model doesnt emit any light but when i use modelscale function and i gave it number 5... And it emits light 8/ Why??? This piss me off... > : (

http://wrzucaj.net/L5T
http://wrzucaj.net/L5d
http://wrzucaj.net/L5N

 

textures/lodziarnia/ligh
{
    qer_editorimage    textures/lodziarnia/ligh
    q3map_surfacelight 9500
    q3map_backSplash 0.5 8
    q3map_nolightmap
    q3map_lightRGB 239 228 176
    {
        map $lightmap
    }
    {
        map textures/lodziarnia/ligh
        blendFunc GL_DST_COLOR GL_ZERO
    }
    {
        map textures/lodziarnia/ligh
        blendFunc GL_ONE GL_ONE
        glow
        rgbGen identity
    }
}

 

This is the shader... Everything works fine but not when the model is normal size. WHY!!!!!???

The chair i sent use the samer texture as this bulb... So this is not because of the shader...

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...