dugasz1 Posted August 27, 2016 Share Posted August 27, 2016 Hello! I was on that NFS:SA server. (How don't know they wrote a Need for Speed mod with visual tuning included. So, you can paint things on the car.) I need something similar but how can i do it? I guess i will need a model's texture file and another png file mix it (with dx i guess) but as far as i see the only solution to change only one model's texture it's engineApplyShaderToWorldTexture but it need a shader for it and i know nothing about shadders. Can someone tell me some advices/idea how can i do it or link/write an example for me(i tried to find an example but i couldn't find)? Link to comment
Ab-47 Posted August 27, 2016 Share Posted August 27, 2016 A thread on CIT forums has just what you need. https://cit2.net/index.php?topic=130604.0 Link to comment
dugasz1 Posted August 27, 2016 Author Share Posted August 27, 2016 As far as i see there is nothing about how they do the script just for the player's a tutorial how to make his own paitnjob but they test it with engineImportTXD. Link to comment
dugasz1 Posted October 7, 2016 Author Share Posted October 7, 2016 UP Someone? An example would be great. Link to comment
Dealman Posted October 7, 2016 Share Posted October 7, 2016 (edited) You'll have to use shaders. I'm quite curious about making something like this myself as I'm working on my server again. I don't think there's too many around this forum that know how to work with HLSL shaders, I've tried some in the past but I think I'd have better success with rocket science. But to name a few you have @Ren_712 and @Sam@ke. Ren has helped me a fair bit in the past, so if you contact him(or he sees this) he might be able to offer some more input as to how it works. Meanwhile, I'd suggest you do some research about how HLSL shaders work - look up some simple examples and play around with them. Edited October 7, 2016 by Dealman 1 Link to comment
dugasz1 Posted October 7, 2016 Author Share Posted October 7, 2016 Thank you. Finnally someone If you want i can contact you if i succeed. Maybe i could then help with your stuff too. Link to comment
Dealman Posted October 7, 2016 Share Posted October 7, 2016 I already know how to apply a decal to a car, what I don't know is how to dynamically change its relative position, scale and rotation. We need to use dxSetShaderValue for this. It's the actual shader scripting I don't quite know how it works - I'm trying to do some research at the moment - but I'm tired so we'll see. Link to comment
dugasz1 Posted October 7, 2016 Author Share Posted October 7, 2016 Oh then i said nothing Link to comment
Dealman Posted October 7, 2016 Share Posted October 7, 2016 (edited) Little did I know the shaders page actually had an example of exactly what you need. The one you should be taking a look at it is called "UV Scripted". I went ahead and threw together a small example for you. You can download it here. Do bare in mind that this is very basic and is merely to give you an idea as to how it would work. Usage is simple, start the resource, get in a car and type /apply. Use F3 to toggle cursor on/off. I will be playing around with this later myself once I've had some sleep, I'll have to figure out how to disable the tiling and that stuff. Edit: Good lord is this website being slow today or what D: Edited October 7, 2016 by Dealman 1 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