How to process a Mesh (keep data in CPU)?

24 views
Skip to first unread message

Aldo Culquicondor

unread,
Oct 21, 2017, 10:31:47 AM10/21/17
to fplbaselib
I want to process a mesh instead of sending it to the GPU. This is for the purpose of doing something similar to colission detection. Is there a way to keep the data in CPU instead of directly sending it to the GPU? Probably the class InterleavedVertexData is what I want, but it get's destroyed on Load.

Thanks

Wouter van Oortmerssen

unread,
Oct 23, 2017, 12:00:52 PM10/23/17
to Aldo Culquicondor, fplbaselib
Mesh::ParseInterleavedVertexData is pretty much what you want here. The pointer you pass is a mesh file straight from disk, and the InterleavedVertexData will be filled with information that should allow you to process the mesh on the CPU.

On Sat, Oct 21, 2017 at 7:31 AM, Aldo Culquicondor <alculqu...@gmail.com> wrote:
I want to process a mesh instead of sending it to the GPU. This is for the purpose of doing something similar to colission detection. Is there a way to keep the data in CPU instead of directly sending it to the GPU? Probably the class InterleavedVertexData is what I want, but it get's destroyed on Load.

Thanks

--
You received this message because you are subscribed to the Google Groups "fplbaselib" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fplbaselib+unsubscribe@googlegroups.com.
To post to this group, send email to fplba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fplbaselib/359a8bd1-414d-47ce-a08d-ebffc9af9350%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Aldo Culquicondor

unread,
Oct 23, 2017, 12:05:04 PM10/23/17
to Wouter van Oortmerssen, fplbaselib

I guess I need to extend fplbase::Mesh in order to keep the object, right? Or does it make sense to add a flag on AssetManager::LoadMesh to do it? I could prepare a Pull Request if you think it's a common enough use case.


On Mon, Oct 23, 2017, 11:00 AM Wouter van Oortmerssen <w...@google.com> wrote:
Mesh::ParseInterleavedVertexData is pretty much what you want here. The pointer you pass is a mesh file straight from disk, and the InterleavedVertexData will be filled with information that should allow you to process the mesh on the CPU.

On Sat, Oct 21, 2017 at 7:31 AM, Aldo Culquicondor <alculqu...@gmail.com> wrote:
I want to process a mesh instead of sending it to the GPU. This is for the purpose of doing something similar to colission detection. Is there a way to keep the data in CPU instead of directly sending it to the GPU? Probably the class InterleavedVertexData is what I want, but it get's destroyed on Load.

Thanks

--
You received this message because you are subscribed to the Google Groups "fplbaselib" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fplbaselib+...@googlegroups.com.

To post to this group, send email to fplba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fplbaselib/359a8bd1-414d-47ce-a08d-ebffc9af9350%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Aldo Culquicondor

Wouter van Oortmerssen

unread,
Oct 23, 2017, 12:23:03 PM10/23/17
to Aldo Culquicondor, fplbaselib
InterleavedVertexData is an object independent of Mesh, so if you store that somewhere, you shouldn't need the Mesh (it may refer to the file you loaded though, if the data is already interleaved).

On Mon, Oct 23, 2017 at 9:04 AM, Aldo Culquicondor <alculqu...@gmail.com> wrote:

I guess I need to extend fplbase::Mesh in order to keep the object, right? Or does it make sense to add a flag on AssetManager::LoadMesh to do it? I could prepare a Pull Request if you think it's a common enough use case.

On Mon, Oct 23, 2017, 11:00 AM Wouter van Oortmerssen <w...@google.com> wrote:
Mesh::ParseInterleavedVertexData is pretty much what you want here. The pointer you pass is a mesh file straight from disk, and the InterleavedVertexData will be filled with information that should allow you to process the mesh on the CPU.

On Sat, Oct 21, 2017 at 7:31 AM, Aldo Culquicondor <alculqu...@gmail.com> wrote:
I want to process a mesh instead of sending it to the GPU. This is for the purpose of doing something similar to colission detection. Is there a way to keep the data in CPU instead of directly sending it to the GPU? Probably the class InterleavedVertexData is what I want, but it get's destroyed on Load.

Thanks

--
You received this message because you are subscribed to the Google Groups "fplbaselib" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fplbaselib+unsubscribe@googlegroups.com.

To post to this group, send email to fplba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fplbaselib/359a8bd1-414d-47ce-a08d-ebffc9af9350%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Aldo Culquicondor

Aldo Culquicondor

unread,
Oct 23, 2017, 6:33:36 PM10/23/17
to Wouter van Oortmerssen, fplbaselib
Right. However, I am already loading the mesh for rendering, too. That's why I thought that it could be useful to keep the InterleavedVertexData when calling LoadMesh.

Thanks for the help.

El lun., 23 de oct. de 2017 a la(s) 11:23, Wouter van Oortmerssen <w...@google.com> escribió:
InterleavedVertexData is an object independent of Mesh, so if you store that somewhere, you shouldn't need the Mesh (it may refer to the file you loaded though, if the data is already interleaved).
On Mon, Oct 23, 2017 at 9:04 AM, Aldo Culquicondor <alculqu...@gmail.com> wrote:

I guess I need to extend fplbase::Mesh in order to keep the object, right? Or does it make sense to add a flag on AssetManager::LoadMesh to do it? I could prepare a Pull Request if you think it's a common enough use case.

On Mon, Oct 23, 2017, 11:00 AM Wouter van Oortmerssen <w...@google.com> wrote:
Mesh::ParseInterleavedVertexData is pretty much what you want here. The pointer you pass is a mesh file straight from disk, and the InterleavedVertexData will be filled with information that should allow you to process the mesh on the CPU.

On Sat, Oct 21, 2017 at 7:31 AM, Aldo Culquicondor <alculqu...@gmail.com> wrote:
I want to process a mesh instead of sending it to the GPU. This is for the purpose of doing something similar to colission detection. Is there a way to keep the data in CPU instead of directly sending it to the GPU? Probably the class InterleavedVertexData is what I want, but it get's destroyed on Load.

Thanks

--
You received this message because you are subscribed to the Google Groups "fplbaselib" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fplbaselib+...@googlegroups.com.

To post to this group, send email to fplba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fplbaselib/359a8bd1-414d-47ce-a08d-ebffc9af9350%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Aldo Culquicondor

--
Aldo Culquicondor
Reply all
Reply to author
Forward
0 new messages