Community
Arnold General Rendering Forum
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Trailing edges on Toon lines

17 ANTWORTEN 17
GELÖST
Antworten
Nachricht 1 von 18
maruska
2566 Aufrufe, 17 Antworten

Trailing edges on Toon lines

I tend to render technical objects that have a lot of parallel faces, but are at different "depths". Most of my data is coming from CAD, has no UV's, and the topology typically is pretty awful by DCC standards.


When rendering toon-line images, anywhere there is a trailing edge of a surface that is coplanar with another surface, Arnold Toon will skip that toon line. This omission tends to drop a lot of detail that otherwise should be represented.

8036-toon-trailingedges.png

Any depth-pass or normal-pass tricks to get these conditions to render? I'm rendering in Maya (MtoA), but I'm guessing tricks from any platform would help.


I think a similar question has been asked here...

https://answers.arnoldrenderer.com/questions/14378/toon-contour-lines-based-on-depth.html


Cheers,

Joshua


Tags (1)
Beschriftungen (1)
  • toon
17 ANTWORTEN 17
Nachricht 2 von 18
ramon.montoya
als Antwort auf: maruska

You are right, toon does not use depth to detect edges. We will look into adding that feature.

In the meantime, if you are not using UVS, you could

1) use a uv_transform shader as the root for your shading tree
2) pipe the uv_transform.offset.x to a length shader, whose length.input points to the camera position


With that setup the toon shader will see distance to current camera (i.e. depth) as U, and you can use uv_threshold to control where edges are inserted.


Nachricht 3 von 18
lee_griggs
als Antwort auf: maruska

Does reducing the angle_threshold or changing the edge_detection to geometric_normal help at all?

Lee Griggs
Arnold rendering specialist
AUTODESK
Nachricht 4 von 18
maruska
als Antwort auf: lee_griggs

8066-arnold-toon-anglethresholds.jpg


No difference between edge detection modes. I did a quick multi-frame output with the angle threshold keyed from 0º to 180º. Even at zero, the trailing edge of both the protruding cylinder and the square are missing.


I'm guessing the CAD data is dense enough that the edge mode makes little difference as these models don't typically play smoothing tricks found in a usual DCC model.

Nachricht 5 von 18
maruska
als Antwort auf: ramon.montoya

8067-screen-shot-2020-09-03-at-51905-pm.png

Did I do this right? It still looks the same. (This is with a 15º angle threshold)

Nachricht 6 von 18
lee_griggs
als Antwort auf: maruska

Maybe mesh->remesh/retopologise could help?

8068-1599201192458.png


Lee Griggs
Arnold rendering specialist
AUTODESK
Nachricht 7 von 18
maruska
als Antwort auf: maruska

I don't think it's a topology issue. This was modeled in Maya - just a cube and some offset extruded faces. Same condition though - the top faces are parallel so the back edge disappears.


8078-screen-shot-2020-09-04-at-83856-am.png8080-screen-shot-2020-09-04-at-83828-am.png



For giggles, here is a similar model - but two cubes on top of one another. They have been combined into one body so they share the same Toon ID (not typical of my models, but just to make a point). Both top faces are a single quad.8081-screen-shot-2020-09-04-at-84407-am.png



And as another example. This is the same Maya model where I took the top inner face and rotated it out of plane by 0.1º. The back edge appears because the two faces are no longer parallel - again, not a real world scenario, as I often have parallel faces.8083-screen-shot-2020-09-04-at-85252-am.png

Nachricht 8 von 18
CiroCardoso3v
als Antwort auf: maruska

Have you tried tweaking the UV threshold? I found that values between 0.1 and 0.2 adds some extra lines that can be useful.

Lead Enviroment Artist @Axis Studios

Arnold Discord Server


Ciro Cardoso

EESignature

Nachricht 9 von 18
maruska
als Antwort auf: CiroCardoso3v

That didn't seem to do anything. Maybe because there are no UV's on the model? I think that's what Ramon Montoya Vozmediano was looking at with the uv_transform.offset.x to length shader hook-up to pipe screen space information into the UV system.

Nachricht 10 von 18
maruska
als Antwort auf: maruska

@Lee Griggs do you have any more ideas on this use case?

Nachricht 11 von 18
lee_griggs
als Antwort auf: maruska

Can you upload the geo somewhere so that I can have a play with it?

Lee Griggs
Arnold rendering specialist
AUTODESK
Nachricht 12 von 18
maruska
als Antwort auf: lee_griggs

@Lee Griggs Sure thing. Here is the Maya file with both test objects.

ToonTool_example.mb.zip

Nachricht 13 von 18
lee_griggs
als Antwort auf: maruska

Sorry, I could only fix the right issue by separating the cubes.

8150-1600066986991.png

Lee Griggs
Arnold rendering specialist
AUTODESK
Nachricht 14 von 18
maruska
als Antwort auf: lee_griggs

Darn it. That’s cheating. Ha.

Nachricht 15 von 18
maruska
als Antwort auf: maruska

I think this is the answer. I need to stress test it a bit, but piping a aiCurvature node into Mask_Color did the trick.


8197-screen-shot-2020-09-17-at-85852-pm.png8196-screen-shot-2020-09-17-at-85508-pm.png

Nachricht 16 von 18
maruska
als Antwort auf: maruska

Going back to the original model, it does seem to work as I would like it to. I am using a couple different Toon shader instances to control when and where edges appear - such as the honeycomb pattern in the lower right where having everything outlined made the image very busy. Nice to have options!


8198-screen-shot-2020-09-17-at-92611-pm.png

Nachricht 17 von 18
lee_griggs
als Antwort auf: maruska

Nice trick! Glad you got it to work in the end.

Lee Griggs
Arnold rendering specialist
AUTODESK
Nachricht 18 von 18
thiago.ize
als Antwort auf: maruska

The just released Arnold 7.2.4 (and associated plugins) now properly finds these edges. https://arnoldrenderer.com/download/

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report