DRW Posted August 13, 2021 Share Posted August 13, 2021 Hi everyone, After replacing some original models, we found these are not double-sided, which is something we need. Is there any way to retrieve world models and double-side them? I can only see restoreWorldModel and removeWorldModel exist, and I can't find a way to get all world models using getElementsByType or others. Thank you in advance. Link to comment
Administrators Tut Posted August 13, 2021 Administrators Share Posted August 13, 2021 Unless you need to enable doublesided across hundreds of models, I would probably just do some basic scripting using setElementDoubleSided function Link to comment
DRW Posted August 13, 2021 Author Share Posted August 13, 2021 (edited) But I suppose "WorldModels" are not "Objects", also I don't see any function that retrieves WorldModels, so how can I specify I want an original building double-sided if it's not an element per se? 16 minutes ago, Tut said: Unless you need to enable doublesided across hundreds of models, I would probably just do some basic scripting using setElementDoubleSided function EDIT: We can set them double-sided in 3ds max, we noticed. Still if there's something I didn't notice and these world models are actually possible to double-side please tell me! Edited August 13, 2021 by DRW Link to comment
Administrators Tut Posted August 13, 2021 Administrators Share Posted August 13, 2021 Objects mapped using createObject are world objects and doublesided option can then be enabled when defined as an Element. It's true that you can work around backface culling by duplicating and flipping polygons in the 3D model, however bear in mind this will add more file size. Unfortunately I'm not a scripter but hopefully someone will tune in and get you a better response soon. 1 Link to comment
The_GTA Posted August 13, 2021 Share Posted August 13, 2021 34 minutes ago, DRW said: EDIT: We can set them double-sided in 3ds max, we noticed. Still if there's something I didn't notice and these world models are actually possible to double-side please tell me! As Tut has suggested, setting them double-sided in 3DS Max can only result in two outcomes: the triangles are doubled, each one for each facing side, causing a massive increase in filesize the function does nothing at all because there it fails to set a backface culling option that does not exist within RenderWare model data Inside RenderWare the culling mode is defined as "render state" thus GTA SA has these settings defined within its own map files. Unfortunately MTA does not provide functions to modify rendering properties of original map objects. Feel free to suggest such a feature on the official MTA GitHub if you really need it. MTA would not be MTA if there'd not be a workaround, though. Did you know that you can modify DX9 render states using FX shaders? Consider the dxCreateShader and engineApplyShaderToWorldTexture functions. I find this a very strange work-around though and you might be better off requesting direct access to map rendering properties instead. Link to comment
DiSaMe Posted August 13, 2021 Share Posted August 13, 2021 (edited) You can't control "WorldModel" as element, but you can remove it and create an object in its place using createObject. Such solution looks clean enough to me, although a little more than that may be needed if there are low detail objects involved. Edited August 13, 2021 by CrystalMV Link to comment
DRW Posted August 13, 2021 Author Share Posted August 13, 2021 20 minutes ago, The_GTA said: As Tut has suggested, setting them double-sided in 3DS Max can only result in two outcomes: the triangles are doubled, each one for each facing side, causing a massive increase in filesize the function does nothing at all because there it fails to set a backface culling option that does not exist within RenderWare model data Inside RenderWare the culling mode is defined as "render state" thus GTA SA has these settings defined within its own map files. Unfortunately MTA does not provide functions to modify rendering properties of original map objects. Feel free to suggest such a feature on the official MTA GitHub if you really need it. MTA would not be MTA if there'd not be a workaround, though. Did you know that you can modify DX9 render states using FX shaders? Consider the dxCreateShader and engineApplyShaderToWorldTexture functions. I find this a very strange work-around though and you might be better off requesting direct access to map rendering properties instead. This guy knows! This is very useful, I will suggest it, thank you. For now, I might have to fight the constant fear of learning HLSL and try doing that haha 10 minutes ago, CrystalMV said: You can't control "WorldModel" as element, but you can remove it and create an object in its place using createObject. Such solution looks clean enough to me, although a little more than that may be needed if there are low detail objects involved. That’s what I thought too, but didn’t have a very good experience with custom mapping and draw distances, and some “fixes” can affect performance greatly when thinking about scalability. By the way, love your scripts! 2 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