Community
Arnold for Cinema 4D Forum
Rendering with Arnold in CINEMA 4D using the C4DtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Decal workflow

17 REPLIES 17
Reply
Message 1 of 18
jrw2
3743 Views, 17 Replies

Decal workflow

Hi, I would like to know the most efficient workflow for adding decals/stickers/labels/logos on objects. The method I'm currently using is way too complicated and time consuming:

  1. Create a base material (eg. red plastic)
  2. Create the decal material containing the logo
  3. Create an alpha material of the logo
  4. Setting the shader network in the decal material alpha tab to the alpha material
  5. Creating a polygon selection tag for the front surface where I want the logo (this is to prevent the logo from appearing on the backside)
  6. Creating a second polygon selection tag for the rest of the object
  7. Adding the base material to the object twice, each with a separate polygon selection created earlier
  8. Adding the decal material to the object and setting the selection to the front surface polygon selection

Many of these steps seem unnecessary, and it's difficult to maintain when making modifications. Is there a way to reduce the number of steps? Ideally, what I want is simply adding a base material and a decal material to the object and that's it (or similar), without needing to create polygon selections and alpha materials.

Thank you.

17 REPLIES 17
Message 2 of 18
jmcdermid1
in reply to: jrw2

Arnold really relies on UV maps for the application of materials - more so than Physical. I hated setting up UV's for objects in the past but once you get your head around it, it doesn't become that much of a task and it really allows far greater control for the exact placement of elements such as decals. Also, you can stack materials onto an object in Arnold just like you could in C4D (double click on an Arnold material to get access to the stacked materials alpha channel).

Using these two methods your workflow should look more look like:

1. Generate object UV map and export UV map layer to photoshop image.

2. Apply decal to photoshop image, plus generate decal alpha map.

3. Generate two Arnold materials: 1 base, 1 decal. Apply both to object (decal material furthest to the right in the object manager)

4: Double click on the decal material and point the Alpha field to the decal alpha map you created.

Make sure your decal material is set to UVW Mapping as the mapping mode, which is should be by default, and the decal will be bang on where you placed in photoshop. Hope this helps!

Message 3 of 18
jrw2
in reply to: jrw2

Thank you James, your workflow looks sound, however it has it's own problems. The stacking method using an alpha material is what I already use (step 4 in my post). The problems with the UV map method are as follows:

1. No way to know the exact dimensions of the decal. When importing the UV map into Photoshop, the dimensions of the UV does not correspond with the actual size of the object, but rather the pixel size of the texture when you create it in C4D.

2. You cannot have the decal extend beyond a single UV island without having to manually move the islands around, which takes ages. So if you have a box with large rounded corners, the Paint Setup Wizard will create separate islands for the front surface and the corners. If you want to have the decal cover the rounded corners in addition to the front surface, this is not possible. If you instead use a flat projection, the decal will cover the rounded corners, but will also appear on the backside.

Message 4 of 18
peter.horvath6V6K3
in reply to: jrw2

You can use a mix shader with the alpha of the image, tweaking the UV transform on the image shader, and a two_sided shader to have the logo only on the front side.

1201-decal-network.png

Of course it's still not as simple as just adding two materials. There's a technical issue at the moment in the way of supporting the native workflow, I'll see if I can overcome that in the next release.

Message 5 of 18
Shawn_Kearney1
in reply to: jrw2

While @Peter Horvath solution is my preferred one, just yesterday a co-worker needed to use a different projection for the decal than the surface it was on (UV vs. Cubic). In this case, using the alpha tab was more useful than creating a unique UV set.

Message 6 of 18
jrw2
in reply to: jrw2

@Peter Horvath, thank you for providing a very nice method. However, what I mean with the backside is the more colloquial meaning, for instance the back side of a product, not the opposite side of the surface normal.

I've compared with the C4D native workflow, and discovered there are several issues with Arnold:

