Page 1 of 1

Proper shader for reflective windows on a building (Blender)

Unread postPosted: Tue Apr 15, 2014 8:20 pm
by dogrokket
What shader or combination thereof, would one use to make a window with a gold tint reflective on a building?

Re: Proper shader for reflective windows on a building (Blender)

Unread postPosted: Wed Apr 16, 2014 6:37 am
by GreatNortherner
For non-translucent glass effect (maybe better for a building), the TrainSpecEnvMask.fx shader should be best suited. Glass texture in main channel of TGA, bright alpha for spec, and use high specular and reflection settings.

If you want the glass to be see-through, try TrainGlass.fx. For the texture, use a TGA with the yellow/golden glass texture in the main, and translucency in the alpha. You may need to play around with specularpower and the customparam flags to get the desired effect. Also make sure to set up the file so that the exported Geo file gets two texture slots:
<TextureByName>
<e d:type="cDeltaString">textures\[00][name]</e>
<e d:type="cDeltaString">textures\[00][name]</e>
</TextureByName>
Some good values to start with for shiny and reflective glass are:
SPECULARPOWER 2
CUSTOMPARAM0 64 (specular exponent)
CUSTOMPARAM1 8 (reflection intensity)
CUSTOMPARAM2 4 (reflection illumination)

Cheers
Michael

Re: Proper shader for reflective windows on a building (Blender)

Unread postPosted: Wed Apr 16, 2014 1:19 pm
by dogrokket
Thanks Micheal! I'm using the other exporter and the config file will look slightly different. Do you have to use a 'dummy' texture here as well, as referenced in the dev docs?

EDIT>> I assume you do need the dummy, because I used one and it worked. I'm still a bit confused how to change the Diffuse and Specular intensities. Do you do that with the editing programs, or is that done in the IGS export file?

Re: Proper shader for reflective windows on a building (Blender)

Unread postPosted: Wed Apr 16, 2014 5:31 pm
by GreatNortherner
dogrokket wrote: I'm still a bit confused how to change the Diffuse and Specular intensities. Do you do that with the editing programs, or is that done in the IGS export file?


I don't know how Blender or its IGS exporter works, but in theory the material attributes should be edited there. Maybe somebody else can help?

However, even if that isn't possible in Blender you can still use the default settings of the exporter and then edit the GeoPcDx with RW_Tools. The only downside to this is that it can quickly get out of hand if you need to re-export the model from Blender a few times, you'd then need to edit the Geo file again after each export.

Cheers
Michael

Re: Proper shader for reflective windows on a building (Blender)

Unread postPosted: Wed Apr 16, 2014 7:37 pm
by dogrokket
Micheal, I think there is probably a way to manipulate the spec and diff in the exporter, but maybe Chacal can comment on that. Here's what I came up with by using Gimp with a TrainSpecEnvMask.fx shader. Looks pretty decent and reflects the environment pretty well. I wonder if I can 'tune it up' though...
goldglass.jpg