A new version of Cineversity has been launched. This legacy site and its tutorials will remain accessible for a limited transition period

Visit the New Cineversity
   
 
UV unwrap and camera mapping
Posted: 14 June 2018 01:31 PM   [ Ignore ]  
Total Posts:  434
Joined  2012-01-05

Hello

This might be a tricky question…I have a fairly complex model (a cave environment) and I’m working on a project that requires me to explore projector placement so I can project on various parts of this cave.
I’m working with camera projection textures, and I have a decent view of what the projections look like.  Now I need to basically look at an unwrapped version of the cave, ideally as one flat surface, that would allow me to understand projection overlap better, and also allow me to paint in some things via photoshop or Bodypaint.

Since I created a single object to be able to to do the camera projection properly, but I want my 5 textures (each one representing a projection surface) to appear on this unwrap, I’m not sure how to proceed to do this properly.

What would be a good way to do this?

Thanks!

Profile
 
 
Posted: 14 June 2018 02:02 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Alex,

Over a decade ago, I suggested during my Camera Mapping Intensive Training, to replace the projectors with lights of different color to bake out the texture, Matching the frustum of course. This allows then to study the overlap. All lights should never mix over 100% to make that simple to explore on standard monitors. Which allows also an analysis where to set the alpha values to black (or gray) to avoid adding twice the light in your real cave, to have a seamless projection.

The cave model that you use could have a UV tag already that would allow for the baking of such single image. With out a scene file, it is impossible to tell. The cameras itself defines only the position and area[s] on the surface where each camera hits the surface. This set-up creates a unique internal UV information for each specific camera. If you bake that out with the main UV of the cave, things will have perhaps a lot of distortion. Not knowing the set up, I can only assume the worse, to suggest workable solutions.

Camera mapping/projection and information about its own UV can also written into the UV(W) information, in separate UV(W) tags, which makes the camera obsolete. I urge to not to write those in one single UV Tag, as overlapping areas force the later stored information to destroy the earlier information. Again separate UV(W) tags. (Note: In some very rare cases this conversion fails, so my experience since the late ‘90s with it. More often than not it works.) However, if I get it right, you are aiming for a single image that has all camera projection results in it. If you bake a texture, leave the “Use Camera Vector” un-checked!

If the cave by itself has no useable UV(W) date, the baking could create one or you unwrap it on your own, some hints are here:
https://www.cineversity.com/vidplaytut/boston_terrier_illustration_creating_uv_map_unwrap_uv_toolset_bodypaint_3d

Without a scene file, this is of course hard to tell. Hence the longer text. Perhaps the Cylindrical Lens would help?

A short baking run down, based on what I know from the initial post, screen capture and scene file:
https://www.amazon.com/clouddrive/share/X1jOrpXciM9EhINTeEJ21qKhVDaVA1cvPqxFdkwJMIl


Cheers.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 14 June 2018 02:36 PM   [ Ignore ]   [ # 2 ]  
Total Posts:  434
Joined  2012-01-05

Thanks for your detailed answer Sassi.
Here is a scene file : https://www.dropbox.com/sh/sivcx5v6l34k8cs/AAClG92xql2kXQk8BG6rXZn1a?dl=0

The cave was delivered to me as a Sketchup file, so I merged all the geometry to create a single surface to place the cameras.  I don’t think the cave had a UV tag through that process…

Let me know what you think is the best way to approach this.

Thanks!

Profile
 
 
Posted: 14 June 2018 06:14 PM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Alex,

Typically, I would say, create for each camera a UV tag, convert if needed, the Camera Projection into pure UV Data. But yes, we can take a look into getting one UV for all, perhaps not the best way, though.

The mesh needs some work. Attribute Manager>Mode>Modeling> Check Mesh. It results in 198 Bad Polygons. While trying to relax the UV mesh, I got the message that many polygons share the same edge. If more than two polygons share the same edge, we have a problem with this.
I created a new mesh in “Instant Mesh” and manually fixed the reminding problems; see the file below.
https://www.amazon.com/clouddrive/share/TANRudtJh7eA3upzizPlZ0d3SFYK1PCrwbIPrj5CcqY

Just merge it to your scene, select your materials of the “MainSurface” and copy those to the replacement, set the MainSurface to invisible (render/view). The materials set to not mix, no tile.

In the file here (not included in the link above), I colored the cameras (Attribute Manager>Basic>Use Color) to the colors of the test patterns in the scene. Since I’m not the art-director on this project, I have no idea what aesthetic/quality would be needed. As you know, and I write in a forum - so I share more details than you might need), a reasonable projection is undoubtedly closer to a perpendicular projection than to a tangential. Given the projection, for example, of Projector 4 (orange), the entrance/end of the wall would be perhaps pixelated/streak like. So, the density/resolution lowers there remarkably. Towards the wall end, it will be black. Again, I guess you are aware of it, but I like to mention it. The red camera (projector 5) will add some tangential rays to it, but as well not really sufficient from where I look at it.

Going back to your post #2, perhaps all of that would be simpler to have the non-merged files. So each could be seen by one or two working cameras, while others are set to “not seen by camera”, perhaps via Taking System, to allow for a fast switch.

These work cameras should be set on eye-level and cover every single part of the object. So, I check that merged file, and it was created, so far I can tell, out of 18 different objects—several of those like in layers, from top to bottom. In short, the left and the right wavy wall could be an element, the column, and the ceiling, as well as the rectangular object on end. However, these “stripes” are not connected to a certain degree, which makes it difficult.
See screenshot
https://www.amazon.com/clouddrive/share/zLkuXqz3zkdKUSF3C2lD9PE1AD3P02l8HlXYffS4Moz

From there, a wall “roll-out” could be created, as well as a column+ceiling. Which would allow for a nice bake out with something useable? However, I think to have working cameras as Take system might render faster what you might need. With having film-set like removable walls (Compositing Tag, Not seen by camera), things will get so much easier.

Let me know what you would like to do, and we can continue to explore the options, as in selecting horizontal edges and create spline from such, and use a Loft to create new geometry.
Edit: I tried to “harvest” splines from the geometry, but it needs to be put in all parts, to have no overlapping point. I have put a little XPresso together, and have a look at the screen capture if any interest is given:
https://www.amazon.com/clouddrive/share/fHgoHsq1LACq6KsXKR1Ns82jmTC1RMeXUCz6og0UKiz
/edit

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 15 June 2018 03:09 PM   [ Ignore ]   [ # 4 ]  
Total Posts:  434
Joined  2012-01-05

Hello Sassi

Thanks for all this!  How did you create the new mesh?  I’m not familiar with “instant mesh”, but it looks much better!

I think you are right about the approach to separate the pieces of geometry, it seems to make more sense.  What is tricky is that in some cases the same projector has to hit parts of the ceiling and the wall.
Also, I’m seeing the tearing you are talking about, but I would mask those areas in the content.

By “roll-out” do you mean unwrap?

That Xpresso looks amazing!  I’m going to give it a spin.  But why would you create new geometry?  Do you think the existing geometry is not good enough?

And last question : did you separate the parts of the cave using selections or just going into the original geometry? 

Thanks!!

Profile
 
 
Posted: 15 June 2018 03:37 PM   [ Ignore ]   [ # 5 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

You’re very welcome, Alex.

For more information about “Instant Mesh” have a look here:
https://www.cineversity.com/vidplaytut/turn_any_object_into_hexagons_with_instant_meshes

Yes, “roll out” was my target of the walls, but it is of course a little bit more difficult with such a complex mesh and the target to evaluate the camera mapping. However, any work-camera will give you the view you need, and as long as it is between “projectors” and not too close them, it will provide the most useful information. Those work-cameras can be set of course anywhere, preferably closer to the audience view than not. My suggestion, have one working or call it Spy camera, and set it every 10 frames to a new major problem point. Problem points would be seams and tangential projections for example. Render a preview and you get all problem areas, which can be flipped through frame by frame, or with the time slider for single area exploration.

The mesh, well, it always depends on your target. If it is only to explore the set up for a later on practical set up, all is good. If you want to use it for any image production, well, I have serious doubts that this is useful. It is really messy and not easy to fix, I invested a few hours to find maybe way that can be communicated in an easy way, but I don’t, it is just too much of a problem. The Instant mesh was done based on a polygon reduction I have had applied first. After that, I didn’t could get anything better. Even my exploration to harvest Splines (via XPresso aid) from it failed, as the spline had a lot of problems, inherited from the mesh. Again, as a analysis platform, this is fine, but it is not a production quality, not at all.

As a side note, sometimes things can be simply sorted out with the VAMP function, just by creating a simplified object with a clean UV information and transfer the UV information. It didn’t gave me good results here.

The separation was done with the Mesh>Conversions>Polygon Groups to Objects. For camera projection these new fragments can be placed under several nulls to more useable groups, no need to merge those for Camera projection. See example below
https://www.amazon.com/clouddrive/share/goyXK2MEQsil0iPxS0H6Ka25uLI0L76GNWsIyuc8T0y

I saw in your scene lights attached to the Projectors, with Inverse square as set up. which can help to create a brightness map to counter the wide range of distances in your set up as well. A render from the projector, inverted, with an Exposure adjustment to the darkest point (lift to white) used in the Diffusion Channel will show the result. For practical purposes, this needs to be multiplied with the Footage 9the one that will be projected.
https://www.amazon.com/clouddrive/share/vYi4kHmGQxF7w3bJPIaNrh0GlMgdSsszgJzpBmtolP1
Another area that needs those lights, as Camera projection has no inverse square function, is given in the overlaps of two projections, where the two (or more) projectors have a different distance to that seam. With five projectors that is quite a puzzle otherwise. (A depth pass will not work, as long as it is set linearly. IF a depth pass is used (linear), one could multiply it with itself, but the start and end point would be critical. So, not advised.

My best wishes for your project and let me know if there is anything else.

Cheers

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 16 June 2018 04:06 PM   [ Ignore ]   [ # 6 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

P.S.: I know that is not the initial question nor the answer to it. However, one way to control the scene would be with a 360ºx180º camera view. Since not everything is visible from one point of view, I have introduced three cameras. Since that is a lot to switch each time, the Take System can take over. One click on a icon and all previews are rendered. Perhaps create specific render-settings for it, e.g., current frame only. Rotate Camera.1 to R.H 270 while take 2 is active, the view is nicer.

Here is a screen-capture and the scene file.
https://www.amazon.com/clouddrive/share/QdKgtdz89CbkbpLv3s0FCAkphNjeqcHcJ7uTQXQO2zS
I hope that gives you the tool to analysis your work.

BTW, just by triangulate the mesh and deleting bad polygons, lifted a lot of problems.

Have a great weekend

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 18 June 2018 02:03 PM   [ Ignore ]   [ # 7 ]  
Total Posts:  434
Joined  2012-01-05

Ha yes, the 360 camera idea is great! 

And yes, for all this I am just doing studies, to get into real production I would need a real model. 
I feel much more comfortable tackling this with all the advice your provided, so thank you very much!

Profile
 
 
Posted: 18 June 2018 02:26 PM   [ Ignore ]   [ # 8 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Nice that the 360º camera might help, thanks for the nice feedback, Alex.

This is a complex project, so far I can tell, and your idea to explore this with the scene you shared will pay off, I’m certain. On the end, it might look all just natural based on all your prep work, and the quality will allow to dive into this projected environment without reminders of the problems that needed to be solved beforehand.

Let me know if there is anything else, I’m happy to look into it.

Cheers

P.S.: Camera projection in C4D is flawless compared to the practical use of projections. Two qualities that I found during my stage light show years including many film- and slide-projector devices is, that the light is kind of fading rather quickly with distance (hence why I have addressed this already above), but also, in small spaces the “depth of field” with variances in distance is a problem. (Small spaced were these back-room music stages where I to perform as well for the bands) .
I have a digital projector here and if I can check out anything for you, I’m happy to do so.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile