PDA

View Full Version : export from LW to udk without smoothing errors?



Svenart
07-31-2011, 01:07 PM
Hello,

Im trying to export models from Lightwave to Udk, but unfortunately I have some problems with the smoothing. In Lw, everything looks like it should but after exporting it looks like the attached image.

I readed a lot of interesting posts in different forums about this, and tried it in a lot of ways but no one worked.

I tried to export as collada, using walfridsons ASE exporter, using max with set smoothinggroups, tried the blender ASE export with different versions but everywhere the same result with smoothingproblems.

Does anyone here can help me with this? :help:

I also have attached the testmodel in lwo format.

Elmar Moelzer
07-31-2011, 01:54 PM
The problem is that you are gauraud (smooth) shading a wall that should be flat. Graphics cards will generally smooth shade over connected (closed) vertices.
In order to make a sharp crease, you have to cut the polygons and paste them back in, where you want the crease to be. So that e.g. the wall is not connected to the roof anymore. Other applications have smoothing groups, but internally they are really just physically separating the polygons along the sharp crease.
The only other way to get a correct shading would be to use pixel shading with a fitting normal map.
That might be more work than necessary though in your case.

hrgiger
07-31-2011, 06:38 PM
Is the model tripled or does it have a lot of ngons?

EDIT: Nevermind. just noticed you posted the object.

MicroMouse
07-31-2011, 07:09 PM
1. The LWO file was imported into AccuTrans 3D.

2. The 'Tools -> Calculate Hard Smoothing Normals' menu command was used to calculate the vertex normals as this calculation tries to preserve the sharp creases.

2. The model was exported as a Collada DAE file.

Give this Collada file a try in UDK to see if it gives you acceptable results.

Wayne

Elmar Moelzer
07-31-2011, 08:23 PM
The object is a bit messy, so taking it apart was rather complicated. I only did it for a few of the faces. Give it a shot and see whether it looks better in UDK. If I am right, just fix the remaining issues the same way I did.
Good way to see what will be problematic in Modeler is to turn up the smoothing angle to 179 degrees.

probiner
08-01-2011, 07:54 AM
The problem is that you are gauraud (smooth) shading a wall that should be flat. Graphics cards will generally smooth shade over connected (closed) vertices.
In order to make a sharp crease, you have to cut the polygons and paste them back in, where you want the crease to be. So that e.g. the wall is not connected to the roof anymore. Other applications have smoothing groups, but internally they are really just physically separating the polygons along the sharp crease.
The only other way to get a correct shading would be to use pixel shading with a fitting normal map.
That might be more work than necessary though in your case.

That is the routine I also use when I want to export an OBJ with vertex normal map embeded. But it's not great is it? Chopping down a model is time consuming and well, there goes point order...

See this and cry :o http://www.youtube.com/watch?v=O_7tHqgqpvw&t=1m37s

Baking a Normal Map is easy, problem is that you still got to have the correct smoothing at bake time, which take us back to the first issue.

warmiak
08-01-2011, 07:54 PM
The problem is that you are gauraud (smooth) shading a wall that should be flat. Graphics cards will generally smooth shade over connected (closed) vertices.
In order to make a sharp crease, you have to cut the polygons and paste them back in, where you want the crease to be. So that e.g. the wall is not connected to the roof anymore. Other applications have smoothing groups, but internally they are really just physically separating the polygons along the sharp crease.
The only other way to get a correct shading would be to use pixel shading with a fitting normal map.
That might be more work than necessary though in your case.

This should be really done thru an exporter.... It is not hard to do I remember implementing it for SMD exporters.
Lightwave does have smoothing groups of sorts .... separate materials with different smoothing settings but I found personally, it was easier for me to simply separate faces.

Elmar Moelzer
08-01-2011, 08:09 PM
separate materials with different smoothing settings but I found personally, it was easier for me to simply separate faces
Which is what happens internally anyway.

Elmar Moelzer
08-01-2011, 08:17 PM
Baking a Normal Map is easy, problem is that you still got to have the correct smoothing at bake time, which take us back to the first issue.
Well inside LW the smoothing is correct, it is just not correctly transfered to the 3D engine.
Unity handles this rather nicely, btw. You can adjust the smoothing pretty much like in LW with it.
Ideally there would be an automated process for this.

Tima
09-01-2011, 05:14 PM
the smoothing group problem come from the simple fact, that the lightwave collada exporter don't write any vertex normals data in your exported file.
as micromouse has suggest it, you need to find a way to regenerate the vertex normal data.
but the FBX exporter do the job, so you can use this format to exchange with other 3d softwares, or with UDK, the FBX support is really better with the latest update of UDK.