Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - yjoo9317

Pages: [1]
1
Support / Re: Rendered in black with multiple texture files (jpg + png)
« on: November 07, 2018, 04:39:15 pm »
Floor plane is in the same obj file.

I will upload screen shot soon.. It won't be full view but at least it will show what is like.

2
Support / Re: Rendered in black with multiple texture files (jpg + png)
« on: November 05, 2018, 05:37:28 pm »
I attached png file.
The floor is a simple plain with just 4 vertices.
I've also confirmed that it renders OK with .jpg file (converted from the exact .png file).

The following is from obj file.
---------------------------------------------
o Plane.1
v -10 0 10
v 10 0 10
v -10 0 -10
v 10 0 -10
# 4 vertices

vt 0.00000 0.00000
vt 0.00000 1.00000
vt 1.00000 1.00000
vt 1.00000 0.00000
# 4 texture coordinates

vn 0 1 -0
# 1 vertex normals

usemtl FLOOR
f 1805/2771/1549 1807/2770/1549 1806/2769/1549 1804/2768/1549
# 1 facets
--------------------------------------------------------------------------------------

Note.
I'd tried to upload png file but there was a size limit (up to 64k), so I had to resize but the color space is intact.
Let me know if you notice something else.

3
Support / Re: Rendered in black with multiple texture files (jpg + png)
« on: November 02, 2018, 07:51:02 pm »
Thanks for the reply.

I removed setTexture calls and leave it doing auto-set.

I noticed that each texture was applied to the area where it was supposed to be.

But still floor texture (png file) is rendered in black..
10% of the png texture is shadow and the rest area is transparent.

That 10% (shadow) was rendered in red and the transparent area is rendered in black.
Any clue on that?
png file with transparency would cause the problem?

The reason why I am saying this,
If I switch png to jpg file instead, then it renders it at least.
But to draw the proper alpha channel, it needs to use a png file still.

Thanks.

4
Support / Re: Rendered in black with multiple texture files (jpg + png)
« on: November 01, 2018, 10:19:24 pm »
<mtl>
newmtl Body_White
Ka 1.000000 1.000000 1.000000
illum 1
map_Ka body.jpg

newmtl FLOOR
Kd 0.800000 0.800000 0.800000
illum 1
map_Kd floor.png
map_d floor.png


//Add texture to TextureManager
TextureManager.getInstance().addTexture(name1, new Texture(tfis1)); // for body tfis1 is FileInputStream to .jpg file
TextureManager.getInstance().addTexture(name2, new Texture(tfis2, true)); // for floor tfis2 is FileInputStream to .png file. tried both with or without alpha. neither work.

//and then Set Texture
model.setTexture(name1); //  for body.jpg
model.setTexture(name2);  // for floor.png

If I exclude name2 texture, then at least it can render the body fine.


5
Support / Rendered in black with multiple texture files (jpg + png)
« on: October 31, 2018, 09:44:24 pm »
Hi,

my model mtl file is pointing to 2 texture files for body (.jpg) and shadow (.png) respectively.
I noticed the model is rendered in almost black. (with a little red-ish area)
If I exclude png file then it renders the model fine but obviously shadow area is also rendered with body texture.
Am I missing something here?

note: when adding png texture, I also turned on "useAlpha" parameter as well.
        Also loading the model from serial file to speed up.

Pages: [1]