Digital Art Zone

 
     
save as shader preset
Posted: 30 November 2012 06:48 AM   [ Ignore ]
Member
Avatar
Rank
Total Posts:  32
Joined  2007-12-19

Hi,

I have used a pattern image on a surface and tweaked in the surfaces tab, opacity, displacement etc.

If I save as a shader preset,  the path to the image is c:/users/myusername/Daz 3D/Studio/MyLibrary/ShaderPresets/shaders/myfolder/tile.png

Is there a way to make the path to the image MyLibrary/ShaderPresets/shaders/myfolder/tile.png so i can share it


...or have i got it all wrong

 Signature 

Digi-Dotz website wink

Profile
 
 
Posted: 30 November 2012 07:55 AM   [ Ignore ]   [ # 1 ]
Power Member
Avatar
RankRankRank
Total Posts:  1336
Joined  2006-03-14
martClut - 30 November 2012 06:48 AM

Hi,

I have used a pattern image on a surface and tweaked in the surfaces tab, opacity, displacement etc.

If I save as a shader preset,  the path to the image is c:/users/myusername/Daz 3D/Studio/MyLibrary/ShaderPresets/shaders/myfolder/tile.png

Is there a way to make the path to the image MyLibrary/ShaderPresets/shaders/myfolder/tile.png so i can share it


...or have i got it all wrong

Well, if nothing else the preset file should be clear text so you can just edit it and make it relative.  However, textures rightly belong in runtime/textures/<artistname>/ so moving it there is probably a good plan.

 Signature 

My Tutorials and Freebies Index

Profile
 
 
Posted: 30 November 2012 08:22 AM   [ Ignore ]   [ # 2 ]
Member
Avatar
Rank
Total Posts:  32
Joined  2007-12-19

Thanks, the shader preset was a .duf file and so i couldn’t open it as readable text to edit.

I saved again as as depreciated .dsa file.
now although it shows the full path in studio, when i opened the file as text, the path is relative so maybe the .duf file is also
Thanks again, carry on!

 Signature 

Digi-Dotz website wink

Profile
 
 
Posted: 30 November 2012 09:06 AM   [ Ignore ]   [ # 3 ]
Power Member
Avatar
RankRankRank
Total Posts:  1336
Joined  2006-03-14

DUF’s are plain text files as well.

For instance, the start of one I’m working on right now goes…

{
 
"file_version" "0.6.0.0",
 
"asset_info" {
  
"id" "/Presets/Shaders/beta/AMR SuperAO Skin R2.duf",
  
"type" "preset_shader",
  
"contributor" {
   
"author" "Adam Rasmussen",
   
"email" "",
   
"website" "http://adamtls.deviantart.com"
  
},
  
"revision" "2.1",
  
"modified" "Fri Nov 30 08:18:00 2012"
 
},
 
"material_library" [
  {
   
"id" "Default",
   
"transparency" {
    
"channel" {
     
"id" "transparency"
 Signature 

My Tutorials and Freebies Index

Profile
 
 
Posted: 30 November 2012 10:21 AM   [ Ignore ]   [ # 4 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2945
Joined  2011-12-10

Why not just use the Shader Baker, and share those textures?

 Signature 

My DeviantArt Galleries
My ShareCG Gallery
OPENSUBDIV Testing and Discussion
3Delight Surface and Lighting Thread

Profile
 
 
Posted: 30 November 2012 11:06 AM   [ Ignore ]   [ # 5 ]
Addict
Avatar
RankRankRankRank
Total Posts:  4545
Joined  2007-09-13

If it doesn’t open in a text editor, then it’s probably compressed…there should be an option during the save to “Compress files”...uncheck the box.

 Signature 

1432 old posts

My ShareCG gallery.

Just because something costs a lot, doesn’t mean it’s the best…

It just means it’s expensive.

Profile
 
 
Posted: 30 November 2012 02:32 PM   [ Ignore ]   [ # 6 ]
Addict
Avatar
RankRankRankRank
Total Posts:  4966
Joined  2008-03-06

You can right-click the compressed .duf and unzip it just like a zip file.  Then you delete the compressed one and add the .duf extension to the unzipped extension-less file, and voila, it can be text edited from then on.  I do this when batch-generating materials for textures.

 Signature 

My store at DAZ.

My Deviantart gallery.

Profile
 
 
Posted: 30 November 2012 02:53 PM   [ Ignore ]   [ # 7 ]
Active Member
Avatar
RankRank
Total Posts:  867
Joined  2007-06-13

Thanks everyone for sharing how to open the .dufs in a text editior. I was going to have to ask how to do this too, and now I don’t have to. smile

 Signature 

Previous post count 1700.
My Store

Profile
 
 
Posted: 30 November 2012 05:15 PM   [ Ignore ]   [ # 8 ]
Member
Avatar
Rank
Total Posts:  32
Joined  2007-12-19

thanks all your advice.
I will stick to keeping images/textures in the runtime folder and now know i can text edit the .duf files if needed great

 Signature 

Digi-Dotz website wink

Profile