i made two more fixes to make the filter work, one of which was the order in
which the textures were drawn into the atlas: i was starting at 0,0 at the
top-left, whereas i believe meshlab wants 0,0 at the bottom-left.
it works fine with this modified file: www.akbars.net/TextureDoublex2.ply
but still not on my box...
imran
On Tue, Jul 22, 2008 at 6:06 PM, skunkwerk <sku...@gm...> wrote:
> i've committed a fix that should now make the texturedouble.ply generate
> correct UV coords...
> however models with more complex texturing still don't work properly...
>
> any suggestions on how to debug this? i think i'll take the same
> texturedouble.ply and try doubling the original uv coords to see how it
> handles that...
>
> imran
>
>
> On Tue, Jul 22, 2008 at 4:49 PM, skunkwerk <sku...@gm...> wrote:
>
>> paolo,
>> you're correct, the assert was happening on a null image, even though
>> i've put in a check to not do anything on null images... but i don't think
>> any changes are necessary.
>>
>> i'll test out the texturedouble.ply and report back my findings
>>
>> i have been testing out this model (a simple cube with a different texture
>> on every face):www.akbars.net/boxAtlasbig.zip
>>
>> the texture atlas is generated fine, but the resulting model does not look
>> right. i looked through the debug output, and as far as i can see, each
>> material's uvs are offset to the correct part of the texture atlas (i did
>> this by comparing the material number of that face and its uvs to the
>> position of that material in the atlas. the second division is the final uv
>> that's saved):
>> ------------------
>>
>> material 0 position: 805 , 1073
>>
>> U: 1.10381 V: 1.98863
>>
>> new (first division) U: 0.839221 new V: 0.740719
>>
>> new (second division) U: 0.955932 new V: 0.769647
>>
>> ------------------
>>
>> material 0 position: 805 , 1073
>>
>> U: 0.788531 V: 0.303902
>>
>> new (first division) U: 0.599517 new V: 0.113197
>>
>> new (second division) U: 0.897179 new V: 0.593546
>>
>> ------------------
>>
>> material 0 position: 805 , 1073
>>
>> U: 0.788531 V: 1.98863
>>
>> new (first division) U: 0.599517 new V: 0.740719
>>
>> new (second division) U: 0.897179 new V: 0.769647
>>
>> ------------------
>>
>> material 0 position: 805 , 1073
>>
>> U: 0.788531 V: 0.303902
>>
>> new (first division) U: 0.599517 new V: 0.113197
>>
>> new (second division) U: 0.897179 new V: 0.593546
>>
>> ------------------
>>
>> material 0 position: 805 , 1073
>>
>> U: 1.10381 V: 1.98863
>>
>> new (first division) U: 0.839221 new V: 0.740719
>>
>> new (second division) U: 0.955932 new V: 0.769647
>>
>> ------------------
>>
>> material 0 position: 805 , 1073
>>
>> U: 1.10381 V: 0.303902
>>
>> new (first division) U: 0.839221 new V: 0.113197
>>
>> new (second division) U: 0.955932 new V: 0.593546
>>
>> ------------------
>>
>> material 3 position: 0 , 1073
>>
>> U: 1.98863 V: 0
>>
>> new (first division) U: 0.740719 new V: 0
>>
>> new (second division) U: 0.555712 new V: 0.56178
>>
>> ------------------
>>
>> material 3 position: 0 , 1073
>>
>> U: 0.303902 V: 1.00833
>>
>> new (first division) U: 0.113197 new V: 0.502075
>>
>> new (second division) U: 0.084924 new V: 0.720026
>>
>> ------------------
>>
>> material 3 position: 0 , 1073
>>
>> U: 0.303902 V: 0
>>
>> new (first division) U: 0.113197 new V: 0
>>
>> new (second division) U: 0.084924 new V: 0.56178
>>
>> ------------------
>>
>> material 3 position: 0 , 1073
>>
>> U: 0.303902 V: 1.00833
>>
>> new (first division) U: 0.113197 new V: 0.502075
>>
>> new (second division) U: 0.084924 new V: 0.720026
>>
>> ------------------
>>
>> material 3 position: 0 , 1073
>>
>> U: 1.98863 V: 0
>>
>> new (first division) U: 0.740719 new V: 0
>>
>> new (second division) U: 0.555712 new V: 0.56178
>>
>> ------------------
>>
>> material 3 position: 0 , 1073
>>
>> U: 1.98863 V: 1.00833
>>
>> new (first division) U: 0.740719 new V: 0.502075
>>
>> new (second division) U: 0.555712 new V: 0.720026
>>
>> ------------------
>>
>> material 2 position: 805 , 1609
>>
>> U: 1.10381 V: 0
>>
>> new (first division) U: 0.839221 new V: 0
>>
>> new (second division) U: 0.905876 new V: 0.842408
>>
>> ------------------
>>
>> material 2 position: 805 , 1609
>>
>> U: 0.788531 V: 1.00833
>>
>> new (first division) U: 0.599517 new V: 0.502075
>>
>> new (second division) U: 0.86142 new V: 0.921531
>>
>> ------------------
>>
>> material 2 position: 805 , 1609
>>
>> U: 1.10381 V: 1.00833
>>
>> new (first division) U: 0.839221 new V: 0.502075
>>
>> new (second division) U: 0.905876 new V: 0.921531
>>
>> ------------------
>>
>> material 2 position: 805 , 1609
>>
>> U: 0.788531 V: 1.00833
>>
>> new (first division) U: 0.599517 new V: 0.502075
>>
>> new (second division) U: 0.86142 new V: 0.921531
>>
>> ------------------
>>
>> material 2 position: 805 , 1609
>>
>> U: 1.10381 V: 0
>>
>> new (first division) U: 0.839221 new V: 0
>>
>> new (second division) U: 0.905876 new V: 0.842408
>>
>> ------------------
>>
>> material 2 position: 805 , 1609
>>
>> U: 0.788531 V: 0
>>
>> new (first division) U: 0.599517 new V: 0
>>
>> new (second division) U: 0.86142 new V: 0.842408
>>
>> ------------------
>>
>> material 5 position: 310 , 1675
>>
>> U: 0.620122 V: 0
>>
>> new (first division) U: 0.214271 new V: 0
>>
>> new (second division) U: 0.346621 new V: 0.876963
>>
>> ------------------
>>
>> material 5 position: 310 , 1675
>>
>> U: 2.51422 V: 1.26042
>>
>> new (first division) U: 0.86874 new V: 0.557604
>>
>> new (second division) U: 0.522895 new V: 0.942942
>>
>> ------------------
>>
>> material 5 position: 310 , 1675
>>
>> U: 2.51422 V: 0
>>
>> new (first division) U: 0.86874 new V: 0
>>
>> new (second division) U: 0.522895 new V: 0.876963
>>
>> ------------------
>>
>> material 5 position: 310 , 1675
>>
>> U: 2.51422 V: 1.26042
>>
>> new (first division) U: 0.86874 new V: 0.557604
>>
>> new (second division) U: 0.522895 new V: 0.942942
>>
>> ------------------
>>
>> material 5 position: 310 , 1675
>>
>> U: 0.620122 V: 0
>>
>> new (first division) U: 0.214271 new V: 0
>>
>> new (second division) U: 0.346621 new V: 0.876963
>>
>> ------------------
>>
>> material 5 position: 310 , 1675
>>
>> U: 0.620122 V: 1.26042
>>
>> new (first division) U: 0.214271 new V: 0.557604
>>
>> new (second division) U: 0.346621 new V: 0.942942
>>
>> ------------------
>>
>> material 4 position: 0 , 1675
>>
>> U: 0.264336 V: 0
>>
>> new (first division) U: 0.0851076 new V: 0
>>
>> new (second division) U: 0.0245884 new V: 0.876963
>>
>> ------------------
>>
>> material 4 position: 0 , 1675
>>
>> U: 2.37024 V: 1.26042
>>
>> new (first division) U: 0.76314 new V: 0.557604
>>
>> new (second division) U: 0.220478 new V: 0.942942
>>
>> ------------------
>>
>> material 4 position: 0 , 1675
>>
>> U: 0.264336 V: 1.26042
>>
>> new (first division) U: 0.0851076 new V: 0.557604
>>
>> new (second division) U: 0.0245884 new V: 0.942942
>>
>> ------------------
>>
>> material 4 position: 0 , 1675
>>
>> U: 2.37024 V: 1.26042
>>
>> new (first division) U: 0.76314 new V: 0.557604
>>
>> new (second division) U: 0.220478 new V: 0.942942
>>
>> ------------------
>>
>> material 4 position: 0 , 1675
>>
>> U: 0.264336 V: 0
>>
>> new (first division) U: 0.0851076 new V: 0
>>
>> new (second division) U: 0.0245884 new V: 0.876963
>>
>> ------------------
>>
>> material 4 position: 0 , 1675
>>
>> U: 2.37024 V: 0
>>
>> new (first division) U: 0.76314 new V: 0
>>
>> new (second division) U: 0.220478 new V: 0.876963
>>
>> ------------------
>>
>> material 1 position: 0 , 0
>>
>> U: 1.89619 V: 0.303902
>>
>> new (first division) U: 0.70629 new V: 0.113197
>>
>> new (second division) U: 0.70629 new V: 0.0635917
>>
>> ------------------
>>
>> material 1 position: 0 , 0
>>
>> U: 0.211469 V: 1.98863
>>
>> new (first division) U: 0.0787676 new V: 0.740719
>>
>> new (second division) U: 0.0787676 new V: 0.416121
>>
>> ------------------
>>
>> material 1 position: 0 , 0
>>
>> U: 0.211469 V: 0.303902
>>
>> new (first division) U: 0.0787676 new V: 0.113197
>>
>> new (second division) U: 0.0787676 new V: 0.0635917
>>
>> ------------------
>>
>> material 1 position: 0 , 0
>>
>> U: 0.211469 V: 1.98863
>>
>> new (first division) U: 0.0787676 new V: 0.740719
>>
>> new (second division) U: 0.0787676 new V: 0.416121
>>
>> ------------------
>>
>> material 1 position: 0 , 0
>>
>> U: 1.89619 V: 0.303902
>>
>> new (first division) U: 0.70629 new V: 0.113197
>>
>> new (second division) U: 0.70629 new V: 0.0635917
>>
>> ------------------
>>
>> material 1 position: 0 , 0
>>
>> U: 1.89619 V: 1.98863
>>
>> new (first division) U: 0.70629 new V: 0.740719
>>
>> new (second division) U: 0.70629 new V: 0.416121
>>
>> global: 1073 , 1910
>>
>> inserted texture 0 into atlas at position: 805 1073
>>
>> inserted texture 1 into atlas at position: 0 0
>>
>> inserted texture 2 into atlas at position: 805 1609
>>
>> inserted texture 3 into atlas at position: 0 1073
>>
>> inserted texture 4 into atlas at position: 0 1675
>>
>> inserted texture 5 into atlas at position: 310 1675
>>
>>
>> On Tue, Jul 22, 2008 at 4:30 PM, Paolo Cignoni <pao...@is...>
>> wrote:
>>
>>> skunkwerk wrote:
>>> > Hey Sebastian,
>>> > this one worked for me: www.akbars.net/10.zip
>>> > i've been testing with collada models from
>>> > sketchup.google.com/3dwarehousebut that's because my version of the
>>> > collada importer works ok with the
>>> > textures - i don't think the one in subversion has been fixed yet...
>>> >
>>> > try increasing the size of the texture atlas until i can get the
>>> resampled
>>> > tiles working. i'm going to test out the results on a simple box today
>>> >
>>> > paolo, the rect_packer.cpp has a bunch of asserts in it... i'd like to
>>> > change them to return false, so that the atlas will fail, but not crash
>>> > whenever some of the images are null, etc. the other way would be to
>>> try to
>>> > do those checks in the filter itself. which would you recommend?
>>> >
>>> > imran
>>> >
>>> > On Tue, Jul 22, 2008 at 3:25 AM, Sebastian Herholz <
>>> > seb...@go...> wrote:
>>> >
>>> >
>>>
>>> I have tried too the atlas builder but it failed to build a correct mesh
>>> (but without crashing :) ) on the very very simple model
>>> texturedouble.ply that you can find among the meshlab sample models.
>>>
>>> This model is composed by just two squares, each one of them textured
>>> with a different texture.
>>> your filter builds a correct atlas texture but it assigns wrong tex
>>> coords to the mesh.
>>>
>>>
>>> About the rect packer what are exactly the asserts that worry you?
>>> From what i could see you they trigger on very trashy situations that
>>> should be cleaned before (zero sized textures and so on). I could have
>>> missed some, so what assert()'s did you refer to?
>>>
>>> cheers
>>>
>>> --
>>> Paolo Cignoni -- Senior Researcher
>>> Visual Computing Laboratory - ISTI - CNR
>>> http://vcg.isti.cnr.it/~cignoni <http://vcg.isti.cnr.it/%7Ecignoni>
>>>
>>> ISTI - CNR
>>> Via Moruzzi 1,
>>> 56124 Pisa
>>> ITALY
>>>
>>>
>>> -------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>>> challenge
>>> Build the coolest Linux based applications with Moblin SDK & win great
>>> prizes
>>> Grand prize is a trip for two to an Open Source event anywhere in the
>>> world
>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>> _______________________________________________
>>> Meshlab-devel mailing list
>>> Mes...@li...
>>> https://lists.sourceforge.net/lists/listinfo/meshlab-devel
>>>
>>
>>
>
|