Wings 3D Development Forum
[fixed] Crash on the DirectX demo - Import-Wavefront OBJ. - Printable Version

+- Wings 3D Development Forum (https://www.wings3d.com/forum)
+-- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=1)
+--- Forum: Bug Reports (https://www.wings3d.com/forum/forumdisplay.php?fid=12)
+--- Thread: [fixed] Crash on the DirectX demo - Import-Wavefront OBJ. (/showthread.php?tid=3048)



[fixed] Crash on the DirectX demo - Import-Wavefront OBJ. - Xavier - 12-04-2021

[Import-Wavefront OBJ] Crash on the DirectX demo.

Hi happy users, Micheus,

I tried to import the "Microsoft cup" from the Direct3D SDK sample.

    [Enclosed picture]

In "Direct3D\MeshFromOBJ"

No blue screen, but our Wings3D... don't love it !
Wink

The Wings3D import seem to be designed to load only one "g" object.
If i delete the second object in the file, it load the "inside" cup object.

.zip   media.zip (Size: 48.51 KB / Downloads: 1)

Another curiosity, i tried to load an "obj" file to the "OBJ" DirectX loader from an exported Wings file... and the texture UI mapping is wrong!

Wavefront seem to load his blt buffer form the end of the picture... to the begin (old BMP structure?).
The result is to invert the texture as a double mirrored picture on the UI table ! (-x,-y)

The exported picture had to be rotated by 180°, then an horizontal mirror is applied.


UV picture:
    [Enclosed picture]


Exported picture (set with the LightWav's mapping):
    [Enclosed picture]

The UI setting on Wings is based on the "real" picture, but don't match on the DirectX renderer.

Thanks Micheus for enjoys and your great job !

Quote:Dump written 2021-12-4_10-40
Version: 2.2.7
Window: geom
Reason: function_clause


Short stack trace:
[{wings,command_1,2,[{file,"wings.erl"},{line,767}]},
{wings_develop,time_command,2,[{file,"wings_develop.erl"},{line,87}]},
{wings,raw_command,4,[{file,"wings.erl"},{line,643}]},
{wings_wm,handle_event,3,[{file,"wings_wm.erl"},{line,1032}]},
{wings_wm,send_event,2,[{file,"wings_wm.erl"},{line,998}]},
{wings_wm,do_dispatch,2,[{file,"wings_wm.erl"},{line,890}]},
{wings_wm,dispatch_event,1,[{file,"wings_wm.erl"},{line,799}]},
{wings_wm,get_and_dispatch,0,[{file,"wings_wm.erl"},{line,685}]},
{wings,init_part2,3,[{file,"wings.erl"},{line,108}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]

[Enclosed picture]: To show the enclosed pictures, you had to set this forum as "safe" in your web explorer.


RE: [Import-Wavefront OBJ] Crash on the DirectX demo. - micheus - 12-04-2021

Hi Xavier.

Quote:No blue screen, but our Wings3D... don't love it !
Here is it:
[Image: microsoft-cup.png]

In order to get it working you will need to apply the patches available in Patches/Fixes for Wings3D Wink
I didn't have applied the patches in my install, so it was a big crash when I dragged/dropped into Wings3D workspace.

I'm able load the exported .obj in 3D Converted without any problem, but I'm going to try check these UV issues you pointed during the next weeks.


RE: [Import-Wavefront OBJ] Crash on the DirectX demo. - Xavier - 12-07-2021

Many thanks Micheus !

Great job, as usual...


RE: [Import-Wavefront OBJ] Crash on the DirectX demo. - Xavier - 12-07-2021

Hi,

Successfully tested on the PNG, BMP or JPG pictures in export mode.
I'm actually unable to create the mirror/rotation bug targeted first!

UV mapping seem working with an unchanged texture auv picture used in Wings...

Thanks again Micheus for spent time and your expert kindness.


RE: [Import-Wavefront OBJ] Crash on the DirectX demo. - micheus - 12-07-2021

Nice. Thanks for your feedback.