Posted Friday, 19 February, 2010 - 14:46 by master2k
Hi JTalon,
a quick and dirty fix would be the floatparameters / 1000000, another fix would be to replace the dots "." when parsing with a comma "," but i thougt the quick and dirty mehtod is easier to apply :), dunno wheter it's slower or faster.
Posted Friday, 19 February, 2010 - 15:06 by c2woody
Quote:
another fix would be to replace the dots "." when parsing with a comma ","
I think this is due to the OS's localization setting (GUI language), so if you're parsing from a defined format (and not user input) the following is what I'm using mostly:
if (Single.TryParse(token, NumberStyles.Float, CultureInfo.InvariantCulture, out float_value)) { ... }
Posted Tuesday, 23 February, 2010 - 15:28 by emacinnes
I've got a modified 3DS file loader that will load the file and then put it into a Vertex Buffer Object, or a display list if VBO is unavailable, or just render it flat if all else fails.
The process is as follows, and is designed in part for multi-threaded loading of assets, hence the number of steps:
Geometry ge = new Geometry();
ge.Filename = "test.3ds";
ge.LoadFromFile(); // Can be called from another thread
ge.Finalise(); // Needs to be called from OpenGL thread, this uploads to the VBO/display list
The idea later is that this is a generic model loader, but for now only .3DS support is included.
Rendering has three options:
RenderNormalTree() and RenderDesignTree() which will render out all the geometry in either standard, or with wireframe border outlines.
The third one is RenderSelectTree() for rendering the model for selection (no textures or normals rendering, just geometry. Individual Objects from the 3DS file will be selectable, not just the entire Geometry).
If anybody's keen, drop me a note, and I'll see about working up an independent example of this. You will need the ISE.Core, ISE.System and Tao.Externals Dlls from Icarus, (available here: http://www.pointscape.com.sg/joomla/index.php?option=com_content&task=bl...) which can then render in OpenTK's GameWindow.
Posted Tuesday, 23 February, 2010 - 20:13 by Icefox
I'm interested in a general model loader type library; I wouldn't mind writing up and integrating an .obj loader for it, and maybe one or two other formats if I have time. I'd prefer to have it entirely based on OpenTK though.
Posted Sunday, 28 February, 2010 - 02:48 by Icefox
Well, I got sick of waiting and started writing my own model loader library. So far it loads geometry from Milkshape 3D and Wavefront .obj files, and Collada's up next. Suggestions and contributions are welcome, of course.
Is there anything in particular I need to do to make a project page? I can't seem to figure out how to do it...
Preliminary source and such attached. Instructions are in the README.txt; the previewer was hacked together in 10 minutes from some of the OpenTK example code, so sorry that it sucks.
Thanks a lot! I'll see if I can get anything useful from the Collada loader. Does anyone have any suggestions for other file formats that would be useful?
Comments
Re: Model Loader: Current State?
Gald you found it! I started to reply a couple of times, but my reply never did come together.
Re: Model Loader: Current State?
Hi JTalon,
a quick and dirty fix would be the floatparameters / 1000000, another fix would be to replace the dots "." when parsing with a comma "," but i thougt the quick and dirty mehtod is easier to apply :), dunno wheter it's slower or faster.
M2k
Re: Model Loader: Current State?
another fix would be to replace the dots "." when parsing with a comma ","
I think this is due to the OS's localization setting (GUI language), so if you're parsing from a defined format (and not user input) the following is what I'm using mostly:
if (Single.TryParse(token, NumberStyles.Float, CultureInfo.InvariantCulture, out float_value)) { ... }
Re: Model Loader: Current State?
I've got a modified 3DS file loader that will load the file and then put it into a Vertex Buffer Object, or a display list if VBO is unavailable, or just render it flat if all else fails.
The process is as follows, and is designed in part for multi-threaded loading of assets, hence the number of steps:
Geometry ge = new Geometry();
ge.Filename = "test.3ds";
ge.LoadFromFile(); // Can be called from another thread
ge.Finalise(); // Needs to be called from OpenGL thread, this uploads to the VBO/display list
The idea later is that this is a generic model loader, but for now only .3DS support is included.
Rendering has three options:
RenderNormalTree() and RenderDesignTree() which will render out all the geometry in either standard, or with wireframe border outlines.
The third one is RenderSelectTree() for rendering the model for selection (no textures or normals rendering, just geometry. Individual Objects from the 3DS file will be selectable, not just the entire Geometry).
If anybody's keen, drop me a note, and I'll see about working up an independent example of this. You will need the ISE.Core, ISE.System and Tao.Externals Dlls from Icarus, (available here: http://www.pointscape.com.sg/joomla/index.php?option=com_content&task=bl...) which can then render in OpenTK's GameWindow.
Cheers,
Euan
Re: Model Loader: Current State?
I'm interested in a general model loader type library; I wouldn't mind writing up and integrating an .obj loader for it, and maybe one or two other formats if I have time. I'd prefer to have it entirely based on OpenTK though.
Re: Model Loader: Current State?
Well, I got sick of waiting and started writing my own model loader library. So far it loads geometry from Milkshape 3D and Wavefront .obj files, and Collada's up next. Suggestions and contributions are welcome, of course.
Is there anything in particular I need to do to make a project page? I can't seem to figure out how to do it...
Preliminary source and such attached. Instructions are in the README.txt; the previewer was hacked together in 10 minutes from some of the OpenTK example code, so sorry that it sucks.
Re: Model Loader: Current State?
To create a project, just visit Create content -> Project< and fill in the fields. Afterwards, create a new project release to hold the zip file.
Re: Model Loader: Current State?
Someone announced a Collada loader some time ago and it is apparently available here.
Re: Model Loader: Current State?
Project is created: http://opentk.com/project/Meshomatic
Thanks a lot! I'll see if I can get anything useful from the Collada loader. Does anyone have any suggestions for other file formats that would be useful?
Re: Model Loader: Current State?
I'll get the generic Renderer published shortly, just dealing with the ramifications of the Chile earthquake, and some linux issues at the moment.
Euan
Icarus Scene Engine:
http://www.pointscape.com.sg/joomla