Page 1 of 1
The Art of RailWorks
Posted: Thu Mar 11, 2010 9:05 am
by moranb
One of the areas that causes me most difficulty in 3DCanvas is the use of shaders, especially *.fx shaders. I have been looking at the very useful mini-tutorials on using shaders in 3DMax by Derek in his Art of RailWorks blogspot (
http://the-art-of-rws.blogspot.com ). Unfortunately I am at a loss as to how to apply the information he provides to 3DCanvas. The particular shader I would like to be able to use correctly is the Train_Light_map_with_Diffuse.fx, but I simlply do not know how. I wondered if there is any possibility that Decapod or one ot the other experts on 3DCanvas would be able to provide a 'translation' of Derek's 3Dmax tecniques from the blog for use in 3D Canvas. For example would it be possible to expand the signal box tutorial to include the use of the Train_Light_map_with _Diffuse.fx shader to provide more realistic shadows.
BFM
Re: The Art of RailWorks
Posted: Thu Mar 11, 2010 9:30 am
by decapod
The simple answers for that one are:
a) You can use that shader, just put your light map texture into the secondary texture slot.
b) that shader really isn't necessary - you can achieve exactly the same effect with the paint tool by blending (multiplying) the light map over the main texture and using the normal TexDiff instead.
The result is a single texture stage that is more efficient.
Re: The Art of RailWorks
Posted: Thu Mar 11, 2010 12:11 pm
by Bullet399
decapod wrote:The simple answers for that one are:
a) You can use that shader, just put your light map texture into the secondary texture slot.
Keep in mind that you have to create the 'light map texture' manually as 3DC don't support baking shadowmaps. Creating shadowmap manually isn't simple.
decapod wrote:b) that shader really isn't necessary - you can achieve exactly the same effect with the paint tool by blending (multiplying) the light map over the main texture and using the normal TexDiff instead.
The result is a single texture stage that is more efficient.
In my honest opinion the shader is the most nessecary shader in RW. It's the one who provides shadowmaps.
Texturing without shadowmaps ending mostly in models without depth (hope you know what i mean

).
A simple shading (darken or brighten faces) don't help much.
If you would remove all textures from Standard Buildings in RW except the shadowmaps you would seen what i mean.
I hope that 3DC will provide some tools for texture rendering and shadowbaking in the future
Re: The Art of RailWorks
Posted: Thu Mar 11, 2010 12:36 pm
by decapod
In my opinion, this shader is completely unecessary - you can create exactly the same effect by blending the light map layer onto the texture layer in a paint tool before exporting the texture to an ACE.
This means less texture resources are used when rendering in the game.
Re: The Art of RailWorks
Posted: Thu Mar 11, 2010 3:57 pm
by Bullet399
can you provide some screens howto create this lightmap???
Re: The Art of RailWorks
Posted: Thu Mar 11, 2010 9:01 pm
by KMW09
Bullet399 wrote:
decapod wrote:b) that shader really isn't necessary - you can achieve exactly the same effect with the paint tool by blending (multiplying) the light map over the main texture and using the normal TexDiff instead.
The result is a single texture stage that is more efficient.
In my honest opinion the shader is the most nessecary shader in RW. It's the one who provides shadowmaps.
Texturing without shadowmaps ending mostly in models without depth (hope you know what i mean

).
A simple shading (darken or brighten faces) don't help much.
If you would remove all textures from Standard Buildings in RW except the shadowmaps you would seen what i mean.
I hope that 3DC will provide some tools for texture rendering and shadowbaking in the future
Like Paul says you can achieve exactly the same effect by combining the light map with your main texture and then use an ordinary shader.
Combining the light map and texture is what is called texture baking in the RS/RW documentation.
There are tools to create the light map, you could try "gile[s]".
/anders
Re: The Art of RailWorks
Posted: Thu Mar 11, 2010 9:49 pm
by longbow
...or you can try importing your model into Blender, which can render a shadow bake eg:
http://www.thesimsresource.com/tutorial ... /id/15489/
Re: The Art of RailWorks
Posted: Fri Mar 12, 2010 8:32 am
by moranb
Many thanks for the various suggestions. I tried the Blender option mentioned in Longbow's post out of curiosity with an older asset I made. I exported the asset from 3D Canvas as a waveform object (*.obj) and imported it into Blender. However, I found that the UV mapping was not exported and when I pressed 'tab' as indicated in the tutorial no mapping information appeared in the UV view. Perhaps I missed something. I never heard of 'gilles'. Is that paint or 3D program and where can it be optained? A Goolge search reveals a lot of Gilles, but mostly names. Is it possible to make a light map with Photoshop? The various suggestions seem to go the 'texture baking' route in a 3D program as indicated in the original tutorial be Derek.
BFM
Re: The Art of RailWorks
Posted: Fri Mar 12, 2010 9:06 am
by longbow
There is some more info on shadow baking in Blender here -
http://forums.uktrainsim.com/viewtopic. ... 91&t=94804
Re: The Art of RailWorks
Posted: Fri Mar 12, 2010 4:16 pm
by peterholton
decapod wrote:In my opinion, this shader is completely unecessary - you can create exactly the same effect by blending the light map layer onto the texture layer in a paint tool before exporting the texture to an ACE.
This means less texture resources are used when rendering in the game.
Although you're probably right, Paul, I don't agree that it's unnecessary. In fact I've found it's the most useful shader if you're texturing larger buildings, as you can use single, tiled higher resolution textures and put the the shadow "detail" using a smaller, lower resolution shadow map. Sometimes the alternative would be dividing a building up into sections, with larger texture sheets per section. It also means you can use a generic diffuse texture sheet for a large range of buildings, with only one shadow map texture specific to each building:
for example I can texture a range of houses: back to backs, large terraces, small terraces, single houses etc. using one 1024 diffuse texture sheet for the whole lot and a 256 shadow map texture per building. The diffuse texture is high enough resolution to give good detail close up, but each building looks different and unique.
Whether that's more efficient or not, I couldn't say, but the amount of data to handle per building is a lot less, and gives me a lot more flexibility when making the models. It also makes mapping a breeze, to be honest.
Peter
Re: The Art of RailWorks
Posted: Sun Mar 21, 2010 10:39 am
by KMW09
moranb wrote:Many thanks for the various suggestions. I tried the Blender option mentioned in Longbow's post out of curiosity with an older asset I made. I exported the asset from 3D Canvas as a waveform object (*.obj) and imported it into Blender. However, I found that the UV mapping was not exported and when I pressed 'tab' as indicated in the tutorial no mapping information appeared in the UV view. Perhaps I missed something. I never heard of 'gilles'. Is that paint or 3D program and where can it be optained? A Goolge search reveals a lot of Gilles, but mostly names. Is it possible to make a light map with Photoshop? The various suggestions seem to go the 'texture baking' route in a 3D program as indicated in the original tutorial be Derek.
BFM
Not Gilles, it is spelled gile[s]. Comes out top in Google if spelled correctly.
It is a rendering program able to set up scenes and produce light maps.
You can find it here:
http://www.frecle.net/index.php?show=giles.about
/anders