Horde3D http://horde3d.org/forums/ |
|
colladaconv, extracting color values http://horde3d.org/forums/viewtopic.php?f=1&t=1000 |
Page 1 of 1 |
Author: | EsaK [ 02.11.2009, 20:50 ] |
Post subject: | colladaconv, extracting color values |
I'm wondering if there are any plans of extracting color values from effect's in collada files (in colladaconv), for example the values for ambient, diffuse, etc? If not, is there any interest in getting the code for doing this? (I have done this for diffuse.) .... I'm guessing the problem would be how to write out these to the material file... |
Author: | swiftcoder [ 02.11.2009, 22:14 ] |
Post subject: | Re: colladaconv, extracting color values |
EsaK wrote: I'm wondering if there are any plans of extracting color values from effect's in collada files (in colladaconv), for example the values for ambient, diffuse, etc? The bigger issue is that the standard shaders have no concept of ambient/diffuse/specular colour inputs, as these are much more often supplied by textures.
If not, is there any interest in getting the code for doing this? (I have done this for diffuse.) .... I'm guessing the problem would be how to write out these to the material file... |
Author: | EsaK [ 03.11.2009, 08:47 ] |
Post subject: | Re: colladaconv, extracting color values |
I'll rephrase my question: Are there any plans to develop colladaconv further? My problem is that if I make local changes to my copy (handling diffuse/ambient colors) and then a new version of colladaconv is released I will loose my changes (if I don't reintegrate them into the new codebase). Any thoughts of how this could be handled (or maybe I'll just have to face the fact that there is no solution to this)? |
Author: | Volker [ 03.11.2009, 09:01 ] |
Post subject: | Re: colladaconv, extracting color values |
Maybe we could add some shader code and define flags that support ambient/diffuse/specular colour inputs. Although I think that most of the time textured objects are used, it may be good to have this possibility anyway, so that people who try to export non textured objects don't are confused because they got no rendering output. So if you can provide a patch to the collada converter with your changes, we can try to integrate it, and maybe someone find the time to add ambient and specular colour support. |
Author: | EsaK [ 08.11.2009, 21:17 ] |
Post subject: | Re: colladaconv, extracting color values |
Should I attach the changed files here (just 2 files) or upload them to the SVN trunk? |
Author: | Volker [ 08.11.2009, 22:29 ] |
Post subject: | Re: colladaconv, extracting color values |
I would propose to post the files or a patch here. |
Author: | marciano [ 08.11.2009, 23:21 ] |
Post subject: | Re: colladaconv, extracting color values |
Shader flags have to be handled with care, else we can quickly run into the common and serious problem of "permutation explosion" where you get thousands of combinations or even a lot more. I would advise against adding a new flag for color values. Instead, I would suggest to add a diffuse multiplier which always modulates the diffuse texture. If no texture is desired, a default white texture is used. To make this convenient, the shader system needs to be slightly extended so that default textures can be specified for samplers. |
Author: | EsaK [ 09.11.2009, 20:26 ] | ||
Post subject: | Re: colladaconv, extracting color values | ||
I have attached the 2 files with the changes in the attached zip file. The sections I have added in the code are commented with "Support for solid colors". I'm not entire sure how you would like the colors to be written in the material file... now they are used with a new shader (not existing yet, hopefully someone can write this since I'm not so good with shaders). Anyway, feel free to change the setup as you like.
|
Author: | marciano [ 12.11.2009, 01:01 ] |
Post subject: | Re: colladaconv, extracting color values |
Thanks for the code. I will take a closer look at the weekend. |
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |