Horde3D

Next-Generation Graphics Engine
It is currently 28.03.2024, 09:52

All times are UTC + 1 hour




Post new topic Reply to topic  [ 52 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: 06.06.2011, 16:28 
Offline

Joined: 09.02.2011, 17:02
Posts: 83
Volker wrote:
If you are using the SourceForge SVN trunk or the official release, forget the ColladConvd hint from Alex. It's only relevant for the community branch where the Debug versions of the executables and shared libraries are marked with a 'd' at the end. If you've got a ColladaConv.exe use this, if you've got a ColladaConvd.exe use that.

You must not rename any exe. You are just using what you've got at your working copy.

Have you ever used a command line? It might be easier first to try out the right command line parameters before adjusting the batch file.

Supposing you are using windows, start a command shell by typing "cmd" in the Run or Search field (depending what version windows you are using)
Then change to the directory where ColladaConv.exe is saved on your harddisk. Try googling if you don't know how to change the current directory on the command line (keyword = cd). Then copy your dae file in the same directory and try typing

Code:
ColladaConv yourfile.dae -type anim


That should create some .anim files if your model contains animations.


Hi Volker & Elisbeth
Elisbeth I had the same problem and the thing that Volker suggested you must work and will work as I had also got the same solution

Well Volker! You are right but while converting these .dae files I get the problem of material for example . if i have an object animated or
only simple model, then after converting it with Colladaconvd i get .scene .material.xml .anim but in my .material when i use it in horde3deditor
it doesn't find anything because ...
in the file .material.xml it refers somewhere to

Code:
   <Shader source="shaders/model.shader" />


although there is nothing that i get model.shader that i can place in the shaders so that later it could use it for objects ...
Note For testing export i didnt apply any material on my animateed or simple object, in simple words i have an object that
has only a specific color for example "Red"

Do you have any idea where could be the problem ..?

Regards Imran Habib


Top
 Profile  
Reply with quote  
PostPosted: 06.06.2011, 19:41 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
imranhabib wrote:
in the file .material.xml it refers somewhere to

Code:
   <Shader source="shaders/model.shader" />


although there is nothing that i get model.shader that i can place in the shaders so that later it could use it for objects ...
Note For testing export i didnt apply any material on my animateed or simple object, in simple words i have an object that
has only a specific color for example "Red"

Are you expecting the shader to be created by ColladConv or did I misunderstood your question?
That won't be possible. If the model.shader is referenced within the material, it is because it's the default shader used for rendering objects.
If you don't have textures, the default model.shader won't work. AFAIK we got some sample shader for material colors referenced in the wiki.


Top
 Profile  
Reply with quote  
PostPosted: 06.06.2011, 19:49 
Offline

Joined: 07.05.2011, 21:12
Posts: 14
Volker wrote:
If you are using the SourceForge SVN trunk or the official release, forget the ColladConvd hint from Alex. It's only relevant for the community branch where the Debug versions of the executables and shared libraries are marked with a 'd' at the end. If you've got a ColladaConv.exe use this, if you've got a ColladaConvd.exe use that.

You must not rename any exe. You are just using what you've got at your working copy.

Have you ever used a command line? It might be easier first to try out the right command line parameters before adjusting the batch file.

Supposing you are using windows, start a command shell by typing "cmd" in the Run or Search field (depending what version windows you are using)
Then change to the directory where ColladaConv.exe is saved on your harddisk. Try googling if you don't know how to change the current directory on the command line (keyword = cd). Then copy your dae file in the same directory and try typing

Code:
ColladaConv yourfile.dae -type anim


That should create some .anim files if your model contains animations.


Yes Imran And Volker ! Thank You specially to Volker its working now perfectly
you both are right...
imran about your problem i must say i have even done that too and I think model.shader is not the 1 thing that is to be given by
collada converter , but i really also don't know what should we use for replacing that , because while loading the animated object in
horde3d editor I used the shaders/model.shader from the given SVN but still while loading it gives me some error as follows
Code:
Shader resource 'shaders/model.shader' in line 206: Error: Unexpected token found

hope Volker give both of us a better solution to this problem as well

Regards Elisbeth


Top
 Profile  
Reply with quote  
PostPosted: 06.06.2011, 21:23 
Offline

Joined: 09.02.2011, 17:02
Posts: 83
Volker wrote:
imranhabib wrote:
in the file .material.xml it refers somewhere to

Code:
   <Shader source="shaders/model.shader" />


although there is nothing that i get model.shader that i can place in the shaders so that later it could use it for objects ...
Note For testing export i didnt apply any material on my animateed or simple object, in simple words i have an object that
has only a specific color for example "Red"

Are you expecting the shader to be created by ColladConv or did I misunderstood your question?
That won't be possible. If the model.shader is referenced within the material, it is because it's the default shader used for rendering objects.
If you don't have textures, the default model.shader won't work. AFAIK we got some sample shader for material colors referenced in the wiki.


Thanks Volker !
Yeah You are right and Elisbeth is also right .. Thanks to you both

anyways ! Volker I found something related to how to use .shader if we don't have textures and only have different color materials ,

Elisbeth you can look at it too may be it is helpful for you too

http://www.horde3d.org/wiki/index.php5? ... om_Blender

but Volker it says that should get it from community branch , i got that materialCol.shader.xml and tried using it in horde3deditor but i got following problem in horde 3d editor

Resource 'shaders/materialCol.shader.xml' of type 6: No data loaded (file not found?)


Although i have this file materialCol.shader.xml in the folder shaders but still it says No data loaded

I downloaded this materialCol.shader.xml from this link

http://hcm-lab.de/public/Horde3D/assets ... shader.xml

Regards Imran Habib


Top
 Profile  
Reply with quote  
PostPosted: 07.06.2011, 08:20 
Offline

Joined: 17.11.2009, 17:00
Posts: 205
Location: Russia, Moscow
2 imran:
This shader was written for an older version of Horde3D (for beta 2 or beta 3). Beta 4 and Beta 5 use different shaders (not *.shader.xml, but *.shader). You will have to rewrite the shader with the beta 4(5) shader syntax in order to work with it...


Top
 Profile  
Reply with quote  
PostPosted: 16.06.2011, 13:46 
Offline

Joined: 09.02.2011, 17:02
Posts: 83
Irdis wrote:
2 imran:
This shader was written for an older version of Horde3D (for beta 2 or beta 3). Beta 4 and Beta 5 use different shaders (not *.shader.xml, but *.shader). You will have to rewrite the shader with the beta 4(5) shader syntax in order to work with it...


Sorry ! i was on a vacation and just came back today,
but i really don't know what Beta is and what it syntax will be , and i think this must be provided by the horde3d editor, I should be given a proper thing that supports my materials to
export and then to be used in horde 3d editor.

Regards Imran Habib


Top
 Profile  
Reply with quote  
PostPosted: 16.06.2011, 14:53 
Offline

Joined: 07.05.2011, 21:12
Posts: 14
imranhabib wrote:
Irdis wrote:
2 imran:
This shader was written for an older version of Horde3D (for beta 2 or beta 3). Beta 4 and Beta 5 use different shaders (not *.shader.xml, but *.shader). You will have to rewrite the shader with the beta 4(5) shader syntax in order to work with it...


Sorry ! i was on a vacation and just came back today,
but i really don't know what Beta is and what it syntax will be , and i think this must be provided by the horde3d editor, I should be given a proper thing that supports my materials to
export and then to be used in horde 3d editor.

Regards Imran Habib


I mean I don't know what should i write to tell my code about colors of the specific walls with different colors,
Can you kindly suggest what should i do if i have a modeled object and it has walls, and on each side I have different colors, not materials but colors only...

Regards Imran Habib


Top
 Profile  
Reply with quote  
PostPosted: 17.06.2011, 10:04 
Offline

Joined: 17.11.2009, 17:00
Posts: 205
Location: Russia, Moscow
You can make a small texture (4x4 pixels is sufficient) with the desired color in Paint/Photoshop, apply this texture to your model in your modelling tool (Max, Maya, Blender) and reexport the model.
The drawback of this method is that you will have to change the texture if you want a different color.


Top
 Profile  
Reply with quote  
PostPosted: 18.06.2011, 17:23 
Offline

Joined: 09.02.2011, 17:02
Posts: 83
Irdis wrote:
You can make a small texture (4x4 pixels is sufficient) with the desired color in Paint/Photoshop, apply this texture to your model in your modelling tool (Max, Maya, Blender) and reexport the model.
The drawback of this method is that you will have to change the texture if you want a different color.


Well You are right , but this is not the problem actually , what i will get after exporting will be a
1. ".scene" xml
2. ".geo" and
3. ".material " xml

In .material xml it will have a link to another xml , and in this xml i have to specify .shader that some one refferred that we should use .shader
but for colors we have to use some sample shader for material color which i got on this link

http://hcm-lab.de/public/Horde3D/assets ... shader.xml

Now , using this I get the modeled object but I can't see it because I don't know how to specify colors,
I am sure that my object is in the scene because when I see the debug mode in horde3d editor I see that I have the object
I mean the one that we can see in the mesh form , so I can see the geometry of the object in horde3d editor but I can't see
the object because I have to change something in material color xml that i gave the link up , Do you or any 1 has an idea how
to do that

Regards Imran Habib


Top
 Profile  
Reply with quote  
PostPosted: 18.06.2011, 21:12 
Offline

Joined: 17.11.2009, 17:00
Posts: 205
Location: Russia, Moscow
As I've written before, the color shader will not work with current version of Horde (beta 5). It was written for beta 2 or beta 3, because it still has .shader.xml filetype and not just .shader. You can see the difference between the shaders that were written for beta 2 and beta 4(5). Shaders for beta 4 are plain text files (you can open, for example, model.shader), but color shader was written in a xml form. As horde editor was modified to work with Horde beta 4, it won't understand shader files that were written for earlier versions of horde. And that's why you don't see your model in the editor.

If you make a small texture, apply it to your model in modelling tool, and export it, the material will link to model.shader. If you have a project in the editor, then manually copy the exported data to your models directory in your editor project directory (if your editor projects dir is in My Documents, it should be something like My Documets\Horde Editor Projects\<Project Name Directory>\models\<Model Name Directory>.). You should copy your small colored texture to this directory too. So, in your <Model Name Directory> you should have *.geo, *.scene.xml, *.material.xml and your texture (bmp, jpg, tga, etc.).

If that doesn't help, download beta 5 release, manually copy all the shaders from beta 5 Content directory to your <Project Name Directory>\shaders (you should do this, because shaders in the editor's repository, that are copied to the newly created project, are pretty old). If that doesn't help either, copy Horde3D.dll and Horde3DUtils.dll from beta 5 Win32 directory to your editor's bin directory (because dlls are also pretty old).


