screwing around with architecture

Started by TheBadger, July 04, 2015, 10:57:23 PM

Previous topic - Next topic

TheBadger

QuoteMaybe you could try vector displacement or small real displacements if nothing works.

THe first idea was to sculpt on top of what you have seen, and then import high res sculpt. But after seeing fleetwood's work and talking with him, I decided that doing it in TG would be best, since that is where I will render. Now I don't know... Kinda irritated by this.
It has been eaten.


Kadri


Have you tried to export from other programs you might have?

Kadri


I tried some more.
If you uncheck "Do ray traced shadows" in the "Extra" tab in the render node it looks more like it should be.
That is maybe why the object surfaces don't look like they explode but still as they are exploded.
Only a shadow problem maybe like talked about in Jmeyer's thread.

bobbystahr

something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Kadri

#95

Quote from: bobbystahr on July 11, 2015, 08:04:09 AM
shadow?

I mean this what Paq said.Not sure how right or wrong but it looks as it is so:

"Gouraud shading will smooth the normals to make a polymesh looking smooth, but raytrace shadow use the 'real' geometry to compute the rays. As a result gouraund shading and raytrace self-shadow dont match.
You can easily see why if you render the mesh without any smoothing."

From here:
http://www.planetside.co.uk/forums/index.php/topic,20209.msg200039.html#msg200039

j meyer

Only an option if you don't need drop shadows,though,mind you.

TheBadger

#97
Quote from: Kadri on July 10, 2015, 05:33:08 PM

Have you tried to export from other programs you might have?

No.

I don't have anything else like Maya. I know that I will buy modo as soon as I have the cash. But nothing else right now. Curious how Houdini would act in this situation as well.

I will try everything we talked about in this and the other thread. IN the end I may just sub-devide. but I want to learn more about re- applying normals in maya before I move on.
It has been eaten.

Matt

It appears that the corners are breaking apart because the displacement is displacing outwards along the face normals. In the test where you put the displacement up really high and said that the corners were not exploding, it looks to me like it is still breaking apart because there's a bright band in the middle of the pillar in the foreground; it looks like we can see through to the other side where it's in sunlight.

At every position on the surface, the surface is displaced (moved) in the direction of the normal. If your model has built-in normals and "Use smooth normals" is checked in TG, the model's normals are used and interpolated across each face. If not, normals are derived automatically from the faces, and they are not smoothed, although we are planning to add a feature to do this in future. More on that below.

Face normals aren't the same as vertex normals. We need vertex normals to tell the renderer how to shade the edges and vertices identically across neighbouring faces. Otherwise each face ends up doing its own thing and can break away from the others when displaced.

If the normals are continuous across the edges of faces, displacement shouldn't break the surface, but often the normals are not continuous.

When you generate these normals in another program, the creasing threshold or creasing angle (may be called something different) affects which edges the program decides to smooth. If this threshold is set to create some sharp/creased edges, then it does this by creating different vertex normals on each face. If this happens, the displacement will not be continuous across the edge, and it will break apart.

Maybe there are different smoothing groups. I am not sure how that affects the normals that are seen by Terragen.

We are aiming to add an auto-generate-smooth-normals option in future, so you don't necessarily have to do this when you build your model. However, even with such a feature, you need to model your corners in such a way that the smoothing does what you want.

IANAM (I am not a modeler), but...

