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
   
 
Scale texture for camera projection baking?
Posted: 09 July 2017 06:21 AM   [ Ignore ]  
Total Posts:  81
Joined  2016-02-22

Hi

I thought id check out ways in which I can project textures to my model.  I set up a Camera mapping projection in front view to place and bake down to my object.  The issues Im having is I need to be able to scale the texture in the view port so I can then position the model via the camera to then bake.

Currently lets say I want to project a face texture onto my model, the texture is too large in the view port, or it may be the other way around tool small.  I need to be able to scale up or down the texture, I know its easy to position it.

Second issue is getting the model to better conform to the texture Im wishing to bake down.  I found that a camera deformer is perfect to adjust areas such as the eyes to fit the texture better however when I use this deformer no textures get baked only a bland grey map?

Last problem is as C4D dont yet support UDIMs, Camera projection and baking only bakes into the single 1:1 uv space.  I have to manualy move each UDIM into 1:1 space to get each one projected which is a pain, is there a better way to get around this?

Project man, or other methods for texture project may be better methods, please advice what other options I have?  My aim is to project very high quality images onto my model using different images from different angles, and later optimise them in Photoshop.  I can project in Zbrush by poly painting looses quality of the original texture im projecting, plus Im working with 8k and higher images.

Thanks, Dan

Profile
 
 
Posted: 09 July 2017 01:41 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

HI Dan,

You wrote that you use Camera Projection and then you talk about Front View. These are independent from each other. Camera Projection works with a camera connected to a Texture Tag, whereby any move or change of the camera will change the projection. If you change the Field of View (of this connected camera) then you practically change the scale of the texture.
Camera Projection can be turned into UV mapping, but yes, test this with your object, I have seen— in rare cases—problems.

Scaling textures, while in Camera Projection, the Texture Tag> Coordinates> Scale has no influence. You can change the field of view of the camera that works with the Texture Tag, or you you select the Object Manager> Generate UVW Coordinates and use the Texture Mode to scale or directly the Offset and Length U or V parameter in the Texture Tag>> Attribute Manager> Tag> Length/Offset.
I can’t reproduce here the “grey map”, since you have not shared any scene file example, also here - I can only suggest what eventually to do: Select the object, got to Object Manager> Objects> Current State To Object and bake the new object then. You set up might vary, but how can I know at the moment.

UDIM or PTEX are not supported. Since we are in a forum, I like to answer, as I did above, for all readers. Here I think is a link needed:
https://www.fxguide.com/featured/udim-uv-mapping/

You might create a suggestion to MAXON along your specific needs:
https://www.maxon.net/en-us/support/suggestions/

Besides that, the only wimpy idea I have for now is Polygon selection and multiple Texture Tags, Store UV then Remap. Wimpy at best, but perhaps worth to mention in terms of brainstorming.

—-

