iPanda Posted June 7, 2015 Share Posted June 7, 2015 Hello everyone! I am interested in the question, what I can use to make draw a 3D object image over screen? To use it on top of other 2D DX functions. I know that this is possible in the MTA. Tell me, how do I do this and that I should use? Example screenshot: Link to comment
Moderators IIYAMA Posted June 7, 2015 Moderators Share Posted June 7, 2015 There are 3D dx functions... Link to comment
iPanda Posted June 7, 2015 Author Share Posted June 7, 2015 There are 3D dx functions... How can I get the source texture - 3D object? Link to comment
Moderators IIYAMA Posted June 7, 2015 Moderators Share Posted June 7, 2015 If you understand shader code (.fx), you might be able to do it the hardcore mode. But that will be a lot to learn next to lua. But for now: https://wiki.multitheftauto.com/wiki/Dx ... reenSource Link to comment
iPanda Posted June 7, 2015 Author Share Posted June 7, 2015 If you understand shader code (.fx), you might be able to do it the hardcore mode. But that will be a lot to learn next to lua.But for now: https://wiki.multitheftauto.com/wiki/Dx ... reenSource With Lua I have everything very well. With shaders much worse. And this function will give me another screen texture, it has nothing to do with my purpose. Link to comment
Moderators IIYAMA Posted June 7, 2015 Moderators Share Posted June 7, 2015 Depends, you can render your peds as the image you showed me. A far as I can see, that is what you want to do. Or do you mean something else by 3D object image ? And about what kind of files/formats are you talking about? Link to comment
Ren_712 Posted June 8, 2015 Share Posted June 8, 2015 (edited) You might look at this: https://bugs.mtasa.com/view.php?id=8769 We are talking here about creating texture as render targets in MTA. Haven't had much time lately, but i think this is what You are looking for. Edited July 8, 2015 by Guest Link to comment
Ren_712 Posted July 8, 2015 Share Posted July 8, 2015 Bumping the topic: I have dealt with cameraMatrix lagging when cameraTarget is localPlayer. All the issues regarding scaling, positioning and rotating object are also out of the way. The video doesn't show the object being rendered in a separate RT but that will be an option. Link to comment
t3wz Posted July 8, 2015 Share Posted July 8, 2015 Bumping the topic:I have dealt with cameraMatrix lagging when cameraTarget is localPlayer. All the issues regarding scaling, positioning and rotating object are also out of the way. The video doesn't show the object being rendered in a separate RT but that will be an option. Can you tell me how you did it pls ? Link to comment
Ren_712 Posted July 9, 2015 Share Posted July 9, 2015 Can you tell me how you did it pls ? Get 4x4 matrix of the camera, multiply by rotation matrix, change the position offsets, apply to the vehicle. Then send camera position, forward vector, and roll to shader so we could recreate camera matrix (needed for fixing the "camera lag" i mentioned before). Then there is a matter of recreating the projection matrix - to make it easy to scale the object. And ofcourse making the vehicle render in front of everything else. Then we need to recreate a gtasa vehicle effect (shader). Lighting should not be affected by vehicle position and rotation. Done effects for peds and objects as well. Still got some issues with volumetric shadows. But i guess it can't be helped. Link to comment
iAxel Posted July 9, 2015 Share Posted July 9, 2015 What about video memory ie mean that the resource is demanding more powerful PC Link to comment
Ren_712 Posted July 9, 2015 Share Posted July 9, 2015 What about video memory ie mean that the resource is demanding more powerful PC It requires as much resources as if the object was rendered normally. Link to comment
iAxel Posted July 9, 2015 Share Posted July 9, 2015 A player's real-time display can be? example that it clothed, etc. And I can download your resource? the resource is not working Link to comment
Ren_712 Posted July 9, 2015 Share Posted July 9, 2015 A player's real-time display can be?example that it clothed, etc. And I can download your resource? the resource is not working Works for every camera condition. Renders properly with current FOV setings. Will support every static world object, vehicle and ped elements. The resource is still WIP. So no download yet. Link to comment
Ren_712 Posted July 29, 2015 Share Posted July 29, 2015 and it's done: https://community.multitheftauto.com/ind ... s&id=11836 Link to comment
darhal Posted July 30, 2015 Share Posted July 30, 2015 You are doing great job with shaders keep it up Link to comment
iPanda Posted September 14, 2015 Author Share Posted September 14, 2015 How can I make sure that the source createObjectPreview draw on the screen on top of all the elements of DX? Parameter postGUI=true does not help. Link to comment
darhal Posted September 14, 2015 Share Posted September 14, 2015 make sure you mut MRT argument true and yeah those players who have older ggraphic cards will not work for them I face the same problem Link to comment
iPanda Posted September 14, 2015 Author Share Posted September 14, 2015 make sure you mut MRT argument true and yeah those players who have older ggraphic cards will not work for them I face the same problem I do not quite understand what I need to do. Link to comment
Einheit-101 Posted September 14, 2015 Share Posted September 14, 2015 Don't try to Use MRT, 90% will have problems with their ancient pc's. 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