Remove/Disable cubemaps with lua?

I want to remove or disable the cubemaps in gm_flatgrass. They are so bad. Anyone know if this is possible? The only thing I can think of is finding all the cubemap textures once the map is loaded and clearing them to black or something.

[editline]22nd October 2016[/editline]

I have the cubemap textures here. I guess I’ll try my idea.
[img_thumb]https://dl.dropboxusercontent.com/u/72472980/cubemaps.png[/img_thumb]

[editline]22nd October 2016[/editline]

Now I just have to figure out how to render to them. I tried GetRenderTarget with the cubemap name, but it did something weird to the color of the map and then crashed…

[editline]22nd October 2016[/editline]

[lua]GetRenderTargetEx(“maps/gm_flatgrass/c0_96_-12032”, 256, 256, RT_SIZE_OFFSCREEN, MATERIAL_RT_DEPTH_NONE, 8192, CREATERENDERTARGETFLAGS_AUTOMIPMAP, IMAGE_FORMAT_DEFAULT)[/lua]

This is the code I tried.

Wow, you are trying deep shits right here
What about if you just run mat_specular 0

That works, but I don’t know if I want to run that on my clients. Plus induces a >5 second lag.

If you don’t like cubemaps in gm_flatgrass, rename it and remove them/edit them and put a new map on your server?

Considered that, but not until https://github.com/garrynewman/garrysmod/pull/1170 is added

[editline]22nd October 2016[/editline]

Is there no way to render onto the cubemap textures? Maybe I am just using the wrong flags?

This code uses no flags when getting an existing texture for edit: https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/cl_viewscreen.lua#L6

Cubemaps are a simple materials. Try to render.MaterialOverride (or render.MaterialOverrideByIndex) it. Also I’m kinda interested in it, want to make realtime reflections that replaces cubemaps, so if you’ve got any progress - tell us, please.

I’m not sure how well render.MaterialOverride would work, as cubemaps are textures rather than materials/VMTs. However, I’m interested for the same reason. Rendering the scene 6 times in a tiny resolution, like 32x32, and dropping the LOD is what GTA V uses for its pretty reflections.

Same thing happens.

[editline]23rd October 2016[/editline]

Cubemaps don’t have any overridable material.