Ritualistic Forums

Go Back   Ritualistic Forums > Ritual Entertainment Games > Star Trek Elite Force II > EF2 Editing Forum

Reply
 
Thread Tools Display Modes
Old 10-02-2003, 01:17 PM   #1
6of1
Fanboy
 
Join Date: Mar 2002
Posts: 559
Default Glow

I had posted this question as an addition to another thread. However, I am afraid it was buried, so Im posting it separately:

I am making a ship from brushes (because I do not have max, nor can I model). I wish to make the ship have lighted windows etc, much like on ent and voyager. I need them because the map I am making is somewhat dark (at least around the ship) and I want the glow from the lights to be visible. Here is an example of what I am talking about:



(While my map is not going to be quite this dark, I wanted you to see what I was talking about.)

Now, my question is: how can I apply the glow technique used to light this model ship to brushes so that lights on a brush ship will glow in the same fashion.

This is VERY important for me to learn, so ANY help anyone could provide would be GREATLY appreciated.
6of1 is offline   Reply With Quote
Old 10-02-2003, 06:23 PM   #2
6of1
Fanboy
 
Join Date: Mar 2002
Posts: 559
Default Re: Glow

BrushBaron

I notice you have answered a few questions, but have not addressed this one. Does this mean you don't know how to do it - or that it can't be done?
6of1 is offline   Reply With Quote
Old 10-02-2003, 06:51 PM   #3
7o'nine
Fanboy
 
7o'nine's Avatar
 
Join Date: Mar 2002
Location: Canada
Posts: 555
Default Re: Glow

I think the reason they used a separate glow texture is so that even if the map is completely dark, the windows will always shine through (like a no-lightmap thing)

If you want to produce the same effect on brushes, I'd probably start with the shader for the Ent-E model:
Quote:

models/vehicle/enterprise-e/ent-e-dishtoptop
{
qer_editorimage models/vehicle/enterprise-e/ent-e-dishtoptop.tga
{
map models/sky/UI-ent-dome/env_diffused.tga
rgbGen default
tcGen environment
}
{
map models/vehicle/enterprise-e/ent-e-dishtoptop.tga
blendFunc blend
rgbGen default
}
{
map models/vehicle/enterprise-e/ent-e-dishtoptop_glow.tga
blendFunc add
}
}
You just need to replace the paths to your own textures (except for the env_diffused which I think is the 'shine' texture)
The dishtoptop.tga would be the texture for your ship and the dishtoptop_glow.tga would hold your lights.
Umm.. I think this is what you're looking for?? Or am I understanding wrong?

7
7o'nine is offline   Reply With Quote
Old 10-02-2003, 07:05 PM   #4
6of1
Fanboy
 
Join Date: Mar 2002
Posts: 559
Default Re: Glow

I think this makes sense if it can indeed be applied to brushes. For instance, in the scripts above, it is an entity to which the texture is being applied (models/vehicle/enterprise-e/ent-e-dishtoptop). How would one go about scripting the glow etc for a brush - ie what would be the path (if one is even needed)

Another question occurs to me. Would I have to make two textures as Ritual did for ent? IOW, would I need a 'base' texture with all the non-light details, and a 'decal' texture with just the glowing windows? Or would I be able to integrate them both into one texture somehow?
6of1 is offline   Reply With Quote
Old 10-02-2003, 10:50 PM   #5
BrushBaron
Level Designer
 
Join Date: Sep 2000
Location: Texas
Posts: 1,457
Default Re: Glow

You'll want to create a shader just like 7o'nine posted from the ent-e model. You'll also want a base texture and a seperate one for the windows that glow. I think it's the "BlendFunc add" command that make it look like it glows.
BrushBaron is offline   Reply With Quote
Old 10-02-2003, 11:13 PM   #6
6of1
Fanboy
 
Join Date: Mar 2002
Posts: 559
Default Re: Glow

BB

Thank you for the reply. And that sounds promising. One thing still confuses me a bit. The shader script references a model does it not (ie - it is applied to a model by name and path in the script)? If it does, how should I write the script so it works on something other than a model.

For instance, say the I have the two textures:

1 - wall.tga
2 - wall_glow.tga

and they are in the directory: base/textures/myship

- how exactly would I write the script? If these were being applied to another model, I would be able to proceed. However, since I am trying to apply them to a brush, I simply don't know what/how to reference anything else beyond those things.
6of1 is offline   Reply With Quote
Old 10-02-2003, 11:37 PM   #7
7o'nine
Fanboy
 
7o'nine's Avatar
 
Join Date: Mar 2002
Location: Canada
Posts: 555
Default Re: Glow

Shaders between models and brushes are pretty much the same.. I think there might some model-specific commands, but the shader above should work on a brush.
The shader would probably look like this:
Quote:

textures/myship/shiphull
{
qer_editorimage textures/myship/wall.tga
{
map models/sky/UI-ent-dome/env_diffused.tga
rgbGen default
tcGen environment
}
{
map textures/myship/wall.tga
blendFunc blend
rgbGen default
}
{
map textures/myship/wall_glow.tga
blendFunc add
}
}
7
7o'nine is offline   Reply With Quote
Old 10-03-2003, 12:17 AM   #8
kanaeda
Veteran
 
