Jump to content

render 3D objects in window (dx)


JeViCo

Recommended Posts

Posted

try to use createStaticImage (here put the size and the Cordi...lile ( 80,20,25,25) ," Name of image .png" ) --------------------------------then the Image will be showing  in your Window

RPG/CnR servers Developer , You want help ? contact me on discord >>>lilDawage#8508<<< i'm at your Service 10/24 hours 7/7 days , >>>Welcome<<<

Asking Discord Channel JOIN US ON here , you are welcome 10/24 active

Posted (edited)
17 minutes ago, LilDawage said:

try to use createStaticImage (here put the size and the Cordi...lile ( 80,20,25,25) ," Name of image .png" ) --------------------------------then the Image will be showing  in your Window

i don't want to take picture of each vehicle :ph34r:. I'm going to make little dxCreateScreenSource (image) of this vehicle and i need some sort of advice for this action

--- i haven't done it before

Edited by Juuve
Posted (edited)
11 hours ago, Juuve said:

Thank you and @Ren_712 for this script. I was looking for it but

screenshot_1.jpg

This is a shader or vehicle problem? I can simply draw something on back to hide holes but can i fix it somehow?

The window/lights need to be placed below the rest of the car in the hierarchy treeview of a modeling program maybe.
Add me to Skype.

Edited by JustinMTA

I can do 3D vehicle/object mods and basic scripts from scratch, contact me for free help!!
Skype/Discord/Telegram: [email protected] / Justin|X5|#0977 / @JustinX5
Xtreme 5 Gaming - COMING SOON!

I'd love it if more people in MTA utilized these amazing features, so please ask me anything related to 3D modeling/basic scripting/etc.
The expert knows more and more about less and less until they know everything about nothing.

Posted
14 hours ago, Juuve said:

Thank you and @Ren_712 for this script. I was looking for it but

This is a shader or vehicle problem? I can simply draw something on back to hide holes but can i fix it somehow?

@Juuve It's not really a vehicle problem, that's how the alpha channel is handled in this effect. I'd have to rewrite it ...
If you don't want draw the vehicle post gui use this: https://www.solidfiles.com/v/mdy5QRqrMraZ2 or use non mrt variant instead

  • Thanks 1

I make shaders .. mainly. My community resources

I'll do some custom stuff, I'm open for cooperation.

Posted (edited)
7 hours ago, Ren_712 said:

@Juuve It's not really a vehicle problem, that's how the alpha channel is handled in this effect. I'd have to rewrite it ...
If you don't want draw the vehicle post gui use this: https://www.solidfiles.com/v/mdy5QRqrMraZ2 or use non mrt variant instead

Thank you! Using non mrt shader solved my problem xD

But now i can't place any image on the background. I used dxDrawImage.

Mta_game_proccess.png

As the game ordering says i should use onClientPreRender to draw the image (before fx) but it becomes invisible then. I can also create an object, draw an image on it and set player's camera position facing toward the object. But i don't think that this is a good idea\ :ph34r:

p.s. PostGUI and second render target options don't work with this shader for some reason

Edited by Juuve
Posted (edited)

the nonMRT effect transforms view and projection matrix to render the resized object/vehicle/ped close to the near clipping plane. So the vehicle is drawn on the screen when "GTA draws world'. the MRT effect draws the vehicle to a renderTarget that can be drawn dxDrawImage (onClientRender).

Example: https://nightly.multitheftauto.com/files/shaders/shader_multi_rt_test.zip

Edited by Ren_712
  • Like 2

I make shaders .. mainly. My community resources

I'll do some custom stuff, I'm open for cooperation.

Posted
16 hours ago, Ren_712 said:

the nonMRT effect transforms view and projection matrix to render the resized object/vehicle/ped close to the near clipping plane. So the vehicle is drawn on the screen when "GTA draws world'. the MRT effect draws the vehicle to a renderTarget that can be drawn dxDrawImage (onClientRender).

Example: https://nightly.multitheftauto.com/files/shaders/shader_multi_rt_test.zip

ok, i understand it now. Thank you!

  • 3 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...