gltf bufferview

420 views
Skip to first unread message

7737...@qq.com

unread,
Feb 2, 2018, 11:34:57 AM2/2/18
to cesium-dev
I'm confused by bufferView. I have 10 accessors ,I must have 10 bufferviews for different data? for example, can I only have 1 bufferview for all vertices normal texturecood batchID? i plan to set offset at accessor .
and what does bufferview's target property work for?

Sean Lilley

unread,
Feb 2, 2018, 7:53:41 PM2/2/18
to cesium-dev
One limitation for buffer views in that all accessors that reference a buffer view must have the same stride. Positions and normals typically have a stride of 12, texture coordinates typically have a stride of 8, and batch ids typically have a stride of 2. If you decide to use a single buffer view with the right accessor offsets Cesium will load it, however it would not be valid according to the glTF 2.0 spec.

To get around this limitation people often interleave vertex attributes, which allows all accessors to have the same stride and use the same buffer view. Check out Box Interleaved as an example.

The bufferView target property says whether the bufferView contains vertex data or indices data. This is not required for loading into Cesium since we can infer this information based on which accessors use which bufferViews.

7737...@qq.com

unread,
Feb 3, 2018, 12:03:21 AM2/3/18
to cesium-dev
you mean mix the position normal and so on, point1's position,point1's normai ,point1's textcoord,point1's batchid,then point2's position,point2's normai ,point2's textcoord,point2's batchid.
but i dont understand,different data have a different componentType( 5126) count type(vec3) and byteOffset ,even stride property in accessor,that tell cesium to extract data from the the same bufferview?

Sean Lilley

unread,
Feb 5, 2018, 6:52:47 PM2/5/18
to cesium-dev
Yeah that's the ordering I mean. All the accessors would have the same stride (34) and each accessor would have a byteOffset to its first attribute. (e.g. 0 for position, 12 for normal, 24 for texcoord, and 32 for batch id). The count and other properties would stay the same. Cesium doesn't actually extract the data stored in the buffers, it is sent right to the GPU, where having interleaved attributes like this is valid.

noble

unread,
Mar 19, 2018, 12:39:36 PM3/19/18
to cesium-dev
I have been blocked to visit google,so I can't visit cesium forum.
I got error below,when loaded a B3DM file
"An error occurred while rendering. Rendering has stopped.

------------------ 原始邮件 ------------------
发件人: "Sean Lilley"<lill...@gmail.com>;
发送时间: 2018年2月6日(星期二) 上午7:52
收件人: "cesium-dev"<cesiu...@googlegroups.com>;
主题: [cesium-dev] Re: gltf bufferview
--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/2ORBapD2kBg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sean Lilley

unread,
Mar 20, 2018, 10:53:10 PM3/20/18
to cesium-dev
I think you are encountering this bug: https://github.com/AnalyticalGraphicsInc/cesium/pull/6315

The fix was merged and will be included in Cesium 1.44 on April 2.

noble

unread,
Mar 20, 2018, 11:22:46 PM3/20/18
to cesium-dev
you mean I have some material that don't be used by any primitive? i do have,if you will fix the bug, so I don't need to modify my program?  thank you very much,i have been work for the reason for three days ,thanks for you answer.


------------------ 原始邮件 ------------------
发件人: "Sean Lilley"<lill...@gmail.com>;
发送时间: 2018年3月21日(星期三) 上午10:53
收件人: "cesium-dev"<cesiu...@googlegroups.com>;
主题: Re: 回复:[cesium-dev] Re: gltf bufferview

Sean Lilley

unread,
Mar 21, 2018, 8:40:17 PM3/21/18
to cesium-dev
Correct, this was a bug on our end and you don't need to modify your glTF or your program.

Everything should work once Cesium 1.44 is out.

(Sorry for the duplicate message. I sent you this earlier but forgot to send it out to the rest of the google group)

noble

unread,
Mar 25, 2018, 1:54:03 PM3/25/18
to cesium-dev
it's OK ,you are welcome , you help me a lot🙂

---原始邮件---
发件人: "Sean Lilley"<lill...@gmail.com>
发送时间: 2018年3月22日(星期四) 上午8:40
收件人: "cesium-dev"<cesiu...@googlegroups.com>;
主题: Re: 回复: 回复:[cesium-dev] Re: gltf bufferview

noble

unread,
Mar 28, 2018, 12:51:05 PM3/28/18
to cesium-dev
why my model is so dark, should i set cesium or gltf

Sean Lilley

unread,
Mar 28, 2018, 7:50:26 PM3/28/18
to cesium-dev
Cesium doesn't offer much control in terms of lighting at the moment. Though we are aware that glTF models in Cesium seem darker than other glTF engines. Have you tried loading your model in three.js to compare: https://gltf-viewer.donmccurdy.com/?

noble

unread,
Mar 30, 2018, 7:56:36 PM3/30/18
to cesium-dev
yes , in threejs it's lighter,and i can set exposure .
how can i enhance ambient light in cesium
---原始邮件---
发件人: "Sean Lilley"<lill...@gmail.com>
发送时间: 2018年3月29日(星期四) 上午7:51

Sean Lilley

unread,
Apr 2, 2018, 8:11:54 PM4/2/18
to cesium-dev
It's actually not possible to adjust the ambient light right now. I opened an issue with some of these ideas: https://github.com/AnalyticalGraphicsInc/cesium/issues/6412

noble

unread,
Apr 4, 2018, 1:19:28 PM4/4/18
to lilleyse
Oh,I find that's my data bug, I  have fixed ,  it's bright enough now? I think you dont need do anything.


