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.

Newcomers DBPro Corner / how do i load a fx.file in my script?

Author
Message
THINK
15
Years of Service
User Offline
Joined: 2nd Feb 2009
Location:
Posted: 23rd Feb 2009 21:42
hi
i made a model room whit and a textuer,and in dark shader i made fx file for it.
but how can i load it in my script and on de model?

i tink that am tinking
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 23rd Feb 2009 22:01
lookup load effect.

Dark Physics makes any hot drink go cold.
Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 24th Feb 2009 23:39
Followed by set object effect. lol
THINK
15
Years of Service
User Offline
Joined: 2nd Feb 2009
Location:
Posted: 25th Feb 2009 16:54
hi
dit the code like you said,but nothings happing,the schader is on de moddel how cab that be



i tink that am tinking
James H
17
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 25th Feb 2009 17:54
"Load effect" - here you have used the file name "roombump.dbo". This is an object file, you need an effect file - the file extension(letters after the ".") needs to be ".fx" not ".dbo". At the end of the line there are 2 values, ",1,1". The first is the effect number, the second is a texture flag. If the texture flag is "0" then you need to load and apply the textures manually in DBP(ie use commands "load texture" and "texture object") - each texture used in an effect must be loaded and applied in this manner. Your code only loads 1 texture, effects generally require more than one texture. If the texture flag is set to "1", then the textures are loaded automatically but only if the texture files are listed in the ".fx" file.

In Dark Shader, you can export what you have created as a dbpro project : File>Export>Export all, create a new folder and select ok. There are some issues with the products export all feature as they don`t always turn out correct, but for those that don`t turn out right its usually just a simple case of making an alteration to the DBP code.

I think it would be more beneficial to you if you were to examine a simple DBP shader projects code and media that definately works, to see for yourelf how these things work. To create and export a project that will work in DBP from Dark Shader, do the following;
Open DS, create a primitive cube object.
Select and apply the blend shader.
Select and apply any two textures from the color maps options.
Export the current scene as a DBP project : File>Export>Export all
Open the DBP project in DBP, compile and run.
You should see a cube with 2 textures blended on it with a plain blue background - you will only see one side of the cube as additional code is required to position the camera and rotate the cube.
Between the lines

you should put


and between the lines

you should put

Login to post a reply

Server time is: 2024-11-25 10:30:45
Your offset time is: 2024-11-25 10:30:45