Bug: Glow material property not working
by Matt Kronyak · in Torque 3D Professional · 05/03/2009 (11:51 pm) · 12 replies
Setting glow[0] = true; on a material does not result in any kind of glow. It doesn't appear to do anything.
#2
FYI
The material editor currently uses 2 save-out systems. The system is uses for a /new material/ uses the old sim object save. It's going to write every field in the material into a newly created file ( game/materialEditor/(materialName).cs ) ; if the game/materialEditor folder does not yet exist, it creates one. By beta 2, the materialEditor should not be using the old save system; and should be fully moved to the persistenceManager.
For consecutive material saves, for example if your material already exists in a materials.cs file in ... game/art/foo; the Material Editor will use the persistenceManager for saving. The persistenceManager will actually just overwrite changes that have been made to the material in the exact spot its located in script game/art/foo.
EDIT: To answer the original question; I wonder if your using the material editor or trying to set the value in script during runtime. If your trying the latter; try this running these two commands after you change the value on the material
(materialName).flush();
(materialName).reload();
05/04/2009 (8:03 am)
I understand how the Material Editor can still be somewhat of a mystery; certain things should be in docs, but I've just recently told Mich to hold off on them again. There will be some pretty radical changes to it again (which you /should/ see in beta 2 =) that didn't make it in beta 1.FYI
The material editor currently uses 2 save-out systems. The system is uses for a /new material/ uses the old sim object save. It's going to write every field in the material into a newly created file ( game/materialEditor/(materialName).cs ) ; if the game/materialEditor folder does not yet exist, it creates one. By beta 2, the materialEditor should not be using the old save system; and should be fully moved to the persistenceManager.
For consecutive material saves, for example if your material already exists in a materials.cs file in ... game/art/foo; the Material Editor will use the persistenceManager for saving. The persistenceManager will actually just overwrite changes that have been made to the material in the exact spot its located in script game/art/foo.
EDIT: To answer the original question; I wonder if your using the material editor or trying to set the value in script during runtime. If your trying the latter; try this running these two commands after you change the value on the material
(materialName).flush();
(materialName).reload();
#3
Neither the material editor nor manually editing the material worked.
My video card is a GTX 295, latest nvidia drivers.
I'll look into this more but if necessary I can make a video demonstrating the issue and all the steps I have taken to try to make it work.
05/04/2009 (9:08 am)
I dropped in a material.cs file and model / textures that I had from TGEA and loaded it up. Glow was defined on one of the materials but there was no glow in T3D. I opened the material in the material editor and verified that it knew that glow should work (the glow checkbox was checked). I also tried using the material editor and changing other materials to use glow but that did not work either.Neither the material editor nor manually editing the material worked.
My video card is a GTX 295, latest nvidia drivers.
I'll look into this more but if necessary I can make a video demonstrating the issue and all the steps I have taken to try to make it work.
#4
I'm coming directly from TGE, so maybe that's just a normal shader rule for all I know. I do know that I've got several glowing materials working with a similar card (GTX 285).
If it's actually a rendering issue, maybe something to do with SLI? Isn't the 295 technically a dual-board with an internal SLI link?
05/04/2009 (11:52 am)
I haven't seen glow do anything at all when the material has a normal map. Just thought I'd throw that out there. I'm coming directly from TGE, so maybe that's just a normal shader rule for all I know. I do know that I've got several glowing materials working with a similar card (GTX 285).
If it's actually a rendering issue, maybe something to do with SLI? Isn't the 295 technically a dual-board with an internal SLI link?
#5
05/04/2009 (1:06 pm)
@Henry: My material definition did have a normal map. I removed the normal map but glow is still not working. I will try some more later to see if I can figure out what the problem is. Just reporting what appears to be a bug on my end should anyone with with more knowledge on the matter be able to verify or resolve it.
#6
05/04/2009 (1:59 pm)
Logging as possible bug.
#7
I've tried adding a glow to both the BoomBot player materials as well as the station materials in the Full Template, and it appears to be working here. I've tested on a 6800 Go and a 7300 GT.
A couple of things you guys could try out:
Edit Templates/Full/game/art/shapes/players/BoomBot/materials.cs and add the following to each material:
Edit Templates/Full/game/art/shapes/station/materials.cs and add the same line to the Structure_wall material. Now start up Full.exe, go to fly cam (ALT-C) and look at the player and station. Any glow?
You could also try running DeletePrefs.bat and DeleteDSOs.bat from Templates/Full and see if that makes a difference.
Thanks!
- Dave
05/14/2009 (2:28 pm)
@Matt and Henry:I've tried adding a glow to both the BoomBot player materials as well as the station materials in the Full Template, and it appears to be working here. I've tested on a 6800 Go and a 7300 GT.
A couple of things you guys could try out:
Edit Templates/Full/game/art/shapes/players/BoomBot/materials.cs and add the following to each material:
glow[0] = true;
Edit Templates/Full/game/art/shapes/station/materials.cs and add the same line to the Structure_wall material. Now start up Full.exe, go to fly cam (ALT-C) and look at the player and station. Any glow?
You could also try running DeletePrefs.bat and DeleteDSOs.bat from Templates/Full and see if that makes a difference.
Thanks!
- Dave
#8
05/14/2009 (2:42 pm)
@David: After deleting my prefs and dso's I gave it a shot and glow appears to be working for me now. Not sure what the issue was but it is working now.
#9
- Dave
05/14/2009 (2:44 pm)
Cool. Thanks for getting back to me so quickly. I'm glad to hear it is working out for you.- Dave
#10
It would be great to know what pref was causing the issue, as I'm sure someone else will run into it.
Thanks!
- Dave
05/14/2009 (2:50 pm)
Actually, there is one more thing you could do. If this happens again to you (or anyone else), please make a copy of your prefs before running the delete batch file. Then either compare that with the one saved out after the delete, or pass it along to me to take a look.It would be great to know what pref was causing the issue, as I'm sure someone else will run into it.
Thanks!
- Dave
#11
I did what you suggested, and found the pertinent pref to be:
( in /game/scripts/client/prefs.cs )
If you change the value to "1", glow works.
10/09/2009 (3:10 pm)
@DavidI did what you suggested, and found the pertinent pref to be:
$pref::enablePostEffects = "0";
( in /game/scripts/client/prefs.cs )
If you change the value to "1", glow works.
#12
10/12/2009 (5:39 pm)
Glow is a PostFx so, yeah, you do kinda need to enable them to make it work =)
Associate Steve Acaster
[YorkshireRifles.com]
Are you using it in the Material Editor in-game? I've noticed that it doesn't always save the material files where you'd expect them to be. If you have another folder in your directory it seems to save to and read from the lowest material file in the directory.