Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: Drago991 on 2024-03-26, 19:30:01

Title: Render multiples camera matching
Post by: Drago991 on 2024-03-26, 19:30:01
Hi everyone!
I would like to render more photomatching in the same scene where there are several cameras, but I don't know if it's possible since I don't understand if I should change the background photo for each camera.

The same question applies if I simply wanted to make different renders in the same scene (for example of an apartment) do I have to create a room for each view or is there a sort of saving of an animation frame by frame?

thank you very much to anyone who can help me!
Title: Re: Render multiples camera matching
Post by: mferster on 2024-03-26, 21:23:29
Not sure what exactly you are asking.

Are you looking to render new elements and composite them on top of an existing photo?

Or are you trying to recreate a view from a photo with an already built 3D scene so the photo and renders are used as a means of comparison?

If you are trying to do the former, then yes each background will be specific to the camera and you cant move/animate it other than zoom ins.

While with the latter, if you make a fully realized 3D scene you can animate it however you want.

Still not sure what you are looking for though.
Title: Re: Render multiples camera matching
Post by: Avi on 2024-04-03, 13:57:00
Can you please share some screenshots and more information about your project so we can better understand your question?
Title: Re: Render multiples camera matching
Post by: Drago991 on 2024-04-19, 12:05:09
I'm trying to insert a different background image for each camera to do different photomatching in the same scene, but I don't understand how
Title: Re: Render multiples camera matching
Post by: dzintas on 2024-04-19, 13:14:19
You can load different background images into separate viewports.
If you need to render with background, then you need to change direct visibility override everytime you switch cameras.
But you can have multiple cameras. Creating new ones won't break anything.
Title: Re: Render multiples camera matching
Post by: Frood on 2024-04-19, 14:02:30
Hi,

I'm trying to insert a different background image for each camera to do different photomatching in the same scene, but I don't understand how

you cannot set a different background for each camera, except when using any "xyz manager" out there, but you can do this (and much more) for different frames of the timeline:

Name your background images "bg_00.jpg", "bg_01.jpg" and so on, then create an IFL ("Image File List") sequence by selecting "Load as sequence" when choosing the file "bg_00.jpg" as bitmap for a standard max bitmap (Corona bitmap is not able to create or use IFL sequences).

This creates a file named Edit: "bg_01.ifl" "bg_00.ifl" which is a simple text file containing the names of all background bitmaps and is used as movie file by the bitmap node with one image per frame in the timeline. At frame 0 you will get bg_00.jpg, at frame 1 you'd have bg_01.jpg and so on by default.

Then animate your camera (and its settings) to match in every frame. You can use your already created cameras to align the animated one to them at every frame, having the Auto Key button activated. Or just choose the correct camera for the current background image to render if you do not want to animate it. I'm doing this since decades with the exception that I usually take 5 frames for one background/shot to have enough space for motion blur if required.

Alternatively you could use a corona select map instead of an IFL sequence and animate/change the selected map. You will not be able to feed the viewport background with it unless you use it as environment map though.

Attaching an (low version, Max2021, Corona v9 since I do not know what versions you are on) example scene. Start IR and scrub to frames 0 to 6 to see what's happening. Background images are piped through CoronaTonemapControl, the viewport uses the IFL sequence directly with "Animate Background" enabled.


Good Luck



Title: Re: Render multiples camera matching
Post by: piotrus3333 on 2024-04-19, 16:06:35
3dsMax State Sets?
Title: Re: Render multiples camera matching
Post by: Aram Avetisyan on 2024-04-20, 21:27:35
Just letting you guys know that CoronaCamera environment overrides are in progress and this should be easy to do in future :)

In the meantime, there may be different workarounds with 3ds Max Scene and State sets.
Title: Re: Render multiples camera matching
Post by: Frood on 2024-04-23, 17:19:28
CoronaCamera environment overrides are in progress and this should be easy to do in future :)

This alone will not. In almost every camera matching scene, you additionally need at least one shadow catcher material using the current background image for matte objects. This cannot be covered by a camera environment override. Additionally, think of camera matched/tracked animation.

In the meantime, there may be different workarounds with 3ds Max Scene and State sets.

Either I have/had crashes (yes, with CoronaCamera parameter block queries in the call stack of the crashing thread) or had them stop working midst project doing weird stuff. Additionally rendering out multiple shots in one go is not possible without making things complicated. So I humbly returned to the workflow described above after each try :)


Good Luck


Title: Re: Render multiples camera matching
Post by: Aram Avetisyan on 2024-04-24, 00:47:51
That can be a good idea to have "Active camera overrides" checkbox for shadowcatcher, then it should work fine (besides the currently available option to animate it with maps).
I'll see how/if this can be implemented.

Depending on the exact thing needed, if there is animation, if there is changing environment and lighting, Scene states worked pretty robustly.
Yes, they are not the best when setting up and UI/UX wise, but they reliably work with batch rendering, which is one of the most important things for rendering animation.
Title: Re: Render multiples camera matching
Post by: Frood on 2024-04-24, 12:43:36
That can be a good idea to have "Active camera overrides" checkbox for shadowcatcher, then it should work fine

Yes it would in this case, but there are others. If you think the above is technically possible, then a way to implement it more generally would be a (new) CameraEnvOverride map node where you just can pipe in conveniently any map into all four Corona environment slots. You would reference the corresponding camera into that node (like e.g. CoronaDistanceTexmap does) or activate a checkbox "Select camera automatically" to use the render camera - whichever it is. In this case (automatically) we would need outputs for all slots as well, one of them (presumably direct visibility override) could go to the standard max environment to drive the viewport background (option "Use Environment Background").

Sounds appealing to me at first. But I bet the obvious and straight way has been already taken: referenced maps in the Camera node. So it will work the other way round.

Even then, a generally usable CameraEnvOverride map node (now simpler), where you can get access to the active overrides is imho better than having some checkbox in a single, special material (here:CoronaShadowCatcherMtl). The output could still be used for other maps/materials (not only shadow catcher) or setting the viewport background. The hypothetical CameraEnvOverride node would need to update itself permanently to follow the overrides of the active Camera, or fallback to (Corona) scene settings if the Camera has no overrides or the view is no CoronaCamera view.
 
All in all it still does not solve some standard situations you usually have. For example, in case of Sun+Sky: how should it be handled if you have to set different time/intensity settings? You'd have to fallback to animation or 3dsMax states again.

Just a few thoughts about that idea, let's see :)


Good Luck



Title: Re: Render multiples camera matching
Post by: Aram Avetisyan on 2024-04-24, 23:38:08
Yes, all of these are actually states/versions of the scene inside one file, simple Camera environment override will not cover all cases.

I am sure if states in 3ds Max were a bit more user friendly, no per-render-engine override and workarounds would be needed.
Title: Re: Render multiples camera matching
Post by: Drago991 on 2024-04-30, 10:35:21
okok many thanks!