------------------ 原始邮件 ------------------
发件人: "lilleyse"<lill...@gmail.com>;
发送时间: 2018年4月3日(星期二) 上午8:11

Sean Lilley

unread,
Apr 4, 2018, 7:53:15 PM4/4/18
to cesium-dev
Oh ok, good that you fixed your model!

noble

unread,
Jun 24, 2018, 1:37:59 PM6/24/18
to lilleyse
my data have 4 layers , layer1's geometricError=1000, layer2's geometricError=100, layer3's geometricError=10, layer4's geometricError=1;

layer3.content is empty

all layers have no requestVolume, but have boudingVolume

I found layer3 will not show boundingFame,while I use debugShowBoundingVolume.
and layer2 and layer3 will show ,when camera is far. and many tiles were loaded even debugShowBoundingVolume were not show.

can you explain what geometricError,maximumScreenSpaceError,boudingVolume,requestVolume?



------------------ 原始邮件 ------------------
发件人: "lilleyse"<lill...@gmail.com>;
发送时间: 2018年4月5日(星期四) 上午7:53
收件人: "cesium-dev"<cesiu...@googlegroups.com>;
主题: Re: 回复: 回复: 回复:[cesium-dev] Re: gltf bufferview

noble

unread,
Jun 25, 2018, 5:34:38 AM6/25/18
to lilleyse
I found that some problems
1. if camera look down from the sky vertically, all the tiles will be loaded despite geometricError. If camera look at ground at 45 degree, tiles will be loaded as LOD according geometricError.
2. If I have many empty tiles (only json,no b3dm), cesium also distirbute big RAM for them
3. 3Dtiles api unloaded tile ,but browser's RAM will not be destroyed when I watch in windows task manager
------------------ 原始邮件 ------------------
发件人: "lilleyse"<lill...@gmail.com>;
发送时间: 2018年4月5日(星期四) 上午7:53
收件人: "cesium-dev"<cesiu...@googlegroups.com>;
主题: Re: 回复: 回复: 回复:[cesium-dev] Re: gltf bufferview

Sean Lilley

unread,
Jun 28, 2018, 8:36:21 PM6/28/18
to cesium-dev
I found layer3 will not show boundingFame,while I use debugShowBoundingVolume.

The bounding volumes of empty tiles are not shown due to a bug that will be fixed when https://github.com/AnalyticalGraphicsInc/cesium/pull/6390 is merged. It's possible the other debug bounding volume issue you described will be fixed in that pull request as well.

1. if camera look down from the sky vertically, all the tiles will be loaded despite geometricError. If camera look at ground at 45 degree, tiles will be loaded as LOD according geometricError.

When you are looking down from the sky and then zoom backwards do lower LOD tiles get rendered? When using the 3D Tiles Inspector what geometric errors do you see? They can be turned on with Tile Debug Labels -> Geometric Error.

2. If I have many empty tiles (only json,no b3dm), cesium also distirbute big RAM for them

 How many tiles is in your tileset? I think this is the same issue: https://github.com/AnalyticalGraphicsInc/cesium/issues/3453. Even empty tiles take up probably too much memory - that's something we want to fix.

3. 3Dtiles api unloaded tile ,but browser's RAM will not be destroyed when I watch in windows task manager

GPU memory is freed but CPU memory is not. Basically once a tile is created it is never destroyed, only its contents are destroyed. Likely this will be something we will address when we fix the issue above.

can you explain what geometricError,maximumScreenSpaceError,boudingVolume,requestVolume?

I think the best resource for explaining these is the spec itself. Check out this section which has an overview of all these parts: https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/1.0/specification#tiles

noble

unread,
Jun 29, 2018, 12:16:11 AM6/29/18
to cesium-dev
thanks for ur detail reply ,i have found my data error.now everything ok ,except empty tiles boundingvolume not show and RAM not release when tiles unload
------------------ 原始邮件 ------------------
发件人: "lilleyse"<lill...@gmail.com>
发送时间: 2018年6月29日(星期五) 上午8:36
收件人: "cesium-dev"<cesiu...@googlegroups.com>;
主题: [cesium-dev] Re: 3dtiles

noble

unread,
Jun 30, 2018, 4:01:10 AM6/30/18
to cesium-dev
is bug of model dark fixed?
------------------ 原始邮件 ------------------
发件人: "lilleyse"<lill...@gmail.com>
发送时间: 2018年6月29日(星期五) 上午8:36
收件人: "cesium-dev"<cesiu...@googlegroups.com>;
主题: [cesium-dev] Re: 3dtiles

noble

unread,
Jul 1, 2018, 5:23:13 AM7/1/18
to lilleyse
 
the sample data Cesium_Air(gltf 1.0) brightness is  not affected by postion of sun
my data(gltf 2.0) is affected by sun
and my data looks dark at night. 
I check the spec ,gltf 1.0 have shader ,gltf 2.0 don't .is that the factor ?
can you tell me where code of light is,and can i modify code to let my data bright?
or should i write shader like gltf1.0 in gltf2.0 
 


------------------ 原始邮件 ------------------
发件人: "lilleyse"<lill...@gmail.com>;
发送时间: 2018年6月29日(星期五) 上午8:36
收件人: "cesium-dev"<cesiu...@googlegroups.com>;
主题: [cesium-dev] Re: 3dtiles

Sean Lilley

unread,
Jul 8, 2018, 9:35:07 PM7/8/18
to cesium-dev
To light the model without using the sun direction, set optimizeForCesium to false in Model.js: https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/Model.js#L4247
Reply all
Reply to author
Forward
0 new messages