Horde3D

Next-Generation Graphics Engine
It is currently 22.11.2024, 07:20

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Multiple UV sets
PostPosted: 19.07.2008, 04:27 
Offline

Joined: 19.06.2008, 11:51
Posts: 10
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Multiple UV sets
PostPosted: 19.07.2008, 19:14 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Multiple UV sets
PostPosted: 20.07.2008, 00:13 
Offline

Joined: 19.06.2008, 11:51
Posts: 10
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 :D


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 14 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