If you have a scene file, reduced to the needed parts, with the information what should be scaled or deformed, I’m happy to take a look into it.

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: 09 July 2017 01:58 PM   [ Ignore ]   [ # 2 ]  
Total Posts:  81
Joined  2016-02-22
Dr. Sassi - 09 July 2017 01:41 PM

HI Dan,

You wrote that you use Camera Projection and then you talk about Front View. These are independent from each other. Camera Projection works with a camera connected to a Texture Tag, whereby any move or change of the camera will change the projection. If you change the Field of View (of this connected camera) then you practically change the scale of the texture.
Camera Projection can be turned into UV mapping, but yes, test this with your object, I have seen— in rare cases—problems.

Scaling textures, while in Camera Projection, the Texture Tag> Coordinates> Scale has no influence. You can change the field of view of the camera that works with the Texture Tag, or you you select the Object Manager> Generate UVW Coordinates and use the Texture Mode to scale or directly the Offset and Length U or V parameter in the Texture Tag>> Attribute Manager> Tag> Length/Offset.
I can’t reproduce here the “grey map”, since you have not shared any scene file example, also here - I can only suggest what eventually to do: Select the object, got to Object Manager> Objects> Current State To Object and bake the new object then. You set up might vary, but how can I know at the moment.

UDIM or PTEX are not supported. Since we are in a forum, I like to answer, as I did above, for all readers. Here I think is a link needed:
https://www.fxguide.com/featured/udim-uv-mapping/

You might create a suggestion to MAXON along your specific needs:
https://www.maxon.net/en-us/support/suggestions/

Besides that, the only wimpy idea I have for now is Polygon selection and multiple Texture Tags, Store UV then Remap. Wimpy at best, but perhaps worth to mention in terms of brainstorming.

—-

If you have a scene file, reduced to the needed parts, with the information what should be scaled or deformed, I’m happy to take a look into it.

All the best

Thanks for your reply.

Field of view just scales the camera closer or further away from the mesh, the texture remains in place.  Here is a demo file Thanks, Dan

PS: I tried adding a layer and a Transformation shader to scale up and down the texture, also the projector shader, neither worked when baking although I got the texture to scale using these shaders, baking never took this on.

Profile
 
 
Posted: 09 July 2017 02:03 PM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Dan,

Well, just changing the “Field of View” (using the parameter in the Attribute Manager), will not move the camera. If you move the camera - it doesn’t change the field of view.

I have send you an upload link, as the scene file is not linked to your post.

Talk to you soon.

 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: 09 July 2017 02:19 PM   [ Ignore ]   [ # 4 ]  
Total Posts:  81
Joined  2016-02-22
Dr. Sassi - 09 July 2017 02:03 PM

Hi Dan,

Well, just changing the “Field of View” (using the parameter in the Attribute Manager), will not move the camera. If you move the camera - it doesn’t change the field of view.

I have send you an upload link, as the scene file is not linked to your post.

Talk to you soon.

If your looking through the camera as a perspective view the field of view changes the focal length as well as bot Horizontal and vertical FOV, that effect is zooming closer and further from the object, the texture does not scale which is what I want to do.  Now I need to project from front, side views in which case these is no FOV but that dont matter as that is not scaling the textures for me.

edit: I can move the texture as long as Im not looking through the camera, that may be where im going wrong, trying to look through the same camera while Im projecting it.

Dan

Profile
 
 
Posted: 09 July 2017 02:43 PM   [ Ignore ]   [ # 5 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Dan,

Camera Mapping is used to re-dimensionalize a flat image onto a geometry that followed the image content. With that, a different camera can move to a certain degree and get a different impression of the content, with a fairly close parallax of the given original content. So, I wouldn’t look through that camera to adjust anything. I guess there is the difference in your approach and mine.

Even if you are looking through that projection camera, changing the FoV, or Zooming if you wish, is nothing else than magnifying, i.e., scaling. On the end, if the camera is not moved, nor the object, the resulting texture {or better projection thereof) is scaled.

Have a look here:
https://www.amazon.com/clouddrive/share/XjyJu988iANZwlGbaiyLN2kaO7Eee5UqQnOflD7dSqD?ref_=cd_ph_share_link_copy

The scene file:
https://www.amazon.com/clouddrive/share/7vtfpmgzIBW7rFW0dfNLA7GWZ0U18A28LlQ3UAHPWcn?ref_=cd_ph_share_link_copy

Please check you PM (Cineversity Private Message) for the upload link. If needed I make a little clip as the one above to showcase things.

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: 09 July 2017 02:55 PM   [ Ignore ]   [ # 6 ]  
Total Posts:  81
Joined  2016-02-22

Thanks.  Yes as the file you sent I can see the texture scale without the geometry as it should be while not looking through the actual projection camera, but looking through the projection camera has the oposite effect, the texture remains the same scale in the viewport, while the camera is zooming in and out on the object giving the effect of zooming in and out of the object while the texture remains static.

I think what iv have to do is make a second camera in the same place as the projection camera to get the same view the projection camera has.  Remember Im only using the projection mapping to bake a texture onto the object, nothing else.

PS: I sent a new file

Dan

Profile
 
 
Posted: 09 July 2017 03:01 PM   [ Ignore ]   [ # 7 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Dan,

Of course the texture stays in the same size while looking through the projection camera, but the object seems to get larger or smaller. It is just a subjective impression. The scene doesn’t change the set up just by switching the cameras. This needs to be understood. The cube in the example above, count the squares, hence why I placed them there. If you go to any frame and memorize the amount of squares or checker patterns you see, then change among cameras—you will see it is the same.

I just go a “ping” that the file is uploaded.

I’m back soon.

 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: 09 July 2017 03:09 PM   [ Ignore ]   [ # 8 ]  
Total Posts:  81
Joined  2016-02-22

Totaly understand that the geometry is not literally scaling up its the vocal length of the camera that produces the illusion.  Maybe I should have put down in more detail what I need to achive.

I need to look at my geometry from the front view, and zoom up close for instance to the eye, then scale the projection of the texture so I can perfectly place the texture.  I would have liked to use the camera deformer to move the eye lids and facial features to fit even better to the texture ready for object baking, this was a ideal option as its only tempory.  I know I can use the pose morph and deform the face that way as welll. 

My mistake was I was trying to look through the same camera thats doing the projection.

PS: It would be nice if the bake didnt bake beyond whats visible to the projection camera, that way I could place multiple projection cameras and have them only bake what visible with no spill over.

Thanks Dan

Profile
 
 
Posted: 09 July 2017 03:30 PM   [ Ignore ]   [ # 9 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Thanks for the reply, Dan.

This feels like in “Enders Game” where the guys sitting in the chairs thinking that the hovering guy is horizontally. It is a question from where one is looking at it. I’m glad I got your point, so I can make a suggestion, perhaps you have it already in that way set up, but as we are in a forum, allow me to be that detailed.

I had already created a second clip to demo that: (one minute)
https://www.amazon.com/clouddrive/share/O2FmGhBj5wuZmEEVbRZ9vulALp6WOCmA6Ac1BuJAu14?ref_=cd_ph_share_link_copy

——-

Here is the file I show in the clip below:

Scene file
https://www.amazon.com/clouddrive/share/7YFDV5WRX24J7dR2pELMfk5rnw88lcJusliRvFa8k6V?ref_=cd_ph_share_link_copy
It is file _11.

Screen capture (one minute)
https://www.amazon.com/clouddrive/share/5VuWPgMOShyOB5cPZJGOd8XTiKyx8lx3Baeweoehlax?ref_=cd_ph_share_link_copy

In short, duplicate the projection camera, and use that copy as a “working camera”, while the Projection Camera is active but not the viewing camera. This allows to adjust in two ways: one would be with the FoV parameters, and the other one via the orange dots at the camera’s frustum.

Perhaps have a third camera for the Camera Deformer, just to have all options open. If the bake fails, do a Current State To Object, and bake with the new object, while the original should be invisible Editor/Render both dots to red.

If there is anything else, I leave the upload link open, and what ever you send I will be happy to take a look at it.

My best wishes for your project.

 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: 09 July 2017 03:49 PM   [ Ignore ]   [ # 10 ]  
Total Posts:  81
Joined  2016-02-22

Thanks again for your help, its been very usefull.

Dan

Profile
 
 
Posted: 09 July 2017 03:54 PM   [ Ignore ]   [ # 11 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Thanks a lot, for your feedback, Dan.

It takes always a moment to completely get into the idea/problem of someone else, but to find out what could help or even work after that is fantastic.

It was a pleasure to dive into, and again if there is anything else, please never hesitate. We all take advantage from questions, if we “walk” through them grin

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: 10 July 2017 12:56 AM   [ Ignore ]   [ # 12 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

UDIM

Hi Dan,

So after some research, I found this one was the most mentioned plug-in for this kind of work. (I might miss some, sorry if!)
https://vimeo.com/180974929

The company itself can be found here.
https://www.4dpublish.com/paint-brushes

Please note that I can only share a link here, I certainly do not have the budget to own or maintenance all the plug ins available for Cinema 4D, even if some are very tempting.

My best wishes for your project.

 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: 10 July 2017 04:30 AM   [ Ignore ]   [ # 13 ]  
Total Posts:  81
Joined  2016-02-22
Dr. Sassi - 10 July 2017 12:56 AM

UDIM

Hi Dan,

So after some research, I found this one was the most mentioned plug-in for this kind of work. (I might miss some, sorry if!)
https://vimeo.com/180974929

The company itself can be found here.
https://www.4dpublish.com/paint-brushes

Please note that I can only share a link here, I certainly do not have the budget to own or maintenance all the plug ins available for Cinema 4D, even if some are very tempting.

My best wishes for your project.

Thanks for checking out further info, that looks very promising and nice to see UDIM support.

Dan

Profile
 
 
Posted: 10 July 2017 04:32 AM   [ Ignore ]   [ # 14 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

You’re welcome, Dan.

At least there is an option!

Have a great start into your week.

 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