Author Topic: Improve wireframe rendering  (Read 8408 times)

2017-10-13, 21:20:08

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9258
  • Let's move this topic, shall we?
    • View Profile
    • My Models
It always bothers me why Corona does so bad job when rendering wire map on grazing angle surfaces. Is it because of filtering bluring? If so, can we have exposed that parameter in wire map GUI, so we can tweak it and try to find optimum value?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-10-13, 21:43:50
Reply #1

pokoy

  • Active Users
  • **
  • Posts: 1983
    • View Profile
Ouch. Does changing the image filter to other modes help with this in any way?

2017-10-13, 22:00:59
Reply #2

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9258
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I don't think that image filtering could help here a single bit, but i'll try it anyway.

Edit: nah, change between various filtering methods and even no filter at all, is barely perceptible.
« Last Edit: 2017-10-13, 22:05:19 by romullus »
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-10-13, 22:06:12
Reply #3

pokoy

  • Active Users
  • **
  • Posts: 1983
    • View Profile
I thought since it's not a texture map it's filtered through AA which would be done in the image sampler... Could be wrong, of course.

2017-10-14, 01:22:19
Reply #4

burnin

  • Active Users
  • **
  • Posts: 1642
    • View Profile
yup, play with AA or set the resolution higher then downsample

2017-10-14, 10:18:47
Reply #5

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9258
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Nope and nope. It's wire map's fault, it can't be fixed by image filtering nor by downsampling.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-10-14, 14:21:51
Reply #6

burnin

  • Active Users
  • **
  • Posts: 1642
    • View Profile
Ah, OK.
So to clear things out... Do you mean thicker lines on the sides (grazing angles) of your object?

Is this looking fine? (from C4D latest daily, 1.7 RC8)


2017-10-14, 15:43:23
Reply #7

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
The only "solution" I've found so far, is to use real world size instead of pixels. Have you tried that?

2017-10-14, 16:30:51
Reply #8

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9258
  • Let's move this topic, shall we?
    • View Profile
    • My Models
@burnin, yes extremelly thick lines at grazing angles is the thing that bothers me. Most of the time it's barely noticeable, but in certain scenarios it sticks like a sore thumb. Your exmple looks fine, but try to place the camera directly above the bottle and then move it slightly to the side, so side wall of the bottle would be visible at very grzing angle - you should get similar effect as in my example.

@PROH, thank you, world size indeed looks like a solution in that case. It's less convenient to use and in some scenes probably won't give acceptable results, but at least now, i'm pretty happy :]
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-10-14, 18:19:25
Reply #9

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13668
  • Marcin
    • View Profile
With px size it is expected that the further lines will appear thicker, because they will be the same thickness as the closer ones.
Other than that I think rendering a bit more passes would improve quality because of AA.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2017-10-14, 19:04:28
Reply #10

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9258
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Those lines are clearly NOT the same thickness. And i don't think that such result is expected. I've attached zoomed in version, so you can better see what's going on. Pix size in this render was set to 1 px, but in output, wireframe came out 9 px wide. No amount of AA would ever deal with this.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-10-14, 22:35:25
Reply #11

burnin

  • Active Users
  • **
  • Posts: 1642
    • View Profile
Ah, yes.



Pixel width size is screen space relative.  Feels like some kind of border case bug.

Next example shows camera moved by a small margin (~0.1mm)




I wonder if it's precision issue? Can it be solved? How then & is it worth it?

Had occasionally observed similar in blenders freestyle, bypassed by doing larger viewport render and composited back. Since i never used for more than an informational value (no artistic or other meaning). 

PS
It's also the reason why i prefer working with World units (also for bump&displace), as i know better what to expect - i often switch through different previews (formats, angles, resolutions) during workflow. But as it can be seen, both approaches have their pros & cons.
« Last Edit: 2017-10-14, 22:41:09 by burnin »

2017-10-14, 22:52:40
Reply #12

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9258
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I don't think it's borderline case, I'm doing quite a few wireframe rendering and this behaviour bothers me a lot. Issue is less noticeable when choosing sub-pixel line width, but is very evident (and ugly) when line width is ≥ 1 V-Ray can render perfect wireframes in both modes and i believe that Corona should be able too.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-10-15, 02:28:19
Reply #13

burnin

  • Active Users
  • **
  • Posts: 1642
    • View Profile
Yup, i agree & support your effort for improvement. The more i think about it, this should be reported as a bug... & hopefully VRay tech will come to the rescue ;)

2017-10-16, 09:52:58
Reply #14

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13668
  • Marcin
    • View Profile
Ok, something is definitely wrong here.
In the image from the 1st post I thought the thick lines are actually multiple edges.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us