Jump to content

render texture in IVA?


Recommended Posts

So I followed this: http://unity.grogansoft.com/in-game-security-camera-using-render-texture/

And it worked as advertised IN UNITY.  But when I try to load it in KSP it doesn't work.  Further, the game posts errors to the log saying that it can't find the transforms for the kerbals, and the camera switches.  (I have a collider in each window where you click it and your IVA view becomes looking out the windows, just like some stock IVAs)

The one obvious deviation from the above linked tutorial is that I use "ksp/diffuse" as the shader rather then "mobile/diffuse".

The troubles go away if I remove the plane with the render texture, but leave the camera.  If I remove the camera and leave the plane and render texture it breaks again.

So, is this a hierarchy/layer issue or is this simply not going to work in KSP?

Link to comment
Share on other sites

May I suggest you post those question in the "plugin development help and support" subsection because this one is high traffic and it is easy to miss post. I saw this one just today by pure chance.

I can't read that blog at work so I ll try to remember about this tonight and see if I can help.

Link to comment
Share on other sites

I took an IVA model I had made and opened it in unity, the same unity file I had used before to successfully export a normal IVA for KSP.

I added a Camera

I added a plane

I created a render texture

I created a material using the render texture and applied that material to the plane

At this point, in unity, anything I place before the camera can be seen on the plane -so the plane is like a CCTV Screen.

When I export it, it doesn't work.  In addition to it not working the log file reports that the 2 transforms for spawning the Kerbals can't be found and the 2 transforms used for camera switching inside the IVA (Click the window, view changes to "looking out the window") also can't be found.

If I remove the plane and reexport the IVA, it works again.  I have another plane with a regular diffuse texture applied, so I think I can state it's not the plane it's self.  The camera is still in the scene, so it's not that.  I can only conclude it's the render texture that breaking things.

The shader I'm using is KSP/diffuse

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

×
×
  • Create New...