Jump to content

Question about emiting light shader in MD3


Recommended Posts

Posted

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 :)

Posted

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.

Posted

I mean make a bulb model in the Blender , export it to Jka and gave it a shader that will emit the light but not using a light enity in gtkradiant.

Posted

I've already seen models given custom a lightemitting shader, if you had a light bulb model, you can give it texture that emmits light.

Posted

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)

Posted

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
    }
}
Posted

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...

Posted

I admit that I don't know a lot about shaders, but having "q3map_nolightmap" & "map $lightmap" seems very odd. No idea about why it's not working on a non-scaled model.

Posted

The amount of light emitted from a light emitting surface depends on the size of the surface and the parameters in the shader, try making those parameters extremely high and using regular scale, see if that works.

Posted

The amount of light emitted from a light emitting surface depends on the size of the surface and the parameters in the shader, try making those parameters extremely high and using regular scale, see if that works.

How to do it?

Posted

Is there a way for player models to emit light?

It's possible only making shaders with the "glow" parameter into shader code at moment. that allow to a model of emiting dynamic lights. O.o

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...