Top
 Profile  
Reply with quote  
PostPosted: 18.06.2011, 23:32 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Using material colors is not that tricky. I just replaced the albedo with a custom uniform named 'Materialcol' specified in the material and in the fragment shader.

So whatever version of Horde you are using, just copy the default model shader of that version rename it to Materialcol.shader(.xml) and
remove the albedoMap sampler. Replace it with a new uniform vec4 named materialCol.

Attached a patch for Beta 5 that will draw the chicago map in pink.


Attachments:
Material Color.patch [10.47 KiB]
Downloaded 1321 times
Top
 Profile  
Reply with quote  
PostPosted: 20.06.2011, 14:39 
Offline

Joined: 09.02.2011, 17:02
Posts: 83
Volker wrote:
Using material colors is not that tricky. I just replaced the albedo with a custom uniform named 'Materialcol' specified in the material and in the fragment shader.

So whatever version of Horde you are using, just copy the default model shader of that version rename it to Materialcol.shader(.xml) and
remove the albedoMap sampler. Replace it with a new uniform vec4 named materialCol.

Attached a patch for Beta 5 that will draw the chicago map in pink.


Your arrows are quick to pierce but of no use as you are shooting them in air without aiming the objective, :wink: you are suggesting in such a way
as I have developed the horde3d editor and i have to change things and it takes minutes only I can't read what is in you mind! Sorry ! but its awful
to get such a reply , it seems kind of related but its not well organised answer to let some one understand

