first,… please be sure, that I searched allmost 2 days on the www (specially these forum here!), but I cant get an answer.
My Problem. I’ve got a hugh scene (1.500.000 tris) and because of this, I’m trying to use as less textures and shaders as possible. So I tuned a lot and now for the whole scene I’m just using 10 shaders (each with an texture). So everymodel has its own UV set for these textures. Also I created in Maya a second UV Map to create my Lightmap. First I thought about rendering It in Maya and import It to Unity, but a lot of people are telling me, to use the integrated lightmapping of Unity3. So now I would like to try
BUT my question is,… how can I tell unity to use the 2nd UV Set of each objects to bake the light ?! Now Unity is baking everytime (sadly!) with the 1st UV set…
Please help me,… I will be so happy (at the forum here, isn’t a smilie to show how big my smile would be)… ^^
Oh here are the threads which I found, but everywhere is a other solution …
one thread will combine all objects to one (doesnt work for me, because of different shaders)
the other thread will use maya for baking the light… :-/
hhmmm I worked a lot of other threads through and some google results too , but I can’t get a solution :-/ The time runs out just a few days until the project presentation - and for such a big scene, the calculation of the shadow (after getting the right UV sets to work) will need hours and hours … (I think)…
If you have properly created secondary UVs in Maya then Beast will use those when doing the lightmapping. Otherwise you can have Unity generate the secondary UVs in the FBX import settings.
he … hmm I dont know why,… but It wont work.
Ok thats not the truth. I created my mesh in maya und gave anyone an lightmap UV set (so 2 are applied).
After this, I exported it as fbx to unity and set all meshs “static” and created one light (point)… know I would like to bake and look… for the most object it works… but (picture) some objects get strange parts and I dont know why … :-/ there are now overlapping Polys in the UVs Set… any idea !?
its strange, but the placement of the UVs in the lightmap (right bottom) isnt like any of my both UV Sets … hmmm :-/
It is maybe the reason ?! But I can clearly see on the lightmap in the picture, that the “black fractles” are placed there, too. The small “atomic” circle… has around its white center circle the fractiles … why ?!
Maybe because there is some shadow?
The screenshot looks very different from the texture. I mean I can’t see that shadow that is in the texture, up in the screenshot.
Anyway, lightmapping is not intended to give detail shadows to the scene, it’s more intended to give the scene diffusion lighting with bounces and such.
This object looks very small (maybe I’m wrong) so you shouldn’t even try to achieve this level of detail.
This said, mastering the Beast is not easy in the beginning. You may think you know how to make it work but you are wrong.
Unless you are a genius, it’ll take more than some days of “playing” with it to understand correctly how all the parameters work.
One personal suggestion: don’t stay too much on details, while playing, very little people notice anything.
You want to make games, not real world simulations
hey megamaltese the problem is… I use unity at this project indeed as a real world simulation… the object we are talking about it a “speaker”… so its sized with 30x30x10 cm … so not very small… therefore I think, the settings of Beasty are allmost the same as in Maya… so I hope I didnt set some strange settings ^^ …
ok… back to topic… there isn any shadow in Realtime… I baked with beasty an ambient occlusion and a hardshadow, but the hardshadow with 2000 Samples (that should be enough I think)… nevertheless,… I also baked just the ambient occlusion without hardshadow, but get the same result :-/ … I need to bake the hardshadow (or maybe a softshadow) because the ShadowMaps which are used for the Hard or softshadows are far to small to get perfect shadows… the only good thing for the performance is,… that nearly all objects dont move …
Hmmm … ok now I’ve to go to bed (from germany … 2:50am^^)… tomorrow will become a hard day…
So megmaltese, I hope you know, that I have to get this shadows working… and I absolutly dont know, what I’ve made wrong :-/ … 2 nice UVsets… no overlapping UVs… … :-//
Why don’t you try using Unity’s UV unwrapper? That willl at least clear up any confusion about whether or not you are creating proper UVs in Maya.
Also, something seems wrong with the lightmap you posted. You have the resolution set at 2048 texels per world unit. That’s extremely high. And the resulting lightmap is a 256x256 texture. The scale of your scene must be very small. Why not try scaling it up? And reading some of the documentation I linked to might prove useful.
hey… the problem is… that the unity UV unwrapper is crashing everytime I want to import my meshs to Unity… The Main Problem is about,… that the scene is about an “radio incl. table”… BUT… all the electric parts in the radio are also modeled. So Its just about flying around the big amount of details in the radio. So I read all of your documentations but I dont get my failure. I thought, that Unitys Beats will automatically use my 2nd UV set… so I can import my meshs (without using unity uv unwrapper) …and I set the resolution set at 2048 (because of the high detail count) … but I dont know why the lightmap has such an bad resolution :-/ Maybe Unity calculates it automatically ?! … nevertheless… I get quite confused… so I naturally take everytime quite high settings, because baking is a work of CPUs … and therefor I’ve got 16 of this at an dual sockel system, so the calculating time is quite short… and for rendering the scene in realtime,… the GPU performance should be enough… hmmm do you have any other Idea how to solve this ?!..
I really like the Unity UV wrapper but this time, it wont work :-/
Hmm I tried a lot other settings and that stuff, but get everytime the same result … :-/ ok, not exactly the same, but quite the same. even my object has just the lightning UV (not two)… and even with a high or low resolution (only one light in scene)… :-/
the result is the same :-/
ok guys… here an update…
I even tried It with an unity based UV map (created on imort)… with resolution set to 1000 my lightmap gets automatically 128x128 … by setting it up to 2000 my lightmap gehts 256x256 … setting up to 4000 my lightmap gehts 512x512… nevertheless… look to the lightmap… there are the “little flickering artefacts” too… so there must be something go wrong on calculation… in picture are all my settings.,…please help… I get quite disappointed of my scene :-/
sry … ok here a direct link to full size image … FULLSIZE
a picture of an cube next to the geometry is easy to say ;)… a “normal unity cube” (scale 1| 1| 1) is about 10x bigger than the object… unity units are about meter… my object is completly 0,4 x 0,2 x 0,15 meters … (its a radio…)…
your’re right, … if I scale my meshes 10x … the problem will not appear… so is the only solution to scale the whole scene ?! (this would me a lot script adjustment, but If it is the only way,… I do!)…
So you’re saying your objects are actually relatively small but not “microscopic”? This is odd. Could you PM or email (ethan at unity3d dot com) me one of models you’re trying to lightmap here in FBX format so I can take a look at it?
My guess would be that your objects are just too small though.
After having a look at your FBX file I think your best bet would definitely be to scale the objects up in Unity. You have these small objects that you want to get really close up to and have fine detail in the lightmaps. Beast just isn’t set up to work at this scale and floating point imprecision starts to occur. I know it might be a pain to redo some of your scripts to work at a larger scale, but it will save you some headaches down the road.
hey thanks for your answer… therefor I will scale up the scene… Its so nice from you, that you looked at my project. Thanks a Lot… because of your advise, I rewrote a lot of my code, so It works pretty well with higher scale… so … thanks a lot !
I tried scaling the imported objects from 1|1|1 up to 10|10|10 … and 100|100|100 … the ambient occlusion gets better… and the overall shadow, too… but the problemes are still there… if I increase the settings.,… unity … or to be exactly … beasty… runs really long and at 100% (on 16 cores)… but overall… while importing the lightmaps (near and far)… unity crashs… the ram is running over 6GB (>4 for unity) … and it says “bye bye… I’m crashing” … :-/ … Its sad!