Smoothing displacements Created 14 years ago2009-10-14 01:26:15 UTC by Soup Miner Soup Miner

Created 14 years ago2009-10-14 01:26:15 UTC by Soup Miner Soup Miner

Posted 14 years ago2009-10-14 01:28:07 UTC Post #274357
I need to smooth out the way light hits my displacements. Right now it does this:
User posted image
User posted image
It's really annoying.
How do I smooth off these surfaces?
Posted 14 years ago2009-10-14 01:51:37 UTC Post #274358
Assuming all the faces are lined up with the adjacent faces, you can use the subdivide button. It tends to get things 'too smooth', so you'll probably have to roughen things up a little, heh.
TheGrimReafer TheGrimReaferADMININATOR
Posted 14 years ago2009-10-14 02:11:23 UTC Post #274363
are you running full vis and rad?

i know there's some kind of quirk with displacement lighting...
Trapt Traptlegend
Posted 14 years ago2009-10-14 20:38:52 UTC Post #274373
They are subdivided, just with some random noise thrown before being sewed back together. They're already smooth, it's just that rad seems to be lighting them according to the sharp edges that were there before the subdivision.

I'm running fast vis and full rad, but there couldn't possibly be lighting issues because I'm not running full vis could there?

Edit: Jesus, it happens to flat displacements too.
User posted image
User posted image
These displacements all share common vertices, and they're all totally flat. What the fuck is this?!
Posted 14 years ago2009-10-14 20:48:30 UTC Post #274386
Try increasing the lightmap scale higher / lower?
Luke LukeLuke
Posted 14 years ago2009-10-14 21:27:42 UTC Post #274387
Son of a bitch, you're right.
User posted image
I don't even know what to make of this. I mean, obviously changing the lightmap scale isn't going to fix it.
Posted 14 years ago2009-10-14 21:28:14 UTC Post #274388
I bet it will. DO IT.
Luke LukeLuke
Posted 14 years ago2009-10-14 21:49:31 UTC Post #274389
I want to harm small children because of this crap. A displacement's lightmap can be perfectly normal and changing one vertex by one unit can cause everything to go batshit crazy.
I have no idea how to fix something like this.
Posted 14 years ago2009-10-14 22:03:16 UTC Post #274390
Make the lightmap of the displacement along the wall fairly high, and make the one on the corner low. I have an intriguing idea.
Luke LukeLuke
Posted 14 years ago2009-10-14 22:05:30 UTC Post #274391
What's your idea?
Posted 14 years ago2009-10-14 22:21:58 UTC Post #274393
Just do what I said because I said it.

Seriously, try it.
Luke LukeLuke
Posted 14 years ago2009-10-14 22:27:28 UTC Post #274394
For fuck's sake, I don't even know what you're asking me to do.
All the displacements are along a wall and are touching some corner. Stop being an asshole, just tell me what you think will happen.
Posted 14 years ago2009-10-14 22:28:34 UTC Post #274395
Never mind. I'm too lazy to explain it further. ;[
Luke LukeLuke
Posted 14 years ago2009-10-14 22:34:42 UTC Post #274396
Yeah you're really fucking funny.
Posted 14 years ago2009-10-14 23:53:18 UTC Post #274397
pwned :pwned:

EDIT: Wait a tick, aren't lightmaps effected by the texture coordinates? can you select them and click "world" or something or adjust them like in goldsource? (just a thought)
Rimrook RimrookSince 2003
Posted 14 years ago2009-10-15 00:25:28 UTC Post #274399
Already tried about a thousand times, but they just don't work that way. I fucking wish they would, shit it would at least make sense.
This is the only other instance I can find of this problem:
http://www.interlopers.net/forum/viewtopic.php?f=2&t=26940&start=0
And he never got it fixed.
Posted 14 years ago2009-10-15 00:37:56 UTC Post #274400
I don't know what you did, but if your lightmap preview looks like that then you've done something horribly wrong.
User posted image
Seriously, how did you build these displacements? Destroy them, create them again, they should be even squares.

What do the lightmaps look like on the short walls from your first screens? Have you tried using smoothing groups, too?
Strider StriderTuned to a dead channel.
Posted 14 years ago2009-10-15 00:44:37 UTC Post #274401
I've destroyed them and created them again a hundred times over. That's just what happens to the lightmaps when I make the damn displacement. And if I move just one vertex by one unit, the lightmap looks completely different but still totally fucked up.
And why do they have to be even squares? They weren't even squares for this guy and he doesn't have any of these problems and it's driving me batshit insane.
Posted 14 years ago2009-10-15 00:53:09 UTC Post #274402
I think that displacement in the pic above on the lower left is too big, just by looking at the grid. Same with the top middle-left one.

