Author Topic: Any tips on displacement of crisp edges?  (Read 561 times)

0 Members and 1 Guest are viewing this topic.

Offline andy.engelkemier

Any tips on displacement of crisp edges?
« on: February 25, 2020, 08:31:00 am »
Usually I'd model in graphics that are...well, modeled in. But when working with a client, if I don't have artwork when I start the project I can't do that. So into keyshot it goes.

So I have markings on a transparent surface that have molded in graphics. I was going to use displacement to do that. BUT, I can never quite get the edges to look great. I keep increasing the resolution of the graphic (it's a smart object in photoshop, so it's regenerating when I resize) but that doesn't seem to have much of an effect. So increase triangle limit?  Decrease triangle size? I just can't seem to get away from jagged edges.

On materials that are opaque and aren't too shiny, not so bad. But if they are Really glossy, or transparent, those saw tooth edges just really get accentuated.

Just curious if there are any great tips. Back when I used Vray, they had some tools specifically for this. Blender, same. So just curious if there's a good way to pull it off in keyshot. It could save me a Bit of time because I don't have to actually send the chunk of model out to DCC, model it, then send it back, which Also might break my graphics at this point because I have multiple labels applied with one multimaterial. That can save Lots of time and potential mistakes, but right here is the downside. You mess up the model tree in any way and you have to redo All your labels (sometimes, and in my experience - often)

Update: Well, I guess I'm modeling them in.
Instructions are inset -.2 to -.3mm.
For a 7x5mm area I ended up around 1800pixels in x. I'm estimating there. Anyway it's currently 6400dpi. That seems a bit extreme, because it is. I see virtually no change in smoothness between 600dpi and 6400dpi. It changes, but not for the better.
I tried changing triangle size down to .000001mm but that didn't help either. Anything past .001 doesn't really change anything, which actually makes sense given the pixel size is likely close to that.

So was just curious if there's a way to get crisp edges. Basically, I need it to interpret antialiasing as an angle?

« Last Edit: February 25, 2020, 01:16:35 pm by andy.engelkemier »

Offline DriesV

  • Administrator
  • Hero Member
  • *****
  • Posts: 2529
  • Total likes: 33
  • Product Specialist at Luxion
Re: Any tips on displacement of crisp edges?
« Reply #1 on: February 27, 2020, 01:44:34 am »
Hi Andy,

My best advice would be to apply a blur to the displacement texture.
Having smooth gradients in the texture allows the Displace geometry shader to create a smooth falloff between high and low areas. It's the oly way to avoid those jagged edges. Of course, because of the falloff, the extruded faces will have a slight angle and edges will get rounded a bit.
Is that an acceptable compromise? Especially in molded plastic, embossed/debossed details like text will always have some draft angle and a small radius on edges.

Here is an example of a non-blurred and blurred texture with the same displacement settings.

Dries
« Last Edit: February 27, 2020, 01:47:29 am by DriesV »

Offline DMerz III

Re: Any tips on displacement of crisp edges?
« Reply #2 on: February 27, 2020, 11:30:07 am »
This is the ideal answer  :)

I do wish there were a 'blur' node in Keyshot though!

Offline Finema

Re: Any tips on displacement of crisp edges?
« Reply #3 on: February 27, 2020, 10:05:19 pm »


I do wish there were a 'blur' node in Keyshot though!

+1  :)

Offline mattjgerard

Re: Any tips on displacement of crisp edges?
« Reply #4 on: February 28, 2020, 07:38:33 am »
This is the ideal answer  :)

I do wish there were a 'blur' node in Keyshot though!

I remember Esben posted a request for this a long time ago in KS7 I think, and the general response was "aint going to happen", but not sure why. Blur node would be very useful.

Offline andy.engelkemier

Re: Any tips on displacement of crisp edges?
« Reply #5 on: March 02, 2020, 07:10:09 am »
Thanks for the reply. I suppose since I have it as a smart object in Photoshop I can just blur a bit, and retry. Change it a bit, and retry.
I Have been getting some Real issues updating though. It seems it sometimes works, and sometimes doesn't. I'll update the file, I'm using PSD directly. Then I hit refresh on the geometry, but sometimes it doesn't update. So I have to just delete the texture node and create another. And I think if I duplicate the texture node, and just connect the copy, then it updates. I can't quite remember, but I know it only Sometimes works. That makes making a change and updating difficult because it's hard to know if there's a difference until you go Extreme and realize it didn't do anything.

Offline mattjgerard

Re: Any tips on displacement of crisp edges?
« Reply #6 on: March 03, 2020, 05:41:27 am »
try hitting the refresh button in the texture node filed where the name of the texture is, that has always worked for me.

Offline DMerz III

Re: Any tips on displacement of crisp edges?
« Reply #7 on: March 03, 2020, 07:53:03 am »
This is the ideal answer  :)

I do wish there were a 'blur' node in Keyshot though!

I remember Esben posted a request for this a long time ago in KS7 I think, and the general response was "aint going to happen", but not sure why. Blur node would be very useful.

Yeah - I remember it being suggested, can't remember why it was denied

Offline TGS808

Re: Any tips on displacement of crisp edges?
« Reply #8 on: March 03, 2020, 04:55:43 pm »
try hitting the refresh button in the texture node filed where the name of the texture is, that has always worked for me.

I find that sometimes, even that doesn't work. It's like the image gets cached or something. In those instances, I've found changing the name of the file will force it to update. That was before I picked up this little gem from Richard:

https://www.keyshot.com/forum/index.php?topic=25650.msg107848

Talk about buried treasure. This has worked for me without fail since I found out about it.

Offline mattjgerard

Re: Any tips on displacement of crisp edges?
« Reply #9 on: March 04, 2020, 08:45:27 am »
try hitting the refresh button in the texture node filed where the name of the texture is, that has always worked for me.

I find that sometimes, even that doesn't work. It's like the image gets cached or something. In those instances, I've found changing the name of the file will force it to update. That was before I picked up this little gem from Richard:

https://www.keyshot.com/forum/index.php?topic=25650.msg107848

Talk about buried treasure. This has worked for me without fail since I found out about it.

Yep, I recall that same behavior. I rev all my changes so that there is no confusion, and that has taken care of all the issues, like you did.

Offline andy.engelkemier

Re: Any tips on displacement of crisp edges?
« Reply #10 on: March 05, 2020, 10:08:18 am »
The refresh button always loads the new image for me. If I check the map by hitting C on the node, it's updated. But it doesn't update the geometry node until I "change" it. And I put that in quotes on purpose. Because I can change it from 0.3 to 0.30 and all of the sudden it lets me regenerate.
So it's just a slight oversight in programming (or maybe a bug) where they forgot to cue the geometry node that there's been a change on image refresh.

And I do like the idea of using revs, but if I rev everything then my project starts to get Really crowded with rev files. Then I should really clean those up prior to archiving so I don't use up so much space. Too many downsides for my workflow. I use revs when I do something destructive. That's it. Very little of my workflow is destructive, so I'll just save again and refresh and deal with remembering to add an unnecessary zero to one of the numbers so it can regenerate.