kanaeda's Avatar
 
Join Date: Apr 2002
Location: Seattle, Washington
Posts: 382
Default Re: Glow

if i'm not mistaken, the 'map' line is listing what texture file is being used. just replace it with the corresponding command for a standard shader and point it to the right location and image file and it *should* work.
kanaeda is offline   Reply With Quote
Old 10-03-2003, 04:10 AM   #9
6of1
Fanboy
 
Join Date: Mar 2002
Posts: 559
Default Re: Glow

Ok - what would that command be exactly? And would all the rest of the above be necessary?
6of1 is offline   Reply With Quote
Old 10-03-2003, 02:48 PM   #10
Stukatto
Casual
 
Join Date: Mar 2002
Location: United Kingdom
Posts: 32
Default Re: Glow

If u wanna know the basics of shaders, checkout the Shader Manual. It's for Q3/EF but the core of the shader commands remains the same.

[img]/forums/images/graemlins/smile.gif[/img]
Stukatto is offline   Reply With Quote
Old 10-04-2003, 03:35 AM   #11
6of1
Fanboy
 
Join Date: Mar 2002
Posts: 559
Default Re: Glow

Ok - this was and wasnt helpful. I have gotten to the point where I can make a texture glow. Here is the shader as I am using it:

textures/ship/pylon_side
{
qer_editorimage textures/ship/pylon1.tga
if novertexlight
{
map models/sky/UI-dome/env_diffused.tga
rgbGen default
tcGen environment
}
{
map textures/ship/pylon1.tga
blendFunc BLEND
rgbGen default
}
{
map textures/ship/pylon1_glow.tga
blendFunc ADD
}
endif
if vertexlight
{
map textures/ship/pylon1.tga
rgbGen default
}
endif
}

----

Now I have one problem - as it stands, the entire combo glows as if lit. However, I need only the lighted windows (ie the glow texture) to actually glow. I need the hull of the ship to act as a regular texture does - meaning, when it is in the dark, I don't want to see it. I only want to see the lights themselves. I thought I might have resolved the issue by making an alpha channel which was all white - thus supposedly blocking any light. Unfortunately that didnt do the trick.

Any suggestions - for I really need help here.
6of1 is offline   Reply With Quote
Old 10-04-2003, 11:39 AM   #12
7o'nine
Fanboy
 
7o'nine's Avatar
 
Join Date: Mar 2002
Location: Canada
Posts: 555
Default Re: Glow

I *think* a "map $lightmap" might be what you need..

textures/ship/pylon_side
{
qer_editorimage textures/ship/pylon1.tga
if novertexlight
{
map models/sky/UI-dome/env_diffused.tga
rgbGen default
tcGen environment
}
{
map $lightmap
blendFunc BLEND
rgbGen identity
}
{
map textures/ship/pylon1_glow.tga
blendFunc ADD
}
endif
if vertexlight
{
map textures/ship/pylon1.tga
rgbGen default
}
endif
}


Changes made in bold above..
You might need to change the first line:
"textures/ship/pylon_side"
to
"textures/ship/pylon1
I may be wrong so if someone knows better feel free to correct me [img]/forums/images/graemlins/laugh.gif[/img] But try that and see if it works..

7
7o'nine is offline   Reply With Quote
Old 10-04-2003, 01:49 PM   #13
6of1
Fanboy
 
Join Date: Mar 2002
Posts: 559
Default Re: Glow

7

Well, this did have an effect, but not quite what I was looking for. Indeed, when it is in the dark, it no longer shows the entire texture - just the lights from the windows. However, if there is ANY light in the map itself which falls upon the texture, it overexposes the texture. And if it is getting any direct light, the texture washes out completely and becomes completely white.

Any other ideas? You seem to be on the right track, mate, And I really appreciate the help. We just arent there yet. [img]/forums/images/graemlins/wink.gif[/img]
6of1 is offline   Reply With Quote
Old 10-04-2003, 03:08 PM   #14
7o'nine
Fanboy
 
7o'nine's Avatar
 
Join Date: Mar 2002
Location: Canada
Posts: 555
Default Re: Glow

Ah.. I see what you mean. I made a shader myself using the ent textures to test with.. so far I've been able to get the effect you want except that I had to remove the 'env-diffused' part..
Quote:
textures/glow1/glow1
{
qer_editorimage textures/glow1/glow1.tga
{
map $lightmap
rgbGen identity
}
{
map textures/glow1/glow1.tga
blendFunc FILTER
rgbGen identity
}
{
map textures/glow1/glow1_glow.tga
blendFunc ADD
}
}
here's what it looks like:
http://members.rogers.com/exit/glow1.jpg
You just need to replace the paths to your own textures [img]/forums/images/graemlins/smile.gif[/img]

I'm not sure how to get the 'env-diffused' working with the glow though.. (it adds the 'shine' to the metal)..

7
7o'nine is offline   Reply With Quote
Old 10-04-2003, 04:39 PM   #15
6of1
Fanboy
 
Join Date: Mar 2002
Posts: 559
Default Re: Glow

YES - that did it! Man I love you for that.

Thanx!
6of1 is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 07:52 PM.


Powered by vBulletin® Version 3.6.3
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.