Hydra Posted January 1, 2021 Share Posted January 1, 2021 Hi, I made some front bumpers and the problem is that the reflection shader is not applied on them. I am still a beginner in modeling and it would be very helpful if I could be told how I could solve this problem. I looked over the forum before doing this topic but I didn't find anything about it or I went over it without seeing it Link to comment
Administrators Tut Posted January 1, 2021 Administrators Share Posted January 1, 2021 In the past I haven't had luck with vehicle upgrades, and I believe @Platin - xNikoXD had problems with vehicle upgrade shaders too. Perhaps if he sees this he may be able to weigh in 1 Link to comment
Hydra Posted January 1, 2021 Author Share Posted January 1, 2021 I found the problem but idk how to fix it. The problem is because the texture is unamed Link to comment
Administrators Tut Posted January 1, 2021 Administrators Share Posted January 1, 2021 What happens if you assign a custom texture to its DFF material and load in a custom .TXD? Link to comment
MTA Anti-Cheat Team Dutchman101 Posted January 2, 2021 MTA Anti-Cheat Team Share Posted January 2, 2021 It's usually because: - Shader doesn't define the material name of custom upgrade part, or the part of that vehicle model which is the upgrade.. which it applies the reflection to. For example, check below spoiler for the list of material names used by resource "carshine_reflection_shader" (click link for community download of said resource), which aims for wide compatibility with mods due to the assortment of material names (as many mods would use for example "chassis", "remap_body", "remap", etcetera.. for the largest surface of the vehicle): Spoiler local texturegrun = { "predator92body128", "monsterb92body256a", "monstera92body256a", "andromeda92wing", "fcr90092body128", "hotknifebody128b", "hotknifebody128a", "rcbaron92texpage64", "rcgoblin92texpage128", "rcraider92texpage128", "rctiger92body128", "rhino92texpage256", "petrotr92interior128", "artict1logos", "rumpo92adverts256", "dash92interior128", "coach92interior128", "combinetexpage128", "policemiami86body128", "remap_body", "remap", "policemiami868bit128", "hotdog92body256", "raindance92body128", "cargobob92body256", "andromeda92body", "at400_92_256", "body", "chassis", "nevada92body256", "polmavbody128a", "sparrow92body128", "hunterbody8bit256a", "seasparrow92floats64", "dodo92body8bit256", "cropdustbody256", "beagle256", "hydrabody256", "hydra128", "hydradecal", "rustler92body256", "shamalbody256", "skimmer92body128", "stunt256", "maverick92body128", "leviathnbody8bit256" } Then still, there can easily be mods that use unique material names invented by the model creator. So, the first step would be identifying the material name and add it into the shader script.. for identifying, well obviously the material name is always in the TXD (name of the texture - what it matches to, e.g you're looking for the chassis or body, you can see which texture is for that part and copy its name) or get it from your modelling program, e.g in 3DS Max you hit the "M" button and click the appropiate part of the model in viewport to navigate to its materials and properties. 2) Material itself doesn't support reflection.. modellers can do many things in material properties within their modelling/3D software, or port over, materials that aren't compatible with some or all of the reflection techniques. If you add the material name to the shader script like the above, and it doesn't render reflection, you know enough and should probably revise or re-do the material. 1 Link to comment
Platin Posted January 4, 2021 Share Posted January 4, 2021 (edited) On 01/01/2021 at 13:05, Tut said: In the past I haven't had luck with vehicle upgrades, and I believe @Platin - xNikoXD had problems with vehicle upgrade shaders too. Perhaps if he sees this he may be able to weigh in Wow, such great memory Tut. The problem with my shader wasn't that I was unabled to get the texture of the spoiler or something like that, my problem was that creating a model that is used by the game as an spoiler or any other upgrade part, and then trying to add a shader that changed their texture would result in the upgrade just looking black. The shader was working because I could change any other object, but not any upgrade. The upgrades where created by createObject() and attached, but even without being attached the shader did not work. I don't recall exactly what was the issue tho (ig because i couldnt fix it). These are the discord messages I sent a while back: https://discord.com/channels/278474088903606273/278520948347502592/627289056317014046 https://discord.com/channels/278474088903606273/592477067766136833/725228749997473842 TL;DR: Sadly I don't think this is related to my problem, it's probably an error with trying to get textures as Dutchman commented. Edited January 4, 2021 by Platin - xNikoXD Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now