Horde3D http://horde3d.org/forums/ |
|
Multiple UV sets http://horde3d.org/forums/viewtopic.php?f=2&t=434 |
Page 1 of 1 |
Author: | Indecisive [ 19.07.2008, 04:27 ] |
Post subject: | Multiple UV sets |
Does the collada converter support multiple UV sets? I guess that it may not but if it does, could anyone give me a clue as to how I would I go about accessing a particular set of UVs within a shader? Basically I would like to be able to have two sets of UVs for the same object, the first where all the quads are unitised and laid on top of one another to allow me to reuse a small texture many times across the surface of a wall to produce a decent resolution base texture for the wall and then use a second set of UV coords in which every polygon has unique UV space so that I can bake an ambient occlusion map and add (low resolution) details to break up the tiled look of the base texture. The idea is that then these two textures would be applied through their respective UV sets and combined in the fragment shader. Another way I thought of doing this that might work would be with vertex colouring but again I'm not sure if vertex colours are converted from the collada file. Any information on any of this would be greatly appreciated. |
Author: | marciano [ 19.07.2008, 19:14 ] |
Post subject: | Re: Multiple UV sets |
Indecisive wrote: Does the collada converter support multiple UV sets? Yes it does. By default it exports two sets but only if a second set is available in the Collada file. You have access to the coordinates in the shader using texCoords1. If there is no second set, the coordinates are (0,0). But this was never tested in detail, so I can't promise that there is not still a small bug. |
Author: | Indecisive [ 20.07.2008, 00:13 ] |
Post subject: | Re: Multiple UV sets |
Ah that's great to know, thanks. I actually tried using texCoords1 and it just seemed to apply the texture through the first set of UVs again (and I checked the collada file and there are definitely two sets being exported). This is why I asked the question because I wasn't sure I was using the correct method. I'm guessing I just made a mistake in the shader so I'll have another attempt now that I know that it should work this way. Thanks again |
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |