mdgunn Posted April 12, 2017 Share Posted April 12, 2017 EDIT(My post title a bit mis-leading - not sure I can edit - I'm really trying to set things in the editor with minimal code, so setting a camera 'Render Target' not setting this in code). I was fairly sure I'd had this working before but I can't remember if there was anything special I did to do it.... I want to render to a texture like someone did here... Here is my non-working version... QUESTION: If you are setting the 'Render Target' on a camera in the EDITOR what else do you actually need to do to get the image appearing on a brush/model? I thought setting render target in the editor to a texture and setting that texture on a brush might be enough (though I suspected it would not be that simple too). I've seen the security cam scripts but it seems like these are doing some of the work that setting the Render Target of a cam in the editor is probably doing (i.e. rendering the texture for you). My texture stays black. I am using the standard FPS controller (which creates its own camera) and another camera set so I can set the position and the Render Target. Is this maybe the problem where maybe 2 cameras are active at once? Was thinking setting 'Render Target' on a camera handled any switching of cameras as it needed when running. Any ideas what I need to do to get this working? Quote Link to comment Share on other sites More sharing options...
shadmar Posted April 12, 2017 Share Posted April 12, 2017 assign rendertarget texture to a material and apply material to the monitor/brush/model Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Jazz Posted April 12, 2017 Share Posted April 12, 2017 Been a while since I used it but I believe you just have to set the monitor's material to use the same texture you set for the camera, which would probably be monitor.mat. edit: Just tested. I set a csg to greengrid.mat and the camera's render texture to greengrid.tex. This is looking at it with the FPS player. Quote --- Scott Using Windows 7 Ultimate 64 bit/Core I7-2700K @ 4312mhz/24G RAM/Nvidia GTX 1060 Link to comment Share on other sites More sharing options...
mdgunn Posted April 13, 2017 Author Share Posted April 13, 2017 Sounds like I'm doing the same thing. I'm on a laptop with integrated Intel graphics, which is very usable with LeadWerks for simple stuff, but I think this rendering to a material from a camera may not work. I can't test this on my desktop for a few more days but I suspect it will work when I retest there. Thanks for the feedback. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.