.mtl files + .obj's
Hi,
I'm having a play with materials on .obj's to see what they can do.
I have a problem and a few questions.
Problem -
The alpha channel doesn't work - I have tried with various image file types (tga/png + tif) and have tried editing the d + Tr values between 0. and 1.in the .mtl file but no success - nothing changs at all. - Does anybody know why this may be the case?
Question -
Is it possible to apply a texture, and also apply a reflection map separately and simultaneously? Ideally I would like a real time reflection map coming from a camera - or if not real time then a periodically updated reflection map image.
Cheers
Andy
Your model must have blend_enable 1 set to see alpha values. It should
work. For two or more textures, you should load and set the textures
and their map modes manually. This should totally be possible.
On Nov 21, 2007, at 1:19 PM, Andy Brennan wrote:
>
> Hi,
>
> I'm having a play with materials on .obj's to see what they can do.
>
> I have a problem and a few questions.
>
> Problem -
>
> The alpha channel doesn't work - I have tried with various image
> file types (tga/png + tif) and have tried editing the d + Tr values
> between 0. and 1.in the .mtl file but no success - nothing changs at
> all. - Does anybody know why this may be the case?
>
> Question -
>
> Is it possible to apply a texture, and also apply a reflection map
> separately and simultaneously? Ideally I would like a real time
> reflection map coming from a camera - or if not real time then a
> periodically updated reflection map image.
>
> Cheers
>
> Andy
>
>
Hi,
I've been trying it with the blend_enable attribute set to 1 but for some reason it makes no difference at all. I've uploaded a zip file of my test, would anyone mind trying it on their machine to see if they have the same problem?
Cheers
Andy
www.ambrennan.com/tester.zip
Ah it works if I actually set the opacity of the texture and save it with he alpha. I was under the impression that I could change this within the .mtl file though???
as I understand it in regular OpenGL pipeline the texture overwrites
the material properties. So if you have a material with alpha and a
texture without, texture "wins".
You can change this with some low level GL stuff, or with a fragment
shader.
On Nov 21, 2007, at 2:33 PM, Andy Brennan wrote:
>
> Ah it works if I actually set the opacity of the texture and save it
> with he alpha. I was under the impression that I could change this
> within the .mtl file though???
Ah right. I have reverted to using textures rather than materials and have a nice reflection map going now at the same time as a material but is there any way to set jit.gl.model to accept uyvy color space like can be done with videoplanes? My models now look cool apart from the green tint caused by uyvy.
You can upload a texture via UYVY and use the cc.uyvy2rgba.jxs shader.
However, UYVY does not carry alpha iirc, so you will lose your
transparency effects if you textures have alpha.
On Nov 21, 2007, at 5:40 PM, Andy Brennan wrote:
>
> Ah right. I have reverted to using textures rather than materials
> and have a nice reflection map going now but is there any way to set
> jit.gl.model to accept uyvy color space like can be done with
> videoplanes? My models now look cool apart from the green tint
> caused by uyvy.
>