image-based lighting with my own ktx get model dark

**I saw the Image-Based Lighting example in Sandcastle. I want to create my own ktx file. I got an hdr file from the filament and created ktx using cmgen. The conversion code is **

**cmgen --type=ktx -x . Venetian_crossroads_2k.hdr**

venetian_crossroads_2k_ibl.ktx (2 MB)

What were your coefficients? Did you try adjusting the luminanceAtZenith parameter? You may also need to scrub the timeline slider to move the sun position to make sure the models are lit.

Coefficients uses the data in sh.txt, mine is
var L00 =new Cesium.Cartesian3( 1.760908842086792, 1.509190678596497, 1.013307809829712); // L00, irradiance, pre-scaled base

var L1_1=new Cesium.Cartesian3( 0.911852777004242, 0.796222507953644, 0.552124440670013); // L1-1, irradiance, pre-scaled base

var L10 =new Cesium.Cartesian3( 1.347849845886230, 1.146853804588318, 0.728281855583191); // L10, irradiance, pre-scaled base

var L11 =new Cesium.Cartesian3(-0.966514527797699, -0.828009486198425, -0.526856720447540); // L11, irradiance, pre-scaled base

var L2_2=new Cesium.Cartesian3(-0.139874637126923, -0.119280189275742, -0.075863234698772); // L2-2, irradiance, pre-scaled base

var L2_1=new Cesium.Cartesian3( 0.187529370188713, 0.160599917173386, 0.102991372346878); // L2-1, irradiance, pre-scaled base

var L20 =new Cesium.Cartesian3( 0.024025268852711, 0.020113164559007, 0.011945324018598); // L20, irradiance, pre-scaled base

var L21 =new Cesium.Cartesian3(-0.209870234131813, -0.177923187613487, -0.111859448254108); // L21, irradiance, pre-scaled base

var L22 =new Cesium.Cartesian3( 0.004385300911963, 0.002853251527995, -0.000137816969072); // L22, irradiance, pre-scaled base


The code I am using is Sandcastle/gallery/Image-Based Lighting.html I just changed the environmentMapURL and coefficients. After adjusting the luminanceAtZenith, the model still shows black.

here is the hdr file I am using.

hdr file

在 2019年10月18日星期五 UTC+8上午9:19:41,Omar Shehata写道:

Thanks for reporting this. The reason the model is very dark is because the environment map was actually failing to load, but it wasn’t returning an error. I’ve fixed this error checking in this PR:

It looks like cmgen changed something in a recent release that produces KTX files with float textures that CesiumJS doesn’t support loading in. I got it to work by using an older release of cmgen, 1.2.0:

thank you. I tried your method and can use it.

在 2019年10月20日星期日 UTC+8上午12:35:23,Omar Shehata写道:

Can i get you wechat?I need to convert hdr to ktx but it is not success by 1.2 release