Camera Shader on a Light does not render object textures
Posted: 02 March 2019 05:54 PM   [ Ignore ]  
Total Posts:  19
Joined  2015-04-29

I’m not sure if this is a bug, expected behavior or I am just doing something wrong (well it’s unusual at least)....

I regularly use lights as image projectors to simulate real video projectors. I have a current project that requires the light’s texture to be a Camera Shader.

But I as my post title says, objects in the Shader’s camera view do not render their textures in the Camera Shader. Note, this is specific to applying a Camera Shader to a Light only.

Strangely, Background Object textures and Sky Textures do render in the Camera Shader.

I have tested different mapping options on the object textures and also different kind of materials; straight color, procedural materials and image textures to see if there is a specific issue, but it made no difference.

I get this behavior in R19.053 and R20.057 (OSX versions).

I have attached a simple scene file demonstrating the issue. If you toggle the Background and Sky you will see both will render in the Camera Shader on the Light.

Any help appreciated.

Tom

Profile
 
 
Posted: 02 March 2019 06:32 PM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
Total Posts:  6231
Joined  2011-03-04

Hi Tom,

If I’m not mistaken, the Camera Shader is calculated after the lights; otherwise, it would have not all to show.

Please always with a project file, (reduced to the problem, no 3rd party items, thanks) so we can eliminate eventual miscommunications.

Since you mentioned R19 and R20, does this indicate it was different in prior releases?

If you think it is a bug, please contact the support:
https://www.maxon.net/en-us/support/how-can-we-help/

Cheers

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.

