Jump to content

Is it possible to have a camera screen be a texture?


MisterGravity
 Share

Recommended Posts

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..

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Link to comment
Share on other sites

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.

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

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?

Link to comment
Share on other sites

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.

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

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.

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

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.

Link to comment
Share on other sites

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

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Link to comment
Share on other sites

 

 

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.

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...