Hello Johannes, On 11/29/2010 04:01 AM, Johannes Brunen wrote: > As drop.io has been suspended I have tried another file sharing alternative. > You can download my files from > > http://ge.tt/#5ljmAV > > (If you have another sharing method as convenient and reliable as drop.io > let me know about it.)
i've used mediafire.com, not sure how it compares to drop.io, never got to use it (for uploading) before they closed it ;) > What you can find in the ZIP file is: I've not looked at it yet, but wanted to try answering your questions. > a) A folder 'lib3ds' which contains the CMaked lib3ds project. I did make > some minor changes with respect to endianess. Iff this project is going to > be part of OpenSG I would recommend to provide the lib3ds files with the > OpenSG distribution. hm, if lib3ds needs to be modified, having it as a separate shared lib does not have much benefit, perhaps just compiling the modified code into the new loader is the most convenient way to go then? > b) Changes in OpenSG to access this new suppport library. I'm not sure about > the correctness of this part, however. > > c) Little modifications to SceneFileHandler. This is necessary, as the > current implementation does allows to install multiple file type handlers > for the same suffix, but it does not provide any means(?) to actually use > another one than the first one in the mapping list. I did some shortcut in > allowing to subtract scene file type handlers the user is not interested in. > I did provide an example 'lib3dsloading.cpp' for that. I think that we > should provide some means for the user to write its own file type handlers > for already handled file types. Maybe he has an in house handler for the > same file type or he must handle files of a different type but using the > same suffix. when registering a handler for a file type you can specify that it can override existing handlers and what priority it has when overriding (see 3rd and 4th argument to SceneFileType c'tor). > d) A scene file type handler for 3ds which uses the lib3ds library as its > backend. I have named it 'A3DSLibSceneFileType' and you can found it in > 'opensg\Source\System\FileIO\3DSLib'. I would appreciate if this could be > part of OpenSG. Maybe it could be placeed in the contrib section. However, > the handler works already pretty fine (but could be finer, see below for > that). ok, but why not Lib3DSSceneFileType? I always found the leading 'A' to make it a legal identifier in C++ not very appealing - not terribly important though ;) > e) Some sample models: > Models\HondaCBR.3DS -> now handled correctly. The remaining > problems are intrinsic to the model and (imho) can't be solved from a file > type handler. > Models\107ford-oldcar.3DS -> same problems as with standard file > type handler. What should we do with these cases? > Models\transformer-bumblebee.3DS -> handled correctly > Models\creature-rig.3DS -> this one crashes in the lib3d library. > I suspect that the model is corrupt. I'm looking for a method to avoid the > crash but have not found a solution so far. > Models\jet\HORNET_L.3DS -> this one is interesting as it provides > a bunch of special textures for bump mapping and reflection mapping. I would > like to handle these cases but need help at this end. See below. > > Ok, as already said, I need some help for handling models containing special > textures. The lib3ds library does provide information about the following > texture types: > > texture1_map > texture2_map > opacity_map > bump_map > specular_map > shininess_map > self_illum_map > reflection_map > > I do not know about the semanic of some of them but would like to provide > support for the as much as I can. I don't know what they are used for exactly either and some of it sounds like it would be quite tricky when not using an offline raytracer... > Additionally, there are mask textures for > each of these maps but I do not know what these are used for. > I have already implemented the framework for handling these texture types > and started with the bump_map. I would like to write a shader for bump > mapping on behalf of this texture. Unfortunately, this is my very first > shader. Naively I did look at > > http://gpwiki.org/index.php/OpenGL:Tutorials:GLSL_Bump_Mapping > > but I could not find a way to make use of the following vertex shader types: > > attribute vec3 tangent; > attribute vec3 binormal; > > So my first question goes as follows: > How do I implement this case in OpenSG? for the time being you'll have to use gl_MultiTexCoordN to access vertex attributes. > As you can see in the implementation file > 'opensg\Source\System\FileIO\3DSLib\OSG3DSLibLoader.cpp', I have already set > up a simple shader in function 'handle_bump_map'. > Could you provide me with some details about how to setup the case of > attribute variables? > I did read the archive but could not make much sense about what I found > there, sorry. > > The next question I have is with regard to the semantics of the different > texture types. > Do you have semantic explanations for some of them? no, sorry. > Additionally, do you have knowlege about how these should be handled in > OpenSG? well, the problem is that some (all?) of them will require shaders to actually work and unfortunately that means it is almost not possible to support this in a fully generic way - as an example of the kind of problems that come up: How many lights should be considered in the fragment shader and what type of light source do they represent? How do you fight the combinatorial explosion of all the combinations of different textures that can be present/absent? I'm afraid I don't have answers to these questions, but I'd be curious to hear about ideas for/experiences in solving these. Cheers, Carsten ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users