Forum Groups
  All forums
    Help & Feedback
      Questions
      Work in progress
      Finished Art
      Non-Max related
    Community
      Offtopic
      News
    Hardware
    Photography



Maxunderground news unavailable

 
First page  Go to the previous page   [01]  [02]  Go to the next page  Last page
 
Renderception
show user profile  Mr_Stabby
Lets say i have a camera and a tv model in my scene. I want the TV to actually display what the camera model would be seering.. so in essence a render within a render, renderception!

Now i could just render out what the camera sees and apply it as texture to the tv screen but I'll be having like a dozen of these and its an animation and its going to take a lot of tweaking... I'd rather have an easy method for doing this, does anybody know of an automated feature for that? Or something like the portal game portal does? Some script or plugin?

read 665 times
4/10/2014 5:34:25 AM (last edit: 4/10/2014 5:34:25 AM)
show user profile  Nik Clark
There is no way to do this in one render pass.
Can the camera see the TV? If so you will have to do the render a few times or it will look odd.

It could be scripted, of course, but would still require a number of renders for each frame.



read 631 times
4/10/2014 9:49:43 AM (last edit: 4/10/2014 9:49:43 AM)
show user profile  mike_renouf
I've seen it done in game engines, but I don't suppose that helps.




read 627 times
4/10/2014 9:56:42 AM (last edit: 4/10/2014 9:56:42 AM)
show user profile  Mr.Burns
Your only chance would probably be some fancy-ass custom shader. In DirectX and OpenGL you can render to the framebuffer and use that as a texture on the fly.
read 610 times
4/10/2014 12:27:01 PM (last edit: 4/10/2014 12:27:01 PM)
show user profile  Mr.Burns
Where's AS when you need him?
read 610 times
4/10/2014 12:27:05 PM (last edit: 4/10/2014 12:28:14 PM)
show user profile  herfst1
Fuck that...


read 605 times
4/10/2014 12:35:14 PM (last edit: 4/10/2014 12:35:14 PM)
show user profile  Mr.Burns
If it's not that urgent I'll give it a shot tomorrow. Shouldn't be that complicated to write a script that'll render a number of frames, then render them again and apply the previously rendered frames as a diffuse map to a material.
read 565 times
4/10/2014 11:13:26 PM (last edit: 4/10/2014 11:13:26 PM)
show user profile  Dave
Edit
Skip to 1:35 for a little fun.




"I flew over Egypt once"

read 563 times
4/10/2014 11:16:24 PM (last edit: 4/10/2014 11:17:16 PM)
show user profile  Mr_Stabby
lol xD

read 541 times
4/11/2014 3:03:20 AM (last edit: 4/11/2014 3:03:20 AM)
show user profile  Mr.Burns
Here's a quick and dirty solution. This is assuming that all your TVs have the first material in the materialeditor applied to them, that it is a multi/sub map and that it's the first material in there. You wil probably have to change that line, especially if you're not using Scanline (as I said, quick and dirty...).
This script will render your scene [Iteration] times as setup in the render setup dialog, which must be closed for the script to work. In order to save render time the output size will get smaller for every iteration, as you'd be seeing less and less detail anyway.
I suggest you first try it with a simple scene...

---

FinalWidth = RenderWidth
FinalHeight = RenderHeight
OutputFile = RendOutputFilename

PassDir = (GetFilenamePath OutputFile) + "Passes\\"
MakeDir PassDir

Iterations = 2

for i = 1 to Iterations do
(
PassWidth = FinalWidth
PassHeight = FinalHeight

for j = 1 to (Iterations - (i - 1)) do
(
PassWidth *= 0.5
PassHeight *= 0.5
)

PassWidth = PassWidth as Integer
PassHeight = PassHeight as Integer

for j = RendStart to RendEnd do
(
if i > 1 then
(
DiffuseFile = "Pass" + ((i - 1) as String) + "_" + (j as String) + (GetFilenameType OutputFile)
MEditMaterials[1][1].DiffuseMap = BitmapTexture Filename:(PassDir + DiffuseFile)
)
else
MEditMaterials[1][1].DiffuseMap = undefined

PassFile = "Pass" + (i as String) + "_" + (j as String) + (GetFilenameType OutputFile)
PassOutput = PassDir + PassFile

Render Frame:j OutputWidth:PassWidth OutputHeight:PassHeight OutputFile:PassOutput
)
)

for i = RendStart to RendEnd do
(
DiffuseFile = "Pass" + (Iterations as String) + "_" + (i as String) + (GetFilenameType OutputFile)
MEditMaterials[1][1].DiffuseMap = BitmapTexture Filename:(PassDir + DiffuseFile)

FinalFile = (GetFilenameFile OutputFile) + "_" + (i as String) + (GetFilenameType OutputFile)
FinalOutput = (GetFilenamePath OutputFile) + FinalFile

Render Frame:i OutputWidth:FinalWidth OutputHeight:FinalHeight OutputFile:FinalOutput
)

read 521 times
4/11/2014 10:43:55 AM (last edit: 4/12/2014 10:09:50 AM)
show user profile  Pil
Could you not just have the TV to display the previous rendered frame?

So it will always be a single frame behind.
I dont think you would see the difference...

Would it be a big deal to just do it all in post?

Render out the TV screens with a green self illuminating texture.

read 511 times
4/11/2014 11:05:42 AM (last edit: 4/11/2014 11:05:42 AM)
show user profile  digital3ds
do it in post...

the only way i see this working how you want is to have the gpu rtt in real time, which I dont think max can do? post = fast and easy
- Mike Sawicki




read 505 times
4/11/2014 11:36:17 AM (last edit: 4/11/2014 11:42:59 AM)
show user profile  Mr_Stabby
thanks Mr Burns that'll get me started.

>>Could you not just have the TV to display the previous rendered frame?
>>do it in post...

I think you're missing a detail, the screens don't show the frames that go into the actual clip but rather what other cameras see in the same scene, different angles and stuff. doing it in post would be madness.

read 467 times
4/12/2014 4:25:44 AM (last edit: 4/12/2014 4:25:44 AM)
show user profile  Garp
If I understand correctly, you want (in pseudo-code)

for frame in animation
img = render(camera2)
monitor.texture = img
render(camera1)




read 458 times
4/12/2014 8:20:41 AM (last edit: 4/12/2014 8:20:41 AM)
show user profile  Mr_Stabby
pretty much yes

read 452 times
4/12/2014 9:48:20 AM (last edit: 4/12/2014 9:48:20 AM)
 
First page  Go to the previous page   [01]  [02]  Go to the next page  Last page
 
#Maxforums IRC
Open chat window


Support Maxforums.org