As for that angled one (I hope that's angled): I think if you made it a square it would stop being retarded.

This is just me, and I probably have no idea what the fuck I'm talking about.
Luke LukeLuke
Posted 14 years ago2009-10-15 01:00:13 UTC Post #274403
And why do they have to be even squares? They weren't even squares for this guy and he doesn't have any of these problems and it's driving me batshit insane.
I mean the lightmap grid initially. Obviously through subdividing and shaping it will change.

But it should never look like it does in that pic. They're either shaped in the most horrible way, or something's just plain broken for you and displacements are acting up.

Edit: displacements will also try to blend lightmaps together between adjacent displacements, provided vertexes line up correctly (and the initial brushes do too).
Strider StriderTuned to a dead channel.
Posted 14 years ago2009-10-15 02:24:25 UTC Post #274406
No idea how to fix the first ones, but if the displacemet surfaces are perfectly fat in map #2, why not use brushes?
Daubster DaubsterVault Dweller
Posted 14 years ago2009-10-15 03:01:00 UTC Post #274408
upload vmf to the problem maps vault and let us have a look at it for you. it looks like you're doing something horribly wrong, but i can't really say anything till i've seen the vmf...
Trapt Traptlegend
Posted 14 years ago2009-10-15 18:17:16 UTC Post #274427
No idea how to fix the first ones, but if the displacemet surfaces are perfectly fat in map #2, why not use brushes?
I need to be able to use blending on the ground there.

Ok, I've slept on it and have calmed down a bit. Let's take a step back for a moment and look at the original geometry I used for my displacements.

Before being displacements, this terrain looked like this:
User posted image
It was then turned into displacements, subdivided, and noised up accordingly.

And before being flat displacements, this section of the ground looked like this:
User posted image
I did it this way so that the ground would wrap perfectly around all the walls/buildings, ergo making texture blending around the walls much easier to manage. And it was easier to manage until this lighting issue came up.

Now what is inherently wrong about making displacements like this? I know I'm not the only one to do it this way. Everybody doesn't just build perfect displacement squares and go about their merry way. And why does Source have this tendency to fuck up lightmaps on displacements?

If I absolutely, positively have to make squares and rectangles out of the flat part then I will, but I know it will be a pain in the ass to manage in Hammer and it won't actually fix the problem that is affecting both my terrain and the flat part. I can't just make squares out of the cliffs, and I'm using exactly the same method that the Dear Esther guy is using.
I'm considering just emailing the guy and asking him how he avoided it.
Posted 14 years ago2009-10-15 19:48:35 UTC Post #274430
Annoying Source is annoying.

If you don't mind, i'd like to have a look at the vmf file and try to fix it for you.
The Mad Carrot The Mad CarrotMad Carrot
Posted 14 years ago2009-10-15 20:10:08 UTC Post #274433
Posted 14 years ago2009-10-16 10:22:27 UTC Post #274437
Well, time for bed.

I can already tell you that this:
User posted image
does not occur on my end, but this:
User posted image
does.

Also, i turned out that some displacement faces of those brushes don't line up with one next to it. Hard to explain. Basically, one brush had a power of 2, while the one next to had a power of 3. I believe this is probably one of the culprits of the problem.

Ill make some screenshots tomorrow to make the point more obvious

I also think that Source doesn't like overly stretched displacement surfaces.
Ill experiment tomorrow.

Edit:

Check it out:
User posted image
See those vertices marked red in the 3D window and marked yellow in the Top grid window? They don't line up with vertices of the brush next to it, because one brush has a power of 2 and the other power of 3, as seen here:
User posted image
User posted image
You want to keep the power the same for every adjacent displacement brush to prevent seems to appear during alpha drawing.

However, the above did not fix the problem, but check out what happend when i temporary remove the middle building:

With building:
User posted image
Without building:
User posted image
So i guess that some of the surrounding buildings are causing somesort of facesplitting, making shadow and light distribution go haywire on displacement.

As for these:
User posted image
I have no idea what is causing that, those displacements look fine to me.

That's all i can do for now.

Good luck!

Map is looking great btw! :D
The Mad Carrot The Mad CarrotMad Carrot
Posted 14 years ago2009-10-16 10:33:40 UTC Post #274466
Can you humor me and post a screenshot of the terrain from your compile?

Also the building isn't causing face splitting, especially not on a displacment since displacements don't get split up like that. The distorted lightmap is causing the shadow that falls over that piece along the building to fall off into the sunlight a light faster than the normal displacements around it. Unfortunately, any shadow over it will look the same.
Posted 14 years ago2009-10-16 12:32:59 UTC Post #274471
Can you humor me and post a screenshot of the terrain from your compile?
I did. The only issue is this:
User posted image
The rest of the terrain around that building looks fine.
The Mad Carrot The Mad CarrotMad Carrot
You must be logged in to post a response.