question

Jrw467 Jrw467 avatar image
Jrw467 Jrw467 asked ·

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.

10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Peter Horvath avatar image
Peter Horvath answered ·

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.

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.


decal-network.png (75.7 KiB)
Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Peter Horvath avatar image
Peter Horvath answered ·

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

9 comments Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

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.

0 Likes 0 · ·

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

0 Likes 0 · ·
decaltest.zip (21.2 KiB)

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

decaltest.zip

0 Likes 0 · ·
decaltest.zip (56.6 KiB)
Show more comments
Jrw467 Jrw467 avatar image
Jrw467 Jrw467 answered ·

@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.

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Shawn Kearney avatar image
Shawn Kearney answered ·

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)

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Jrw467 Jrw467 avatar image
Jrw467 Jrw467 answered ·

@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):

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

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.


snapshot-522.png (197.2 KiB)
snapshot-523.png (272.3 KiB)
Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Shawn Kearney avatar image
Shawn Kearney answered ·

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.

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Jrw467 Jrw467 avatar image
Jrw467 Jrw467 answered ·

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.

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

James McDermid avatar image
James McDermid answered ·

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!

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.