Photography For C4D Artists: 200 Free Tutorials: Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 02 March 2019 08:08 PM   [ Ignore ]   [ # 2 ]  
Total Posts:  19
Joined  2015-04-29

Thanks Dr Sassi

OK, so I might try a 3rd party plug in that allows an external scene file as a Camera Shader source.

Dr. Sassi - 02 March 2019 06:32 PM

Please always with a project file, (reduced to the problem, no 3rd party items, thanks) so we can eliminate eventual miscommunications.

Not sure what you are referring to, there aren’t any 3rd party items in the simplified sample scene?

Regards
Tom

Profile
 
 
Posted: 02 March 2019 09:37 PM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
Total Posts:  6231
Joined  2011-03-04

Hi Tom,

Sorry if that was not clear. I ask since a while to not share the files with 3rd party items. Either those 3rd party items are objects that shouldn’t be shared publicly, or they give me an Alert that I do not have this specific item. If I don’t have it, I can’t say if it was perhaps the cause of the problem.

To my knowledge, to answer the question, if there is even a 3rd party Camera Shader, not that I’m aware of at all.

A scene file shows me, more often than not, what the idea is, or how it was set up to get somewhere. This will allow me to do it perhaps my way and share it back, which either helps directly to move on or to specify what was wanted. I can’t see what people see on their mind, hence the request to get a simplified file. To simplify a scene is also my suggestion to elaborate directly around a problem.

Since you haven’t share anything that I can explore here, let me ask you: Why not using Camera Mapping or Spherical Projection.
Please have a look here:

Screen capture
https://www.amazon.com/clouddrive/share/z9CYgzP5MypvPRfjBLLlS5vm5Aa4PNIWi2UN0HZvRJb
Scene file
https://www.amazon.com/clouddrive/share/JUQQyoarjtKpoElS0Yp93fYEtpEu5NssksKJ9M2sCjw

If nothing else helps, the Camera that is used in your scene needs then to be rendered out as an image sequence (some prefer QuickTime). This is then later used in the Transparency Channel with a Light-object set to Shadow, I guess the way you use it typically.

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.

Photography For C4D Artists: 200 Free Tutorials: Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 03 March 2019 02:53 PM   [ Ignore ]   [ # 4 ]  
Total Posts:  19
Joined  2015-04-29

Hi Dr.Sassi

Strange that you got warnings opening the file, there is only C4D native assets: a Plane with basic color material, a Cube with C4D Marble Shader, a light and two cameras. I double checked the render settings for third party renderer settings etc as well.

A found this plugin XRef Shader, which allows external files as Camera Shader source, I am waiting on a response from the developer if it still current. https://www.at2-software.com/blackstar/xref.php

I am doing video projector simulations so really need it be a light texture.

Regards
Tom

Profile
 
 
Posted: 03 March 2019 03:21 PM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
Total Posts:  6231
Joined  2011-03-04

Hi Tom,

You haven’t attached any file so far. Please check your initial post. If you need an upload link, let me know.
Files should be in zip format to work, well, sometimes that fails…
All I wrote so far was about previous files here in the forum; Nothing at all about your file.

I have also no answer to any of my question: No idea how I can help you. Why is the Light Shader combination the only option.

Cheers

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.

Photography For C4D Artists: 200 Free Tutorials: Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 03 March 2019 07:36 PM   [ Ignore ]   [ # 6 ]  
Total Posts:  19
Joined  2015-04-29

Hi Dr.Sassi

Ah, I didn’t zip the file originally…zipped copy of example file attached to this post.

As I mentioned before, I am visualizing video projector installations in which I need to simulate real world projector set ups, including light paths, lens FOV, position, coverage and shadows etc.

As you mentioned, I usually use images or video as the texture source, but I am doing some experimentation where I was hoping to be able to test CG content production techniques (perspective illusions etc) without having to pre-render out every iteration. Perhaps I will just need to separate these content tests from my usual projector simulation workflow.

I was just looking for advice if my result is correct behavior (which you confirmed) or perhaps a bug.


Thanks
Tom

File Attachments
Shade Cam Issue.zip  (File Size: 137KB - Downloads: 5)
Profile
 
 
Posted: 03 March 2019 10:38 PM   [ Ignore ]   [ # 7 ]  
Moderator
Avatar
Total Posts:  6231
Joined  2011-03-04

Hi Tom,

Thanks for the file.

I have set up your scene file as Camera Projection. The Camera Projection/Camera Mapping is a projection, even a better one than with a light source, as it can have shift adjustments like most video projectors have. Please have a look at the file below
Scene file
https://www.amazon.com/clouddrive/share/YXcVU1QI9u6g0sSl4wdFSXGsk1s3KCDA3m1tRylCMSH

Yes, it has not the option to simulate a falloff (inverse square) nor test the light path. However, this might be useful to set up the scene, and when everything is as it should, the content can be rendered and projected as you like.

I assume you will use the renderings for light instead.

As a side note, I tested the Xref options in C4D, if it allows tricking the priorities a little bit, But all I could get was a transparent plane with the scene file. However, it doesn’t work as ‘slide’.
Scene file[s]
https://www.amazon.com/clouddrive/share/piGiQqQEKFTonB9e4gdbnR1IWm2x3UnGyAjt91BFUyz
File …_01.c4d is the sub-scene and …_11.c4d is the main scene

No real solution, sorry.

My best wishes for your project.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.

Photography For C4D Artists: 200 Free Tutorials: Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 11 March 2019 08:16 PM   [ Ignore ]   [ # 8 ]  
Total Posts:  19
Joined  2015-04-29

Hi Dr. Sassi

I tried using just using Camera Mapping of the texture, but the problem is that the texture is projected “through” the object so the texture appears on all parts of the object. Is there a way to make the texture appear only on the polygons visible to the camera that is mapping the texture?

Regards
Tom

Profile
 
 
Posted: 11 March 2019 08:35 PM   [ Ignore ]   [ # 9 ]  
Moderator
Avatar
Total Posts:  6231
Joined  2011-03-04

Tom,

Generally speaking about Camera Projection: How about a Polygon Selection and use this for the Texture Tag? Polygon selections will often be relatively rough, but if you can create an alpha channel for it, this gets very precise. Perhaps some parts show up in an unwanted way, those need a material to have them invisible, as in transparent. I tent to delete those, often after I made a copy as back up.
Well, there is a limitation that I would like to make you aware of. Even with a higher resolution, alpha information that gets more to the tangential projection than perpendicular will show some problems.
It is not a big problem, as one can set up a second camera for that as projection. Yes, it is more complicated, but once you get the hang of it, it is more an effort than a headache.

Please let me know if that will work for you, if not I could create an upload link for any private scene file, but I welcome a public discussion of course. So more people can use the content of the discussion. A more detailed examination was done for several series of mine, for the movie Jet, or later on for smaller projects with the link below (Photography for 3D Artists).

Here is an example that I have set up with the Compositing Tags as Matte Object. Cube white, Torus black. I use a linear file format to avoid any problems with gamma. Alpha is not an image file, it is data, so linear is ideal. (Scene file …_01.c4d.)
The projection file is then projected fully, but the alpha channel fakes the shadow of the Torus. (Scene file …_02.c4d). I have not used any polygon selections here.
Scene files and textures:
https://www.amazon.com/clouddrive/share/BbJ7h5uZ8k2uYwnq0v5oPWnmFbgCl4TnzieahEGmZqz
Screen capture
https://www.amazon.com/clouddrive/share/ve7cIcDuodgHeImBFNccxRg2oMk3Mf4OLgD8lSkLfjf

Let me know if that works for you.

All the best

update: scene files added

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.

Photography For C4D Artists: 200 Free Tutorials: Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile