sunag / sea3d

An open-source format and tools for game developers :video_game:

Home Page:https://sunag.github.io/sea3d/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

1.6.5 r3 lighting issue.

RemusMar opened this issue · comments

Hi,

The negative scale bug seems to be fixed, but there is another one.

  1. the previous sea3d.min with my workaround:
    http://necromanthus.com/Test/html5/SMC.html
    Everything looks ok.

  2. the new sea3d.min without any workaround:
    http://necromanthus.com/Test/html5/SMC_new.html
    The lighting (on buildings) is flipped on Z (Y in 3DS Max).

cheers

For skinned meshes everything is ok:
Old: http://necromanthus.com/Test/html5/Lara.html
New: http://necromanthus.com/Test/html5/Lara_new.html

But for static meshes ... see the above lighting bug.

If the light is loaded from 3DS Max, everything looks ok:
http://necromanthus.com/Test/html5/SMC_new2.html

The bug: "Y" in 3DS Max becomes "-Z" in THREE.
It should become "Z".
(X,Y,Z) ---> (X,Z,Y)
cheers

p.s
Another bug:
Spot Light is exported as Directional Light.

sunag (Jean Carlo),

I've done more testings and that "Y to -Z" issue is a minor one.
All the other 3DS Max exporters generate the models with PI/2 rotation on the X axis.
It can be corrected with a single JavaScript line, so let's forget about it.
Overall 1.6.5 r3 is well done.
Congrats.

A few thoughts:

  1. please investigate why Spot Light is exported as Directional Light.

  2. onProgress is worthless.
    Please rename "onDownloadProgress" with "onProgress" and
    "position" with "loaded"
    "length" with "total"
    It will unify the SEA3DLoader with the other THREE loaders.

all the best

commented

Hi @RemusMar

Thank you for tests! I renamed position and length. Try now using onProgress can get the LOAD_PROGRESS for complex models in low cpu processing and DOWNLOAD_PROGRESS for network data acquisition.

var loader = new SEA3D.Loader()

loader.onProgress = function( e ) {
    if ( e.type == THREE.SEA3D.Event.DOWNLOAD_PROGRESS ) {
        // network progress
    } else if ( e.type == THREE.SEA3D.Event.LOAD_PROGRESS ) {
        // local progress
    }
}

If using onProgress not use in combination with onDownloadProgress or onLoadProgress.

I made a brief update on the site with some new features.
http://developers.poonya.com/forum/viewtopic.php?t=55

Thanks,
Cheers.

commented

Hi @RemusMar

Continuing...
I'll take a look at the SpotLight and other things to the next SEA3D features, also includes an improved for the Three.JS Loader. We will work it in the next few months.

Thanks,
Cheers.

Thank you for tests! I renamed position and length.

Excellent work!

http://necromanthus.com/Test/html5/SMC.html (full SEA3D)
http://necromanthus.com/Test/html5/testA.html (the room and Lara are SEA3D)

cheers