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 / White model when I change its shader in game

Author
Message
Daniel wright 2311
User Banned
Posted: 11th Jul 2012 23:26
The only thing I can come up with,well,there are a couple things here,but my first I would try is not to use this.

set object effect 1, 0

try this and see if it matters in the end

SET EFFECT ON 1, "folder.fx",1

If this changes nothing,I will try one more thing

It might be the select case set up

my signature keeps being erased by a mod So this is my new signature.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 11th Jul 2012 23:26 Edited at: 11th Jul 2012 23:27
Hell_666

Thanks to you I've now realised where people get those message links.

[Edit: added intended recipient. ]
Daniel wright 2311
User Banned
Posted: 11th Jul 2012 23:32
Ok, Green Gandalf

bolth of thease effects have the same texture flag

load effect "DSBump v0.fx", 1, 0
load effect "GGbump04P.fx", 2, 0

my signature keeps being erased by a mod So this is my new signature.
Hell_666
16
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 11th Jul 2012 23:36
I've tested with the command "set effect on", as Daniel Wright has suggested, and it works on the Green Gandalf demo

I'm going to try this on my own project

Eternal suffering ...

I'm french
Daniel wright 2311
User Banned
Posted: 11th Jul 2012 23:40
on Green Gandalf demo there was nothing holding the effect in memory for the loop,it was only loaded one time before the loop,this is why using SET EFFECT ON 1, "folder.fx",1 works becouse it is holding it into memory with in the loop of the program.

my signature keeps being erased by a mod So this is my new signature.
Hell_666
16
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 11th Jul 2012 23:42
But this commands consume lots of memory if we use many effects no ?

Eternal suffering ...

I'm french
Daniel wright 2311
User Banned
Posted: 11th Jul 2012 23:44
No.not unless its being used all at the same time,your pc holds nothing into memory unless its called to,and this is what you are doing,now,if 50 diffrent effects are being called at the same time in the same state,then shure,big time slow down.

my signature keeps being erased by a mod So this is my new signature.
Hell_666
16
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 11th Jul 2012 23:47 Edited at: 12th Jul 2012 00:16
Ok, I see how it works

Edit : My models disapear when I use the effect ... And they are immobile after, may be this shader doesn't support bone animated model, I'll test with a shader for this model.

Edit 2 : Immobility of the object is solved, it's due to the fastbone effect, apparantly I can't remove this effect of an object in game.

So, my object keep its texture when I disable the effect but when I use an effect the model become invisible

Eternal suffering ...

I'm french
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 12th Jul 2012 01:18
Quote: "bolth of thease effects have the same texture flag

load effect "DSBump v0.fx", 1, 0
load effect "GGbump04P.fx", 2, 0"


Of course they do. In each case the textures are applied in DBPro.

Quote: "I'm going to try this on my own project"


Sounds like a possible work around.

Quote: "on Green Gandalf demo there was nothing holding the effect in memory for the loop,it was only loaded one time before the loop"


What are you talking about.

Quote: "No.not unless its being used all at the same time,your pc holds nothing into memory unless its called to,and this is what you are doing"


What do you mean?

Quote: "Ok, I see how it works

Edit : My models disapear when I use the effect ... And they are immobile after, may be this shader doesn't support bone animated model, I'll test with a shader for this model.

Edit 2 : Immobility of the object is solved, it's due to the fastbone effect, apparantly I can't remove this effect of an object in game.

So, my object keep its texture when I disable the effect but when I use an effect the model become invisible "


You've lost me as well. Sounds like you're now talking about a completely different situaton.
Hell_666
16
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 12th Jul 2012 02:01
I know, but it's possible that it's me who has change someting in wrong

I'll use a backup of my source for some tests and I'll say you the result

Eternal suffering ...

I'm french
Daniel wright 2311
User Banned
Posted: 12th Jul 2012 02:06
@Green Gandalf

I dont know how to explain it any better then I already have




my signature keeps being erased by a mod So this is my new signature.
Hell_666
16
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 12th Jul 2012 02:09
If I've understood, "Set effect on" doesn't realy load an effect, it reads it and apply it on an object, so it's not kept in memory. Right ?

Eternal suffering ...

I'm french
Daniel wright 2311
User Banned
Posted: 12th Jul 2012 02:16
it is in memory,but only for the one time is was applied,if you try to change it in the programs loop,then it is no longer in the programs memory. but yes,you are right.

my signature keeps being erased by a mod So this is my new signature.
Hell_666
16
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 12th Jul 2012 02:17
Ok, I see

Eternal suffering ...

I'm french
Hell_666
16
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 12th Jul 2012 02:25 Edited at: 12th Jul 2012 02:47
IT WORKS !

hum ...

Seriously, I just find the solution to my new problem, I'm shameful ^^

"set effect on" didn't works on my project because there was an error in the shader path, and DBPro doesn't display errors with this command.

So, my problem is solved, even if this bug stay a strange bug ^^


I realy thank you two to have helped me a lot, I'll never forget it

Eternal suffering ...

I'm french
Daniel wright 2311
User Banned
Posted: 12th Jul 2012 02:35
You think that is shameful? look here



http://forum.thegamecreators.com/?m=forum_view&t=198568&b=1

my signature keeps being erased by a mod So this is my new signature.
Hell_666
16
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 12th Jul 2012 02:43 Edited at: 12th Jul 2012 02:43
^^ I remember a sentence I've seen somewhere : "When your lines always do the same thing, there is a problem" ^^

Eternal suffering ...

I'm french
Daniel wright 2311
User Banned
Posted: 12th Jul 2012 02:44
lol

my signature keeps being erased by a mod So this is my new signature.

Login to post a reply

Server time is: 2026-07-07 19:10:00
Your offset time is: 2026-07-07 19:10:00