1. The most important issue is that that Arnold doesn't seem to honor the "Z-axis rule", where when you have a flat projection and Side set to Front, the decal will only be visible when the Z axis of the texture is facing the normal of the surface. This is the reason I have to create complex polygon selections in order to hide the decal from appearing on the back side of the object.

C4D native (correct - visible in the positive Z direction only):

1202-snapshot-522.png

Arnold (wrong - visible in both positive and negative Z direction):

1203-snapshot-523.png

2. As can be seen on the above image, Arnold lacks support for projection modes like Flat. (I prefer to use the Texture Mode with the move and scale tools to adjust the decal position rather than the UV settings in the Arnold material.) The workaround is to first set the projection to Flat, make adjustments to the decal position, then right click the decal material and select Generate UVW coordinates.

Message 7 of 18
peter.horvath6V6K3
in reply to: jrw2

Great input, thanks! I'll work on it in the next days/weeks to make Arnold as close to the native workflow as possible.

Message 8 of 18
Shawn_Kearney1
in reply to: jrw2

I'm curious if you set the U/V Wrapping from periodic to either color or clamp if it would fix the issue. "Two Sided" might also help, though I don't know if it would here since the geometry is closed.

If the 'Two Sided' shader or UV Transform does not work here, you could use the shading normal as a mask.

Take the Z normal, wire it through through a range mapper to get the absolute value, and ensure everything where you want the decal is 1.0. Use this with a shader mix node (or multiply with the decal's alpha)

Message 9 of 18
jrw2
in reply to: jrw2

@Shawn Kearney, the object is a closed shape. As for the normal map, it doesn't seem to distinguish between positive and negative Z direction. Also, it doesn't show up in the Arnold Viewport.

Message 10 of 18

Finally I had some time to work on this, sorry that it took so long. Could you please check this build if the native decal workflow works as expected?

https://safeshare.solidangle.com/index.php/s/a4H1riUuw3zQGaS

password: c4dtoawip

If everything's fine this will be added to the next 2.3.2 release.

Message 11 of 18
jrw2
in reply to: peter.horvath6V6K3

I've installed C4DtoA 2.3.2_decal_wip01 but I can't tell any difference. Do you have a C4D R19 project file so I can check how you've done it? If it helps, I've attached the polygon object I used for my test.

decaltest.zip

Message 12 of 18
peter.horvath6V6K3
in reply to: jrw2

There you go. It matches the C4D render now. Are you on win or osx btw?

decaltest.zip

Message 13 of 18
jrw2
in reply to: peter.horvath6V6K3

I'm on win. Looking at your file it seems there might be a misunderstanding. You've used C4D materials, but it needs to be done with Arnold materials. One of the reasons is that I need to define AOV for the decal.

Message 14 of 18
peter.horvath6V6K3
in reply to: jrw2

C4D materials are translated to Arnold shaders, so it should not matter. I just used them to be able to compare the result with the standard renderer.

Can you send me your scene which does not work as expected?

Message 15 of 18
jrw2
in reply to: peter.horvath6V6K3

Understood, I took another look and yes, the Z axis and projections issues have been resolved. This will save a lot of time, thank you! However, if you have time, I noticed some things that can be improved further. Take a look at the attached image. I've also attached the modified project file.

snapshot-30.png

decaltest-mod.zip

Message 16 of 18
peter.horvath6V6K3
in reply to: jrw2

Thanks for the feedback. Good point with the alpha, I'm working on it.

The viewport is a different story, it has to improve in all areas, so I would handle that separately.

Message 17 of 18
jrw2
in reply to: peter.horvath6V6K3

Peter, I've discovered a bug which I think has priority. When you apply a second decal material (placed on a different side of the same object as the first decal), it has the same problems as before. You must set Side to Both for it to appear in the render, and then it also appears on the backside. Attached is the project file to verify.

snapshot-38.png

decaltest-mod2.zip

Message 18 of 18
peter.horvath6V6K3
in reply to: jrw2

Nice catch. I'll fix this asap. Thanks.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report