Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Advanced Lighting transparency problem

Author
Message
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 23rd Nov 2015 00:25 Edited at: 23rd Nov 2015 00:27
I have made the same things that are on the palm trees demo and the transparency does not work on my object( or better the transparency works but the object is black), it was working like 1 month ago but I don't know what changed, the object appear to be black, no texture is applied, if I check the texture is present in the folder and the path is correct, so I don't know what could cause this.

this is the code I use to load the effect:



this is the code I use for the object:





If was a path problem the other textures and effects would not load, so I can't really understand why my object is black
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 23rd Nov 2015 06:33
I helped you sort this out some time ago... https://forum.thegamecreators.com/thread/214012
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 23rd Nov 2015 08:37
It's a different problem, with a different shader, that time I was just using a single shader, the texture appeared but was dark, almost black.

Now I am using the advanced lighting which uses a different shader, the object is completely black, transparent but black, the same issue that happens when you don't texture properly a model in the advanced lighting, but in the palm trees example there was just a texture to be used on the stage 1, nothing else, and that is what I am doing.
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 23rd Nov 2015 08:39
Also it was a different type of transparency, that time I needed to get out the black parts so that the flowers are rendered correctly, now I am using a tent and the purpose is just to see through it like in real life, there are no parts that need to be clipped.
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 23rd Nov 2015 09:03 Edited at: 23rd Nov 2015 09:07
Ah I see, if the same code works when using different objects/textures then the first thing I would check is that the object's vertex normals and uv coordinates exist and are intact.
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 23rd Nov 2015 18:41
Testing with a normalmap.fx it works (texturing stages 0,1 and 2), obviously that shader has no transparency, but at least I know it's not a problem of the texture loaded, the texture is there.
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 24th Nov 2015 19:14
I had similar issue with the tree/leaf shader, using models exported from blender. From what I could tell it looked like the model data blender produced was the issue, it adds an extra root frame that messes with the limb structure that the shader appears to expect.

I was going to look at modifying the python export script but have not gotten around to it. I've just been using the normal normalmap_clip.fx for now

Login to post a reply

Server time is: 2024-04-24 20:38:17
Your offset time is: 2024-04-24 20:38:17