Questions about the track exporter

Re: Questions about the track exporter

Postby hiker » 28 Jan 2010, 00:51

Varivar {l Wrote}:
asciimonster {l Wrote}:I managed to generate a lightmap in Blender. It's a very simple lightmap, if it works, the first tunnel (with the moving cart) should appear green, and the other parts yellow. If this works I will make a real lightmap. The zip archive contains a lightmap (in png format) and the blend file with the lightmap applied to all faces. I hope you can use this.

I had a quick look, but it appears that only the lightmap was applied, while my understanding is that each vertex should have two textures for lightmaps to work in irrlicht - and I have no idea how to do this in blender (besides, I usually work only with a laptop without mouse, so there is no way to do any decent work with blender with this :( ).

But one other comment: Minibjorn did some work using vertex colours, which gets multiplied with the textures. Wouldn't that give more or less the same effect, and would save us to distribute another texture?

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: Questions about the track exporter

Postby horace » 28 Jan 2010, 02:13

hiker {l Wrote}:But one other comment: Minibjorn did some work using vertex colours, which gets multiplied with the textures. Wouldn't that give more or less the same effect, and would save us to distribute another texture?


i think there usually isn't enough tesselation to give enough resolution for good quality shadows with vertex colours.
horace
 
Posts: 94
Joined: 21 Jan 2010, 16:32

Re: Questions about the track exporter

Postby hiker » 28 Jan 2010, 10:36

Hi,

horace {l Wrote}:i think there usually isn't enough tesselation to give enough resolution for good quality shadows with vertex colours.

I can't comment on that. Apparently Minibjorn's approach already works, and I committed untested support for lightmaps, so we can just try and compare the two. I can't say how much the performance and quality impact of the two approaches will be.

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: Questions about the track exporter

Postby Varivar » 28 Jan 2010, 15:14

hiker {l Wrote}:I had a quick look, but it appears that only the lightmap was applied, while my understanding is that each vertex should have two textures for lightmaps to work in irrlicht - and I have no idea how to do this in blender (besides, I usually work only with a laptop without mouse, so there is no way to do any decent work with blender with this :( ).

I already suspected something like that. It is possible to have two uv layers in Blender for the same object, but I need to find out how.

But one other comment: Minibjorn did some work using vertex colours, which gets multiplied with the textures. Wouldn't that give more or less the same effect, and would save us to distribute another texture?

The quality will depend on the number of vertices. Possibly the quality will be a bit lower, but vertex colors are faster to render than lightmaps. I will have a look at this.
Varivar
 

Re: Questions about the track exporter

Postby Varivar » 29 Jan 2010, 20:57

I've created a new testscene with the mines track. In this one the object "cave" has two UV layers, one for the textures called "textures" and another called "lightmap", with the lightmap applied to it. I hope this is usable.
Attachments
mines_lightmap.zip
(4.14 MiB) Downloaded 311 times
Varivar
 

Re: Questions about the track exporter

Postby hiker » 02 Feb 2010, 04:02

Varivar {l Wrote}:I've created a new testscene with the mines track. In this one the object "cave" has two UV layers, one for the textures called "textures" and another called "lightmap", with the lightmap applied to it. I hope this is usable.

quick update: I'll try to have a look soon. First tests show that indeed some of the meshes have two textures when exported to b3d (mine_rock, then lightmap), so that looks fine. I have to see how to get this all to work in stk now.

Thanks!
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: Questions about the track exporter

Postby hiker » 08 Feb 2010, 14:51

Hi,

Varivar {l Wrote}:I've created a new testscene with the mines track. In this one the object "cave" has two UV layers, one for the textures called "textures" and another called "lightmap", with the lightmap applied to it. I hope this is usable.

sorry, forgot to send an update earlier: while I can see that part of the track has indeed two textures, some parts of the tracks are now not converted into a physics model anymore, resulting in the kart falling through the (now non-existent) floor :(

I need more time to look into that, but have to fix a lot of bugs first.

Thanks for the test case - I will come back to it!

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: Questions about the track exporter

Postby Varivar » 08 Feb 2010, 19:12

Thanks for the update. Just take your time, I'm not in a hurry :)
Varivar
 

Who is online

Users browsing this forum: No registered users and 1 guest