At these corners you need to model in some extra polygons to round/fillet/chamfer (or radius) the corners (I see that you've done this). This is a good way to tell a renderer exactly how sharp or smooth you want to the corner to be and what normals it should displace along. Then use your modeler, or PoseRay, or in future Terragen, to generate smooth normals.

If this isn't working, try displaying the normals in the Maya viewport and see what they are doing. Face normals aren't the same as vertex normals. If it's showing you one normal per face, that won't give Terragen enough information to smoothly transition across edges of faces. You want to see a normal at each vertex. If there is more than one normal at a vertex and they point in different directions, then that will produce a sharp edge when shaded and will tear apart when displaced.

I'm not a modeler, but IMHO you should take care of normals as part of the modeling process, and this only becomes more important when you intend to render it with displacements. Think about what those faces will do when they are displaced along the normals. As long as "Use smooth normals" is checked in TG, these normals will be change smoothly across the surface when rendered by Terragen. If neighbouring faces share the same normal, it should render smoothly without breaking apart.

Let's look at what happens when you don't have these vertex normals, or if the vertex normals are set to produce sharp edges. Try to imagine you are a renderer (!)  Here is a face that you've been asked to displace. Everything you know about the face (the polygon and the normals) tells you it faces in direction X. So you are going to move all of its surface in that direction. Any other direction would probably be wrong, because you want the bumps in the surface to displace in and out of that normal. Then there's another face adjacent to the first one. The second face has a different normal. You displace the second face along the second face's normal. This makes the two faces move away from each other, creating a gap. Let's try to patch up the gap. How? Add more polygons at render time? OK, that might work. But the texture on the patched up polygons will be stretched across the gap, due to both edges sharing the same UV. That won't look good. It would be better if the model had these "patch" polygons built into it to begin with. They would have UVs and normals so we could simply displace those surfaces with the displacement texture.


Perhaps the renderer could automatically generate these patch/chamfer/rounding polygons for you. This is possible. The user would need to tell the renderer the radius of the corner. Maybe this could be set per model or per material, but there will be many times where you want control this at different parts of the model. If the model already has these round edges built-in, it would be wasteful to add additional polygons. It would be difficult to try to detect whether these already exist, although I can imagine some kind of "minimum radius" approach to analyzing corners prior to rendering.

I've seen that V-Ray has a "keep continuity" option for this kind of situation. I'm not sure how it works, but I guess that it might smoothly interpolate the displacement normal across the whole face and ensure continuity with the neighbours, decoupled from the shading normal which is kept sharp. I've thought about offering that as an option. It might work well for organic models but I don't think it's ideal for architecture.

Do other renderers have better ways of handling this? I don't mean the "auto generate normals" idea. We're already planning to add that in future, but you still need to be careful about how you model corners in architecture.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Matt

Quote from: TheBadger on July 10, 2015, 01:14:25 PM
Yeah, it is easy to break things in Maya too. But also, Maya has a lot of bugs. You probably don't remember, but before when I was working on this, the reason I quit it, was Maya destroyed all my UVs when I used an auto function called "layout". I spent so much time doing the UVs (making every stone have its own UV space so every stone would look different in TG) and when Maya broke it I went temporarily insane. PArt of my problem is I modeled every stone out of one larger part using edge loops, as I rebuild it I will make all the stones on their own.

I don't think that's a bug. Isn't this exactly what the Layout feature is designed to do? Modify your UVs?

http://knowledge.autodesk.com/support/maya-lt/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/MayaLT/files/Edit-UVs--Layout-htm.html

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Matt

I hate to write so much about normals without adding a visual anchor, so... maybe this helps. (Nothing about displacement or chamfering though.)

http://www.3dtutorialzone.com/tutorial?id=86
Just because milk is white doesn't mean that clouds are made of milk.

Kadri

Quote from: Matt on July 13, 2015, 06:33:08 PM
..We are aiming to add an auto-generate-smooth-normals option in future, so you don't necessarily have to do this when you build your model. However, even with such a feature, you need to model your corners in such a way that the smoothing does what you want.
...

Nice. And good info.The last link is very informative too.Thanks.


TheBadger

Quote from: Matt on July 13, 2015, 06:38:53 PM
Quote from: TheBadger on July 10, 2015, 01:14:25 PM
Yeah, it is easy to break things in Maya too. But also, Maya has a lot of bugs. You probably don't remember, but before when I was working on this, the reason I quit it, was Maya destroyed all my UVs when I used an auto function called "layout". I spent so much time doing the UVs (making every stone have its own UV space so every stone would look different in TG) and when Maya broke it I went temporarily insane. PArt of my problem is I modeled every stone out of one larger part using edge loops, as I rebuild it I will make all the stones on their own.

I don't think that's a bug. Isn't this exactly what the Layout feature is designed to do? Modify your UVs?

http://knowledge.autodesk.com/support/maya-lt/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/MayaLT/files/Edit-UVs--Layout-htm.html

Matt

Thanks in advance for all you wrote. Ill read it tonight.

On UVlayout. IT does do what it is supposed to, that is layout your UVs in space. But it also destroyed the project (the part I was working on at the time). I could no longer open it in mud box for example. and there where other issues it created too, there were known bugs with it. But I have since upgraded, I don't know if the issue was fixed, and I don't want to try it either, at least on this model due to all the faces, it took a very long time to unwrap and put back together.

It worked really great for what it was supposed to do, but it ruined it also did things that it was not meant to. I can't recall now after all this time what it did and I don't want to try and recreate the problem to get the warnings or search out the bug description on line. But at the time, I learned it was a known bug. I posted on it in this forum at the time.

The only fix was to re-unwrap and put back together all of my UVs with the cuts where I wanted them. And that is what put me off on this project until now.
It has been eaten.

Matt

That does sound pretty bad. Do you use incremental save (either Maya's built-in incremental save, or just old fashioned saving with a different number each time)? If something goes wrong, you always want earlier versions of your project that you can fall back on.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

TheBadger

#104
I read through your posts above,
gotta say that was about the most helpful posting on this topic I have come across on the net for this topic.

Really appreciated the sentence
QuoteIMHO you should take care of normals as part of the modeling process, and this only becomes more important when you intend to render it with displacements.
I have to agree now.
This thread has turned out to be rather educational for sure.

QuoteDo you use incremental save

Oh man, I am really terrible about this. I know in that respect it is my fault. But thank you for the sympathy.
The optimist in me says everything will work out fine, which is funny because I am a pessimist waiting for the sun to explode. I will start saving incrementally from now on.
It has been eaten.