I need to know if there is some way to use any library or something to show a Wavefront *.obj file in solid, points and edges mode. At same time that it can be moved with the mouse in Zoom, Pan and rotate options.
Thanks
How to show a 3D Wavefront obj file in PB ?
How to show a 3D Wavefront obj file in PB ?
Last edited by raska on Sat Oct 06, 2007 6:20 pm, edited 1 time in total.
-
- User
- Posts: 10
- Joined: Fri Oct 05, 2007 8:10 pm
try the IrrlichtWrapper
http://www.purearea.net/pb/showcase/show.php?id=367
http://www.purearea.net/pb/showcase/show.php?id=367
Thanks a lot but I am looking for a very small thing, My program is 100 k. big and only that library is more than 9 meg. :roll:
I am looking for something simple with only those few functions that I explained in my firt post. Something like the Total commander's wcpfrep32.wlx list 3D viewer that is 300 k. big or maybe another more simple thing.
Thanks anyway
I am looking for something simple with only those few functions that I explained in my firt post. Something like the Total commander's wcpfrep32.wlx list 3D viewer that is 300 k. big or maybe another more simple thing.

Thanks anyway

Actually the dll itself is about 1.2 megs. If thats till too much you could use this as a converter / loader.
Use Irrlicht to load your object file and dump vertex / Indice / UV Data to a custom file ( which you in the final exe could include via includebinairy or paste as text - depending how you store it - you could even compress that section using Pbs pack commands ). Then use the OpenGL include
from: http://www.purebasic.fr/english/viewtopic.php?t=28835
to create your lil viewer passing the vertex / Indice / UV data to OpenGL.
Basically this data is a bunch of Arrays.
This way you could easly make a few kb sized viewer (30kb + obj data) - or you can write your own OBJ importer using the Format description from here:
http://www.wotsit.org/download.asp?f=vi ... =244988950
as for Irrlicht: if your unsure how to extract Vertex Data etc from a model i can provide an example.
Thalius
Use Irrlicht to load your object file and dump vertex / Indice / UV Data to a custom file ( which you in the final exe could include via includebinairy or paste as text - depending how you store it - you could even compress that section using Pbs pack commands ). Then use the OpenGL include
from: http://www.purebasic.fr/english/viewtopic.php?t=28835
to create your lil viewer passing the vertex / Indice / UV data to OpenGL.
Basically this data is a bunch of Arrays.
This way you could easly make a few kb sized viewer (30kb + obj data) - or you can write your own OBJ importer using the Format description from here:
http://www.wotsit.org/download.asp?f=vi ... =244988950
as for Irrlicht: if your unsure how to extract Vertex Data etc from a model i can provide an example.
Thalius
"In 3D there is never enough Time to do Things right,
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone!
"
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone!

Re: How to show a 3D Wavefront obj file in PB ?
May be you can use Deledto convert your Wavefront to Mesh ?raska wrote:I need to know if there is some way to use any library or something to show a Wavefront *.obj file in solid, points and edges mode. At same time that it can be moved with the mouse in Zoom, Pan and rotate options.
Thanks
Please correct my english
http://purebasic.developpez.com/
http://purebasic.developpez.com/
Wow, that sounds good, but very advanced for a PB newbie like me.Thalius wrote:Actually the dll itself is about 1.2 megs. If thats till too much you could use this as a converter / loader.
Use Irrlicht to load your object file and dump vertex / Indice / UV Data to a custom file ( which you in the final exe could include via includebinairy or paste as text - depending how you store it - you could even compress that section using Pbs pack commands ). Then use the OpenGL include
from: http://www.purebasic.fr/english/viewtopic.php?t=28835
to create your lil viewer passing the vertex / Indice / UV data to OpenGL.
Basically this data is a bunch of Arrays.
This way you could easly make a few kb sized viewer (30kb + obj data) - or you can write your own OBJ importer using the Format description from here:
http://www.wotsit.org/download.asp?f=vi ... =244988950
as for Irrlicht: if your unsure how to extract Vertex Data etc from a model i can provide an example.
Thalius

My program manage some *,obl files and read their vertex to manipulate them in a way that I need to get what I want. Although the program really don't need the *.obj simple player it would be a good addition.
My idea was that every time that the program get an *.obj file it could call to an own smal library or Procedure able to show the obj in an small window.
I just got amazed after to see what the italian guy made with those demos. I will check them slowly trying to understand what he does.

Thanks for all your help and fast response
Re: How to show a 3D Wavefront obj file in PB ?
For my own use maybe yes, but it is an extra work that I really don't want yo do. For all my friends that using the program really it would be a big issue, because they don't know how to do it.Comtois wrote:May be you can use Deledto convert your Wavefront to Mesh ?raska wrote:I need to know if there is some way to use any library or something to show a Wavefront *.obj file in solid, points and edges mode. At same time that it can be moved with the mouse in Zoom, Pan and rotate options.
Thanks
I think I will study the Thalius suggest to see what can I do

Thanks anyway