UV Mapping

General questions about Indigo, the scene format, rendering etc...
Post Reply
7 posts • Page 1 of 1
thirdsense
Posts: 3
Joined: Thu Jan 25, 2007 10:04 pm

UV Mapping

Post by thirdsense » Thu Jan 25, 2007 10:32 pm

hi,
first of all i must say that the light distribution of indigo is great and very easy to use. congratulations. for now i'm a radiance (sometimes blender) user and so i am used to define my materials in text mode which is very fast and flexible.

unfortunatly i can't get the clue of how to change my uv texture parameters (or even what the parameters mean). i browsed the forum and found some older threats where people have been asking in the same direction but i found no answer till now.

as i use indigo in architectural purpose i don't need the complex uv unwrapping/mapping procedures blender or other software use. in general i want to map a tile-texture on a cube similar model. to do so it would be great to be able to change the size and the starting point of the texture. i don't think you need much more for good architectural renderings (bump map would be the same parameters).

if this is already possible and there are some tutorials about texture settings somewhere please give me a link.

regards
thirdsense

User avatar
suvakas
3rd Place Winner
Posts: 2613
Joined: Mon Sep 04, 2006 11:08 pm
Location: Estonia
Contact:

Post by suvakas » Thu Jan 25, 2007 10:44 pm

Why not to use Indigo exporter for Blender? It should do the job and much more.. i think 8)
I dont imagine how can one edit uv parameters manually. :roll:

thirdsense
Posts: 3
Joined: Thu Jan 25, 2007 10:04 pm

Post by thirdsense » Thu Jan 25, 2007 11:06 pm

hi suvakas,
you are right. i don't need UV mapping but a automatic cube-mapping procedure.

i tried to use the uv-mapping tools of blender yesterday, but i couldn't get i satisfying result. i model my architecture with a cad software and export it to blender via dxf. due to this the model is based on triangel surfaces which seems to make unwrapping more difficult for a orthogonal geometry. but mostlikely i just don't use it correctly :oops: . the tutorials i found where in general for free forms (faces, etc.).

User avatar
zsouthboy
Posts: 1395
Joined: Fri Oct 13, 2006 5:12 am

Post by zsouthboy » Fri Jan 26, 2007 12:42 am

A "uv map" is exported with every mesh from Blender anyways; for example.

Code: Select all


<!-- Plane -->
	<mesh>
		<name>Plane</name>
		<normal_smoothing>false</normal_smoothing>
		<embedded>
			<expose_uv_set>
				<index>0</index>
				<name>uv</name>
			</expose_uv_set>
			<vertex pos="38.939232 38.939228 0.000000" normal="0.000000 0.000000 1.000000" uv0="0.000000 0.000000" />
			<vertex pos="-38.939217 38.939247 0.000000" normal="0.000000 0.000000 1.000000" uv0="0.999995 0.000000" />
			<vertex pos="-38.939236 -38.939224 0.000000" normal="0.000000 0.000000 1.000000" uv0="0.999995 0.999995" />
			<vertex pos="38.939232 -38.939232 0.000000" normal="0.000000 0.000000 1.000000" uv0="0.000000 0.999995" />
			<triangle_set>
				<material_name>Material</material_name>
				<tri>0 1 2</tri>
				<tri>2 3 0</tri>
			</triangle_set>
		</embedded>
	</mesh>
See where it says uv0="" above? that is describing the relationship between the uv map and the tris.

There are two numbers after uv0="", number one is the u position of the texture (for example, to start the texture from the edge of that tri, use "0"), number two is the v position (to end the texture, with no repeating, at the end of the tri, use "1")

Note that you can use any numbers you'd like, with the fact that a complete texture "revolution" is from 0 to 1.

So in the example above, if you want the (checker, in this case) texture to repeat 100 times across the surface, in every direction, you would modify each line like this:

Code: Select all

<vertex pos="38.939232 38.939228 0.000000" normal="0.000000 0.000000 1.000000" uv0="0.000000 0.000000" />
			<vertex pos="-38.939217 38.939247 0.000000" normal="0.000000 0.000000 1.000000" uv0="100 0.000000" />
			<vertex pos="-38.939236 -38.939224 0.000000" normal="0.000000 0.000000 1.000000" uv0="100 100" />
			<vertex pos="38.939232 -38.939232 0.000000" normal="0.000000 0.000000 1.000000" uv0="0.000000 100" />

Got it? :)

thirdsense
Posts: 3
Joined: Thu Jan 25, 2007 10:04 pm

Post by thirdsense » Fri Jan 26, 2007 2:06 am

zsouthboy,
that's interesting. i will check this out when i'm back home. will see then if i got it :D and if i can use it on more complex models with lot of surfaces.

thanx a lot

User avatar
zsouthboy
Posts: 1395
Joined: Fri Oct 13, 2006 5:12 am

Post by zsouthboy » Fri Jan 26, 2007 3:06 am

On more complex models, if your texture doesn't need to repeat, you should be able to just change the material definition (e.g., diffuse, phong) to add albedo, and use uv-set "uv", without hand editing the UVs :)

For example:

Image

Was done this way. (for the blend, at least)

I didn't edit uvs, I just specified the "checker" texture included with indigo as the blend map :)

User avatar
OnoSendai
Developer
Posts: 6243
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Post by OnoSendai » Fri Jan 26, 2007 8:04 pm

thirdsense: Indigo doesn't do any kind of automatic texture coordinate generation. The model must already have texture coordinates set for each vertex.

Post Reply
7 posts • Page 1 of 1

Who is online

Users browsing this forum: No registered users and 83 guests