Hi, I’m trying to create a Gaussian Splat model from CGI rendered images.
In my test I render about 200 images at various positions and viewing directions.
I also generate an XMP for each image containing the focal length, the position and rotation matrix.
Now I run RealityCapture by CLI command to align the image.
It is basically the workflow demonstrated here, just not using blender.
This generates a CSV with the camera positions and a PLY point cloud model.
Problem is that the CSV only contains 12 cameras instead of the 200 it was supplied with.
Dragging the folder into Postshot i can’t see the exact cameras as shown in that video,
but only a few and the training output isn’t usable at all.
Does anybody maybe have an idea why RealityCapture doesn’t take all given cameras into account?
Hi @indexrefraction1
There is no big visibility of RealityCapture in your tutorial.
Is it possible that you’ve got more components after the alignment or that you have had selected some images before exporting the CSV?
What were you alignment settings and then export settings?
hm its hard to even find the right questions about this …
the video shows a workflow starting with blender and i try to recreate this using cinema4d:
render images
create XMPs for all frames/cameras (from within blender or now cinema4d)
run RealityCapture using a batch script (attached below)
to align the images and store a camera csv and sparse model ply
run Postshot on the folder to train a gaussian splat model.
i suspect that RealityCapture does either not use the XMPs at all
or that there is some other reason that not all cameras are used.
is there a way to force RealityCapture to use/keep all provided images/XMPs ?
or is RealityCapture always making a selection?
are there reasons XMPs could be ignored?
@OndrejTrhan:
RealityCapture is just run by the script below, I’m not doing anything from within the app. When i reopen the project file i see that some components were created.
The model is a train interior with a lot of resembling images. so using all images with their XMP information is vital.
for testing i use low res (2400x1600px) renderings that are a bit noisy
the cameras are evenly spread around the wagon, similar to the video.
Hi,
are you sure that the XMPs are created properly? Also, in your case, are the saved as draft, exact or locked? When you import the image folder with XMP to RealityCapture, what do you see as a prior pose?
You also wrote, that you see some components in RealityCapture. It looks to me, that only the first component with 12 images was exported.
attached is is a sample XMP
the only thing set is the FocalLength35mm, Rotation, Position and DistortionCoeficients,
the rest is static and the same for all images/cameras
begin=“” contains the bytes 0xfeff, where the id=“…” is coming from is unknown,
i just took the same code for this as in the video.
even if the coordinate system would be different between the apps,
the cams/model should generate (with a wrong orientation maybe),
so i guess that is not the problem.
attached a screenshot after reopening the project saved by the script.
there are multiple components but a lot of cams have been ditched.
could it be a problem of the cameras?
i’m using about 15-20 icosaeders (diameter ~60cm)
with 12 cams each facing inwards.
I’ve checked your XMP on my image and it worked.
What I noticed, you are using PosePrior set as “initial”. What you can try is set it to “locked”.
Also, the problem with the cameras could be in a wrong overlap.
Are you able to align those images without the XMP usage?
And as your images are georeferenced in local system, you can use the setting Merge georeferenced components. You can find it in the Advanced Alignment settings.
Are you able to align those images without the XMP usage?
no, but i expected that, because in train interiors a lot of images are resembling,
with that cgi precision they can be even identical for some compartments.
What I noticed, you are using PosePrior set as “initial”. What you can try is set it to “locked”.
ok wow, i used xcr:PosePrior=“locked” and cr:CalibrationPrior=“locked” as well,
and now all the cameras are there! thanks a lot for this!
And as your images are georeferenced in local system, you can use the setting Merge georeferenced components. You can find it in the Advanced Alignment settings.
is it possible to set that by script as well?
but maybe its not needed anymore now, anyway
i’ll need to check now… the positions seem ok now,
but the orientation of the cameras is off
so there is some coordinate system translate issue as well.
is there any place the RealityCapture coordinate system is documented ?
Is that … Right Hand … Z-up, +Y forward ?
and the units are meters in RC, right?
thanks for helping me with this.
after some days i finally found the correct translation from c4d to reality capture.
but if i may ask a follow up question :
i’m now able to do the same as shown in the video above
but my splat model quality is quite bad.
i m testing on a train car interior. i’m using a dodecaeder globe with 12 sides and one camera pointing in the (inwards) face normal. the diameter is about 40-50cm and i put one of these every 90cm along the aisle.
i rendered with 2.4x1.6k in low quality which is a bit noisy.
without experience its is hard to judge what is the main reason for the bad result i get in postshot.
but already in reality capture i notice that the generated ply looks very randomly, i’m getting a blob of points and nothing showing the train wagons interior geometry.
so… is there a way to increase the sparse point clouds quality by settings?
or is this just an issue of the input quality (not enough cameras, render quality)
Hi, unfortunately there is no such settings.
But as you are also getting a bad model, there could be some issues with used images. The resolution is really small for such work.
Sometimes the “forced” alignment is bad for RealityCapture.
Have you tried to import the generated images without XMPs? Are you able to align those images?
Hi,
I suppose it is 36 mm in your case.
Are you able to align the images without XMP usage? If not, there could be the problem of camera positions and the overlap. Using the dodecaeder globe positions maybe isn’t ideal for photogrammetry of the interior.
After researching deeper I think the FocalLength35mm is calculated correctly.
Without XMP i don’t get a better result.
I changed to Icosaeder with 20 cameras already.
Also I use a focal length of 24mm to get more overlapping.
Still.. with 20 cameras pointing inwards on each side of an icosaeder (radius 30cm) you get quite a lot of cameras covering each point. It surprises me that the quality is that low.
Next thing to try is maybe a really high resolution to see if that is the issue.
In the video the cameras are pointing inwards and outwards, so cameras are doubled. i didn’t try that yet, because my Icosaeder size is limited to the train aisle width and pointing outwards would be extremely close to the seats for some images.
maybe the relatively small size of the icosaeder (radius 30cm) is also an issue.
in the video the camera sphere is much larger.
Without XMP RC doesn’t seem to properly find the camera positions
this all odd…
i tried highres renderings ~8k for one icosaeder
i tried doubling the cameras to point in + outwards on each surface
i tried prior=initial
nothing works
… is it an option that somebody at Epic/RC takes a look at this?
(using my images + XMPs + script)
As the images are not aligned without XMPs then there is no enough overlap between the images.
How many features are found over the images during the alignment process?
For the interiors it is better to capture the images as: