Page 1 of 1
"non-linear" displacement maps
Posted: Tue Nov 16, 2010 6:35 am
by Frutiger
So here's the deal. I'm trying to create a method for creating a smooth curve for a displacement map. For example, if one was trying to create a corrugated metal siding texture or a cap molding for tiles like the attached file.

- Desired Effect.
- 36VC00.gif (21.62 KiB) Viewed 4682 times
Creating linear gradients in photoshop doesn't quite cut it.
Here's as close as I've been able to get using photoshop.

- Displacement Map for Cap Molding
And here's the rendered results. Ignore the ugly grout lines, that's just me being sloppy while I'm trying to figure this out.

- Cap Molding Displacement Test FAIL
As you can see, even when smoothed out it's not quite right. Ideally I'd be able to create rounded "parabolic" gradients instead of smoothed linear ones, but I haven't figured out how yet. Any ideas?
Re: "non-linear" displacement maps
Posted: Tue Nov 16, 2010 6:40 am
by Frutiger
And if someone tells me to just use ISL, I'll come to your house and punch you.
Re: "non-linear" displacement maps
Posted: Tue Nov 16, 2010 7:43 am
by StompinTom
Just use IS... um.
Make a linear gradient, then apply a different gamma curve to it. In theory, as far as I can tell, the shape of the gamma curve should correspond to the shape of the curve.
Photoshop -> Curves
This occurred to me one time when I was after something similar though I don't think I ever really seriously tested it. I'd be interested to see how it turns out, though...
Re: "non-linear" displacement maps
Posted: Tue Nov 16, 2010 8:12 am
by dag
The time it takes to create a map like that, you would be finished modelling it instead, and for displacement you need high geometry so it's not really worth it.
Black-white-black gradient, then fiddle around with curves and levels.
Re: "non-linear" displacement maps
Posted: Tue Nov 16, 2010 8:30 pm
by snorky
tile:

- tile.png (9.09 KiB) Viewed 4633 times
roof:
Re: "non-linear" displacement maps
Posted: Tue Nov 16, 2010 11:41 pm
by Zom-B
Subdiv + smoothing is still broken since some time

It can create some strange UVM problems that also messes with the displacement.
Glare told that they'll have a look at it just recently, so we might get lucky
for some of the next releases

Re: "non-linear" displacement maps
Posted: Wed Nov 17, 2010 8:22 am
by CTZn
Beside issues that were not demonstrated in this thread, meshes subdivision in Indigo comes with various options wich are managed differently depending on the exporter you use.
At some point it may become necessary to hand edit the <mesh> definition in the IGS. Options such as:
Code: Select all
<normal_smoothing>true</normal_smoothing>
<merge_vertices_with_same_pos_and_normal>true</merge_vertices_with_same_pos_and_normal>
<wrap_u>true</wrap_u>
<wrap_v>true</wrap_v>
<max_num_subdivisions>10</max_num_subdivisions>
<subdivision_smoothing>false</subdivision_smoothing>
<displacement_error_threshold>0</displacement_error_threshold>
<view_dependent_subdivision>false</view_dependent_subdivision>
to name them, have a great impact on the result.
Could you post the IGS mesh options for the tile ? (not the geometric data if present please).
PS: I'm seconding the tip on curves (aka texture gamma, aka texture exponent). Your issue may come from displacement_error_threshold being positive, perhaps also curvature dependent subdivisions. Set both to -1 if present.
Re: "non-linear" displacement maps
Posted: Wed Nov 17, 2010 4:29 pm
by Frutiger
I think Dag spaketh verily. Just modeling the tiles out took less time, but was a little less elegant of a solution.
Here's a little context of the application that prompted this thread.

- Context
It'd be nice to just have a good texture to throw on there seeing as putting all those in was a little tedious.
Are you guys saying that even if it was executed correctly, one of these curved displacement maps would still be non-functional?
Re: "non-linear" displacement maps
Posted: Fri Nov 19, 2010 9:37 pm
by galinette
I Fully agree that modelling this instead of having it done with displacement will make it more precise and cleaner.
If you absolutely want to do it through displacement, it is better not to use subdivision. Make it enough subdivided in the modeller instead. Subdivision is not very accurate for regular precise patterns.