shadmar Posted January 16, 2014 Share Posted January 16, 2014 Probably not. Unless you render them in sequence. Entity scripts are not executed in sequence. Yor first script might have moved the camera from the position set in the second script and vice versa. Or updated the shader with the buffer from the first.. or second.. Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
MisterGravity Posted January 16, 2014 Author Share Posted January 16, 2014 Probably not. Unless you render them in sequence. Entity scripts are not executed in sequence. Yor first script might have moved the camera from the position set in the second script and vice versa. Or updated the shader with the buffer from the first.. or second.. Another option would be to create multiple scripts of the same type, right? Literally have SecurityCamera1.lua, SecurityCamera2.lua, etc., 1 each with identical code for each camera? EDIT: Scratch that idea, that didn't work at all. Same result. Quote I'm sure I'll have a million questions in my quest to master the Leadwerks Engine. Thank you for your patience. Link to comment Share on other sites More sharing options...
Rick Posted January 16, 2014 Share Posted January 16, 2014 If they are pointing to different materials I would think this would work. It shouldn't matter what order each script runs because when it does run it moves to pivot 1, takes a snapshot, paints to material 1, then moves back. Then when the next one runs it does the same thing but to that pivot's location and that material. The snapshot is what you're after and assigning to the material right? Shadmar, are you creating a new buffer in each script? If not can you do that? Quote Link to comment Share on other sites More sharing options...
MisterGravity Posted January 16, 2014 Author Share Posted January 16, 2014 If they are pointing to different materials I would think this would work. It shouldn't matter what order each script runs because when it does run it moves to pivot 1, takes a snapshot, paints to material 1, then moves back. Then when the next one runs it does the same thing but to that pivot's location and that material. The snapshot is what you're after and assigning to the material right? Yeah, I have laid out exactly like the pic above. It should do exactly what you've explained, but it amazingly paints the same pivot to both textures. Quote I'm sure I'll have a million questions in my quest to master the Leadwerks Engine. Thank you for your patience. Link to comment Share on other sites More sharing options...
shadmar Posted January 16, 2014 Share Posted January 16, 2014 @rick yes, buffers are created in the script:start() Try copying the shader to a different name and assign the copy to the second material, that might work (sounds stupid, but what the hell, just try) Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
MisterGravity Posted January 16, 2014 Author Share Posted January 16, 2014 Try copying the shader to a different name and assign the copy to the second material, that might work (sounds stupid, but what the hell, just try) Can you explain that a little differently? I haven't messed with shaders much yet. Quote I'm sure I'll have a million questions in my quest to master the Leadwerks Engine. Thank you for your patience. Link to comment Share on other sites More sharing options...
Rick Posted January 16, 2014 Share Posted January 16, 2014 So if each script has it's own buffer, and each script has it's own pivot, and each script has it's own material then I can't see why this wouldn't work if you had it in your scene 100 different times. Yes we can't define the order scripts run, but they do run in a sequence (not ordered) so if everything used in this script is unique then I can't see why it wouldn't work. I can give it a try when I get back to my hotel tonight. Quote Link to comment Share on other sites More sharing options...
shadmar Posted January 16, 2014 Share Posted January 16, 2014 Can you explain that a little differently? I haven't messed with shaders much yet. it's abit of a long shot but : 1. Navigate to Shaders/Model/ 2. Copy diffuse.shader and call it diffuse2.shader 3. Navigate to Materials/Effects/ 4. Edit securitymonitortex2.mat to have diffuse2.shader. run Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
MisterGravity Posted January 16, 2014 Author Share Posted January 16, 2014 it's abit of a long shot but : 1. Navigate to Shaders/Model/ 2. Copy diffuse.shader and call it diffuse2.shader 3. Navigate to Materials/Effects/ 4. Edit securitymonitortex2.mat to have diffuse2.shader. run I appreciate the easy to follow instructions. I did that, but it did not change anything. Quote I'm sure I'll have a million questions in my quest to master the Leadwerks Engine. Thank you for your patience. 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.