PDA

View Full Version : Surface Baking Problem Troubleshoot?



aaronv2
03-24-2009, 03:26 AM
I have tried to make a UV map and using radiosity and baking camera bake the illumination to an image. Everything is going okay except when I hit render there appears to be little clusters of dots over some of my polys on my map that is generated. It also appears on fprime but a little more blotchy.

Turning all light and radiosity options off they still appeared causing for the most part frustrated curiosity... I also noticed that the dots would take upon the color of the backdrop wether it was a simple color gradient, skytracer, or hdri image or even having a complete black backdrop, black dots would appear on the map. I am assuming it could be either bad UVs or something I have overlooked. Is there anyone who has had experiences like this before?

I have tried many times to make a simple atlas UV map with usually the same results. All points are merged and the geometry seems to be tight.

Can anyone columbo this out for me?

Sensei
03-24-2009, 04:53 AM
Setting Border to f.e. 2 pixels show this problem even more...
I have tried LW v9.3 and LW v9.5 and it's the same..

Kirdian
03-24-2009, 06:47 AM
This UV map has some overlapping polys. If you want to use UV map for baking camera, each poly on this map cant share the same space with others polys.

aaronv2
03-24-2009, 07:27 AM
do you mean the polygons are overlapping on the model and thus causing the problem? or the polygons are overlapping on the UV coordinates and making the problem. How can that be possible using atlas uv mapping? I thought it prevented such things from happening?

aaronv2
03-24-2009, 08:19 AM
okay i broke the uv into alot of smaller UVs and it is still happening im not sure what else to do... i will experiment further and update my results

aaronv2
03-24-2009, 08:31 AM
i see the overlapping UVs now... but the model is way to big and go look through it... is there a way to automate the process of finding the problem polys?

I also found that tweaking the camera baking settings works too. setting the offset from surface to 100m and the UV border lower 2 and making the resolution of the camera bigger 4026x4026 the artifacts were minimized. but now i have the dilemma of finding this rouge polys causing these problems. can anyone help?

Kirdian
03-24-2009, 08:32 AM
I'am speaking about polys overlapping in UV space not model/world space. I dont know why atlas from LW generates overlapping polys but obviously sometimes it does.

Preview from modo UV window whit marked overlapping polygons.
71451

aaronv2
03-24-2009, 08:38 AM
awesome kirdian that extra info was a real help... does modo provide tools to fix or remove them? would it be better to make uvs in modo?

Kirdian
03-24-2009, 08:47 AM
Yes, in modo this problem is very easy to fix, and modo has a lot better UV tools than LW.

aaronv2
03-24-2009, 09:02 AM
it seems every day i get pushed further and further away from lightwave... the tools dont seem to keep up with the other packages, (maya fluids for one example) dont get me wrong i love lightwave to death but this was just an upsetting realization.

Sensei
03-24-2009, 09:06 AM
Unweld Points, Create Atlas UV map, and Merge Points.. And you should not have overlapping polygons in UV map.. At least I don't see going that path..

sammael
03-24-2009, 09:06 AM
http://homepage2.nifty.com/nif-hp/index2_english.htm these tools are great, run the UV Charts Packing Plugin ... problem solved :)

Kirdian
03-24-2009, 09:31 AM
it seems every day i get pushed further and further away from lightwave... the tools dont seem to keep up with the other packages, (maya fluids for one example) dont get me wrong i love lightwave to death but this was just an upsetting realization.

Dont be such a pessymist:) Modo is great as a support program for max, LW or XSI but as a standalone aplication is...:thumbsdow
Try ask zbrush user about sculpting/painting in modo or LW/XSI user about material system in modo:) And better dont ask about animation in modo:D

aaronv2
03-24-2009, 10:21 AM
i understand and appreciate your opinion however my point was things such as radiosity cache a proper dynamics system and nodal surfacing are all technologies i have seen in other packages for a long time. i remember back when you needed IMPACT to do physics simulations in lightwave meanwhile im pretty sure max and maya had them already. It was merely a comment on how lightwave seems to lag behind other packages... perhaps core will change that a bit.

Perhaps im letting this problem cause me bias?

EDIT: remember i said i love lightwave to death!

thanks for all ur help guys im trying all your suggestions now and ill show u how it goes

aaronv2
03-24-2009, 09:44 PM
Okay this is getting VERY frustrating... I have broken the model into 15 smaller UVs so that a) its harder for them to overlap and b) so i can render better quality maps.

Ive unwelded and made uvs and kept them unwelded the artifacts are still there. i unwelded made uvs then merged and they are still there. I have tried everything and have been spending far too much time trying to make good UVs.

Can ANYONE please try and help me figure out why this is happening?

sammael
03-25-2009, 12:49 AM
From what I remember there are two major factors to consider with the surface baking camera.
1 - UV maps should not overlap.
2 - Offset from surface.

Sounds like you have covered the first. Increasing the offset from surface should help prevent the type of thing you are describing. In my limited experience with it there have been times where I would have to chop out and combine parts of two different images with different offset from surface settings to cover the whole mesh without having the background show through.

Hope that helps, beyond that I dont know sorry.

aaronv2
03-25-2009, 10:05 AM
well i had to set the offset to a whopping 500km to get rid of the artifacts and things baked fine. then when i applied the map to the uv in the surface editor all the maps are screwed... is there a flipping issue or something else i need to be aware of or is this something else i will now have to spend a few days solving?

im thinking its the uv plugin so ill just try pure lw tools and no 3rd party plugins

P.S I hope noone is annoyed that i treat my threads like a blog.. i figue if anyonr has the problem later it would be cool to read the trials of another user

MSherak
03-25-2009, 10:54 AM
Here is the model back with new UV's.. I just ran the Make_Uv from the plugins here : http://homepage2.nifty.com/nif-hp/index2_english.htm

aaronv2
03-26-2009, 09:49 AM
okay awesome! your UV's have the minimal amount of the effect happening to the textures. there is maybe 1-5 stray pixels but thats about it. Ive since downloaded that plugin and I will be using a plugin from now on instead of atlas mapping in modeler :)

Problem solved... Now to make it look snappy and render out my maps and see how it all looks in the end

MSherak
03-26-2009, 09:54 AM
Thanks, took no time at all.. Nice thing about those plugins is that you can get the correct pixel to area ratio for your models.. All uv plugins and the ones built-in have a purpose.. Better to have all places covered..

aaronv2
03-26-2009, 10:23 AM
Okay i thaught the problem was solved but as soon as i increased the border of the Uvs the effect happened again.

I have since learnt it isnt so much about the uvs as long as there is no overlap it isnt a problem. What DOES work is setting the offset to something crazy i ended up with 1Mm and it worked out great.

Now to render out some 4096 maps and see how it all looks.

Kirdian
03-26-2009, 05:50 PM
Okay i thaught the problem was solved but as soon as i increased the border of the Uvs the effect happened again.
If a gap between two polys on UV map is to small, UV border also working on neighboring polys. That why UV border must be always smaller than this gap. You just dont have free space for UV border.



I have since learnt it isnt so much about the uvs as long as there is no overlap it isnt a problem. What DOES work is setting the offset to something crazy i ended up with 1Mm and it worked out great.


No, it dosnt. When offset is too big, the ray will bake all polygons along its path. This isnt accurate. Offset is important only when you baking, for example, high poly object on low poly version. Otherwise, leave this value small as possible, but not 0.

PS. Sorry for my english:)

Sensei
03-27-2009, 12:27 AM
Offset is important only when you baking, for example, high poly object on low poly version. Otherwise, leave this value small as possible, but not 0.

Not quite.
He has very big scene - whole city is 0.5 km..
And LightWave is using IEEE 32 bit floating point (and probably will use in Core, because they're better supported by gfx card acceleration). 32 bit float has 23 bits for mentissa (value).. So you can in maximum have 6 digit precision.. 2^23=8,388,608.. If you have big city with 500m world positions and very low offset like he has 100 micrometer=0.0001 m.. There will be problem with precision of calculations.. Surface Baking Camera is doing for each pixel/sample: camera_world_position = world_spot_position + normal_vector * offset; camera_direction = -normal_vector; Then ray is started from that location and hits again world_spot_position. But if precision is lost, it's missed and color from background is taken.

I have managed to reduce number of these wrong dots by opening city.lwo in Modeler and using Modify > Size 1%. Of course lights and cameras and other elements positions/scaling must be adjusted to hundred times lower sizes.

Kirdian
03-27-2009, 01:47 AM
Yes, thats true. On this scene default offset (100 um) is probably too small. 1cm should be enought, certainly not more. But Aaronv2 speak about 1Mm, this is nearly astronomic value:)

Clockmaster
03-29-2009, 03:59 PM
:)

Clockmaster
03-29-2009, 04:19 PM
I have managed to reduce number of these wrong dots by opening city.lwo in Modeler and using Modify > Size 1%. Of course lights and cameras and other elements positions/scaling must be adjusted to hundred times lower sizes.

It doesn't exist some tool or plugin that scales all lights and cameras respect to a point? It would be very useful for problems like this.

aaronv2
03-30-2009, 10:54 PM
lol i have no problem scaling my scene... but usually i build things to a rough scale. So being honest the scale of the object was one thing i did not take into account. I eventually baked my surfaces and it looked really lame... Like an opengl preview of a game engine on low settings. Ill scale my city down a bit and have another go.

toby
04-03-2009, 04:14 AM
It doesn't exist some tool or plugin that scales all lights and cameras respect to a point? It would be very useful for problems like this.
Yes, you parent them all to a null, then scale the null -

Alexx
09-18-2009, 02:19 AM
HI,

I have the same uv border problem
http://www.newtek.com/forums/showthread.php?p=927831#post927831

Maybe I should have posted it here...

My uv are NOT overlapping at all, as you can see in the demo pictures.
So, any solution ?

And can someone explain to me why setting UV border from 0 to 1 drop the render time from 2 hours down to 5 seconds ?

I'm totally lost...

OlaHaldor
09-18-2009, 05:16 AM
I have the same problems as well... !
http://www.newtek.com/forums/showthread.php?p=927872#post927872

aaronv2
09-22-2009, 11:26 AM
i eventually gave up on this so i feel your pain... the scene baking was just taking far too much fiddle farting around.to get even sub par results.