Specular not working [Solved]

How to create models in XSI and other 3D applications and make them work in Battlefront 1 & 2. Post models, tips for application usage and share anything XSI, 3DMax, SketchUp, etc.

Moderator: Moderators

Post Reply
User avatar
Oceans14
Command Sergeant Major
Command Sergeant Major
Posts: 296
Joined: Mon Apr 27, 2015 7:09 pm
Projects :: Athenova Campaign
Games I'm Playing :: SWBF2
Location: Planet 4546b

Specular not working [Solved]

Post by Oceans14 »

I made a hallway mesh and lit it with attached odf lights. However, they are not illuminating the hall itself, just player models. My textures have an alpha channel (hence the glow), I checked the specular box in ZE tools, and I set the rendertype to 4. This is my first time doing this sort of thing, so if anyone could help me figure out what's wrong that would be great.

Screenshot for reference, note the red light on the trooper but not the walls:
Hidden/Spoiler:
Image
Last edited by Oceans14 on Wed Nov 30, 2016 7:12 pm, edited 1 time in total.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Specular not working

Post by AQT »

Oceans14 wrote:My textures have an alpha channel (hence the glow)
Adding an alpha channel to your textures should not have enabled glow on its own.

Is the entire hallway using glow, which is why you are using alpha channels to control the strength of the glow? If so, that could be your problem. No matter how strong the glow is, any surface using glow will not be affected by any kind of lighting.

Also, a material cannot use both glow and specular at the same time, as glow would take precedence.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Specular not working

Post by Marth8880 »

The lights aren't affecting your mesh probably because there are too many (although it could easily be what AQT said too). According to BF2_lighting.doc, a single mesh can only be affected by at most 4 omni lights (which is what ODF lights are) simultaneously. https://sites.google.com/site/swbf2modt ... 2_lighting

Either way, what you should do instead of lighting your mesh dynamically is light it statically with vertex lighting.
viewtopic.php?p=526882#p526882
viewtopic.php?p=526899#p526899

That's not to say that you would remove the ODF lights if you do light the mesh statically, you'd want to put Static = "1" in the lights' ODFs.
AQT wrote:No matter how strong the glow is, any surface using glow will not be affected by any kind of lighting.
I've actually found that surfaces with glow can in fact be subtly affected by lighting, but I think only by the top and bottom ambient lights. To get around this you also enable emissive lighting.
User avatar
Oceans14
Command Sergeant Major
Command Sergeant Major
Posts: 296
Joined: Mon Apr 27, 2015 7:09 pm
Projects :: Athenova Campaign
Games I'm Playing :: SWBF2
Location: Planet 4546b

Re: Specular not working

Post by Oceans14 »

Marth8880 wrote:According to BF2_lighting.doc, a single mesh can only be affected by at most 4 omni lights (which is what ODF lights are) simultaneously
Ohh. I'm using 18. Gonna have to change that.
AQT wrote:Adding an alpha channel to your textures should not have enabled glow on its own.
Right, right. Should've mentioned that I enabled glow in ZETools. I had to make an alpha layer and color it gray (though it didn't dim nearly as much as I thought.)
Marth8880 wrote:I've actually found that surfaces with glow can in fact be subtly affected by lighting, but I think only by the top and bottom ambient lights. To get around this you also enable emissive lighting.
Yeah, I was actually wondering what the difference between emissive and glow was. By definition they seem to be the same.
The effect I'm going for is something like this:
Hidden/Spoiler:
Image
Notice how the dots are white while the light around them is red.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Specular not working

Post by AQT »

Oceans14 wrote:Notice how the dots are white while the light around them is red.
Instead of applying glow to the entire model (can you confirm whether you originally did this or not?), have the parts you want to glow use their own material cluster separate from the rest of your model and only apply glow to that cluster.
User avatar
Oceans14
Command Sergeant Major
Command Sergeant Major
Posts: 296
Joined: Mon Apr 27, 2015 7:09 pm
Projects :: Athenova Campaign
Games I'm Playing :: SWBF2
Location: Planet 4546b

Re: Specular not working

Post by Oceans14 »

