Any tips on displacement of crisp edges?

Started by andy.engelkemier, February 25, 2020, 08:31:00 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

andy.engelkemier

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?


DriesV

#1
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

DMerz III

This is the ideal answer  :)

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

Finema


mattjgerard

Quote from: DMerz III on February 27, 2020, 11:30:07 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.

andy.engelkemier

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.

mattjgerard

try hitting the refresh button in the texture node filed where the name of the texture is, that has always worked for me.

DMerz III

Quote from: mattjgerard on February 28, 2020, 07:38:33 AM
Quote from: DMerz III on February 27, 2020, 11:30:07 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

TGS808

Quote from: mattjgerard 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.

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.

mattjgerard

Quote from: TGS808 on March 03, 2020, 04:55:43 PM
Quote from: mattjgerard 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.

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.

andy.engelkemier

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.