Page 1 of 1

Please expose smd tags to mod control

Posted: 16 Mar 2010, 00:46
by Forboding Angel
[18:21:50] <[Evo]Forboding_Angel> Could you help me with this? http://springrts.com/phpbb/viewtopic.php?f=23&t=22475
[18:26:32] <lurker[]> override it from the mod?
[18:26:55] <[Evo]Forboding_Angel> yeah, if possible
[18:27:03] <lurker[]> don't think you can actually, but grab darkening.lua from CA?
[18:27:16] <[Evo]Forboding_Angel> what does that do?
[18:27:34] <lurker[]> or is that the wrong color
[18:27:50] <lurker[]> can darken or brighten, but I don't remember if it does units
[18:28:25] <[Evo]Forboding_Angel> I don't suppose a partial smd in a maps folder int he mod would work would it?
[18:28:37] <[Evo]Forboding_Angel> just thought of that
[18:28:39] <lurker[]> ...no
[18:29:08] <lurker[]> what would you even name it?
[18:29:24] <[Evo]Forboding_Angel> lol, good point
[18:29:33] <[Evo]Forboding_Angel> I do see darkening in ca source?
[18:29:38] <[Evo]Forboding_Angel> is it in trunk?
[18:30:11] <lurker[]> look harder
[18:30:58] <[Evo]Forboding_Angel> gui
[18:31:00] <[Evo]Forboding_Angel> figures...
[18:31:17] <[Evo]Forboding_Angel> tbh what i really need is somehting that jsut lightens up units a little bit
[18:34:06] <[Evo]Forboding_Angel> nope this isn't what i need :-/
[18:34:09] <[Evo]Forboding_Angel> Thanks tho
[18:36:02] <[Evo]Forboding_Angel> Would this be useful?
[18:36:03] <[Evo]Forboding_Angel> DrawUnit(unitID,DrawMode)
[18:36:03] <[Evo]Forboding_Angel> With enum DrawMode {
[18:36:04] <[Evo]Forboding_Angel> notDrawing = 0,
[18:36:04] <[Evo]Forboding_Angel> normalDraw = 1,
[18:36:04] <[Evo]Forboding_Angel> shadowDraw = 2,
[18:36:04] <[Evo]Forboding_Angel> reflectionDraw = 3,
[18:36:04] <[Evo]Forboding_Angel> refractionDraw = 4
[18:36:04] <[Evo]Forboding_Angel> };
[18:36:20] <[Evo]Forboding_Angel> but unless I'm mistaken, that's per unit
[18:41:07] <lurker[]> since you really want to change a param to the shader, hooking unit drawing would be a lot of overhead
[18:43:25] <[Evo]Forboding_Angel> crud
[18:43:42] <[Evo]Forboding_Angel> difference pics: http://www.imagebam.com/image/f4571172157671
[18:43:48] <[Evo]Forboding_Angel> http://www.imagebam.com/image/96478372157674
[18:43:53] <[Evo]Forboding_Angel> It's subtle at first
[18:43:59] <[Evo]Forboding_Angel> but the difference is HUGE
[18:48:08] <lurker[]> still kind of wondering why there is no request to make it doable..
[18:48:30] <[Evo]Forboding_Angel> From me? Or in general
[18:48:51] <[Evo]Forboding_Angel> If from me, well considering that I jsut found this out 3 minutes ago... not shocking
[18:48:52] <[Evo]Forboding_Angel> ;p
[18:50:03] <lurker[]> half an hour, three minutes, same thing
[18:51:12] <[Evo]Forboding_Angel> I highly doubt any of the devs will care
[18:51:41] <[Evo]Forboding_Angel> lot of work for little gain and because one guy wants to override a single smd tag... not exactly the most rewarding feature to work on ;p
[18:52:58] <lurker[]> 'lot of work'
[18:53:05] <lurker[]> think about it
[18:53:08] <lurker[]> it's a single variable
[18:53:12] <lurker[]> you want a way to change it
[18:53:25] <lurker[]> what could POSSIBLY be a lot of work?
[18:53:47] <[Evo]Forboding_Angel> ok ok, I'll maek poast request :-)
Long story short, as behe discovered, the unitambientcolor in 99% of spring maps is totally screwed. Because evo units are mostly mid to dark greyish it makes them hard to pick out. I have specular cranked up as high as possible, but I simply can't get the units any brighter.

Putting unitambientcolor to 0.5, 0.5, 0.5 completely nullifies the issue and I would like the ability to do it.

Topic related: http://springrts.com/phpbb/viewtopic.ph ... 84#p420184

Re: Please expose smd tags to mod control

Posted: 16 Mar 2010, 19:18
by Tobi
Since there's (undocumented?) LuaUnsyncedCtrl::SetWaterParams I agree that LuaUnsyncedCtrl::SetGroundParams would make sense to have.

Re: Please expose smd tags to mod control

Posted: 16 Mar 2010, 21:15
by Forboding Angel
Oh I should note that in the pics, the unit is in the shade. There is a huge difference when the unit moves into full sunlight.

Re: Please expose smd tags to mod control

Posted: 17 Mar 2010, 00:11
by Beherith
Allowing smd params to be dynamically set through lua might pose issues with SSMF, since the params are declared as consts there on shader compiling for speed.

Re: Please expose smd tags to mod control

Posted: 17 Mar 2010, 02:05
by Argh
It shouldn't eat a lot of speed to transmit those over as uniforms at the start of the process. I wouldn't worry about it, basically- once map rendering's GLSL, we really should let Lua play with the lighting system in general. It won't look perfect on all maps, to be sure, but... meh... dynamic sunlight is a big deal...

Re: Please expose smd tags to mod control

Posted: 17 Mar 2010, 21:47
by lurker
Shaders can be recompiled... relatively easily.