you wrote "rename it" "remove it" and "replace it " where should i do all this stuff from the xml that i have or the file that you wanted me to rename
as materialCol

Kindly write summarised and organised number of steps to follow , it should not be my headache to change things that are already developed by you

Regards Imran Habib


Regards Imran Habib


Top
 Profile  
Reply with quote  
PostPosted: 20.06.2011, 15:42 
Offline

Joined: 09.02.2011, 17:02
Posts: 83
Volker wrote:
Using material colors is not that tricky. I just replaced the albedo with a custom uniform named 'Materialcol' specified in the material and in the fragment shader.

So whatever version of Horde you are using, just copy the default model shader of that version rename it to Materialcol.shader(.xml) and
remove the albedoMap sampler. Replace it with a new uniform vec4 named materialCol.

Attached a patch for Beta 5 that will draw the chicago map in pink.



Anyways Guessing from your hints I did
1. Got the model.shader from shaders directory of horde 3d editor
2. Renamed it, and then replaced the word albedomap in the xml where
as follows
Code:
<Material>
  <Shader source="MaterialCol.shader" />
 <Sampler name="MaterialCol" map="texturemap.png" /> // it was written here albedomap i changed it to MaterialCol
</Material>

but still i can only see node attached in the tree but i don't get the object, I can see it in the debug mode but I can't see it in real as a n object
Kindly guide !