I applied glow to the entire model, yes, but there are 3 different textures. There's a wall texture, a ceiling texture, and a floor texture. I applied glow to all of these when the model was in pieces, then merged them into a single mesh and checked the keep materials box. Not sure if that matters.

Edit: Okay, so I inspected the model and found that I had enabled glow for a fourth texture by accident. After disabling this, the light is being cast on the wall. Now I just need to dim the glowing textures because they're way too bright.
Last edited by Oceans14 on Mon Nov 28, 2016 12:56 am, edited 1 time in total.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Specular not working

Post by AQT »

As stated before, lighting does not affect glowing surfaces. Since your entire model has glow applied, that is why your red omni lights are not affecting any part of it. You will have edit the model to isolate just the parts you want to glow. There is no way around it. Even with alpha channels you cannot mask off parts you do not want glowing.
User avatar
Oceans14
Command Sergeant Major
Command Sergeant Major
Posts: 296
Joined: Mon Apr 27, 2015 7:09 pm
Projects :: Athenova Campaign
Games I'm Playing :: SWBF2
Location: Planet 4546b

Re: Specular not working

Post by Oceans14 »

Must've been editing my last message when you posted. You're right, that fixed it. Does glow and specular not work at the same time because the alpha layer is used as a controller for both these rendertypes?
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Specular not working

Post by AQT »

Glow and specular can work at the same.

For example, look at the stock Magnaguard model: The eyes use glow, but the rest of the body uses specular (or gloss). The eyes and body altogether may use the same texture, but the eyes obviously don't use glow and specular at the same time. So this means you can independently edit part of the alpha channel texture responsible for the controlling the glow of the eyes from the parts responsible for the controlling the specular of the the body.
User avatar
Oceans14
Command Sergeant Major
Command Sergeant Major
Posts: 296
Joined: Mon Apr 27, 2015 7:09 pm
Projects :: Athenova Campaign
Games I'm Playing :: SWBF2
Location: Planet 4546b

Re: Specular not working

Post by Oceans14 »

I decompiled the magnaguard texture to see what you're talking about. So the entirety of the alpha channel is dark gray except the eyes, which are white... and you're saying that by making the eyes white, the designers were able to designate that as glow while the grey was ignored/used as specular? Sorry if I'm not catching on, this is mostly new ground for me.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Specular not working

Post by AQT »

But that is just the texture. The texture/alpha channel does not specify what uses glow or specular. Rather, the model's materials do. You might want to open the Magnaguard model up in XSI (or a hex editor) to see how it is set up. You'll notice that the eyes are a separate cluster from the rest of the body. You'll also notice that the eyes use their own material with glow enabled, and the body also uses its own material but with specular enabled. Both materials use the same texture, but the UVs don't interfere with each other majorly.

Going back to the texture, you could make the entire Magnaguard's head white in the alpha channel if you wanted. But in-game, only the eyes will still be glowing, whereas the rest of the head won't be glowing, but rather just be very shiny because it still uses specular.

In case you weren't sure, white areas in the alpha channel for glow means the glow will be at its fullest strength. White areas in the alpha channel for specular also means the specular will be at its fullest strength. Black areas in the alpha channel for specular essentially "turns off" the specular, like it was never enabled in the first place. But the same is not true for black areas for glow. If you were to make the Magnaguard's eyes black in the alpha channel, the eyes would appear black in-game even if you did not change the red eyes in the main texture.
User avatar
Oceans14
Command Sergeant Major
Command Sergeant Major
Posts: 296
Joined: Mon Apr 27, 2015 7:09 pm
Projects :: Athenova Campaign
Games I'm Playing :: SWBF2
Location: Planet 4546b

Re: Specular not working

Post by Oceans14 »

I think I understand now. It'll come down to creating clusters for my hallway model - easy enough. Thanks very much for your help AQT, I definitely had no idea what I was doing before. (Thank you as well Marth - vertex lighting is an intriguing idea, I'm going to look into it.) Solved :)
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Specular not working [Solved]

Post by Marth8880 »

No problem, lemme know if you need help setting it up. ;)
Post Reply