Top
 Profile  
Reply with quote  
PostPosted: 20.06.2011, 19:31 
Offline

Joined: 17.11.2009, 17:00
Posts: 205
Location: Russia, Moscow
2 imran:
Volker attached a patch that you should use with your SVN client. It will modify the material of the man model, that comes with Horde3D, and adds a new shader that supports colors.

Anyway, I dragged the shader out of the patch. Here it is.
Place the shader in your <Project Directory Name>\shaders.
In your material you should add the line
Code:
<Uniform name="materialCol" a="1.0" b="0.0" c="1.0" d="1.0" />

These values are the color of the displayed model. You should modify them to get the color you want.

So, your material should look like:
Code:
<Material>
  <Shader source="MatColor.shader" />
  <Uniform name="materialCol" a="1.0" b="0.0" c="1.0" d="1.0" />
</Material>

[Offtop]
For some reason I couldn't attach the file directly, the forum says "The extension shader is not allowed". I tried to change filename to "MatColor.shader._", but it won't upload either.


Top
 Profile  
Reply with quote  
PostPosted: 20.06.2011, 20:26 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
@imran

As far as I know you're currently writing your master thesis in computer science, so I thought you may be able to apply the patch to the SVN and see what has changed. From watching the diff it should be clearer what I meant with my (maybe too) short post.

How one can apply a patch to a SVN revision can be found using Google. TortoiseSVN may be one tool. It allows you watching and applying the changes in a very convenient way.

Irdis wrote:
[Offtop]
For some reason I couldn't attach the file directly, the forum says "The extension shader is not allowed". I tried to change filename to "MatColor.shader._", but it won't upload either.

Thanks for the info, should be possible now.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 52 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 54 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group