Jump to content
Sign in to follow this  
Delta Hawk

How do I make a translucent material?

Recommended Posts

How can I make a material for the sails of my ship that allows light to diffuse and pass through, and receive shadows that pass through?  Much like this...

P_and_P_SKF.jpg

Share this post


Link to post
Share on other sites

not sure about receiving shadows, haven't tested it BUT, what i would do:
1. create a 1000.00 SV LOD (besides the normal 0.00 and 10.00 SV LODs), with assign your alpha texture to it the sails, that will cast shadow similar to the way trees do, as in based on the alpha channel of that texture 

To make that work, what you also need to do:
a. sbsource = explicit

b. shadow = hybrid

c. PreferShadowVolume = 0

 

if you wanna have a look about how that is suppose to look, i recommend spawning one of the Vanilla PhoneBooths from Altis/Stratis (file PhoneBooth_01_F.p3d)

  • Like 1

Share this post


Link to post
Share on other sites

I can't find this phonebooth you're talking about.  I'll look more tomorrow.

 

Ok, so I got the sails some what working.  I have...

 

1. light passes through the sails except at a shallow angle.

2. objects casts shadows on the sails which you can see on the other side of the sails

 

What's not working is I also need the sails to cast shadows on the other sails.  If you look at the picture of the Gotheborg you can see the jib sail (top left triangle sail) is casting a shadow on the top yard sprit sail (most forward sail at an angle).  So I need my sails to cast shadows on each other without stopping light from passing through the first sail.

 

buldozer%202017-02-14%2022-42-42-88.png

 

 

This is the .rvmat I'm using

ambient[] = {0.3,0.48,0.35,0.35};
diffuse[] = {0.5,0.5,0.5,0.5};
forcedDiffuse[] = {0.35,0.35,0.5,1.0};
emmisive[] = {1.0,1.0,1.0,0.5};
specular[] = {0.0,0.0,0.0,0.51};
specularPower = 8;
PixelShaderID = "TreeAdv";
VertexShaderID = "TreeAdvNoFade";
class Stage1
{
 texture = "#(argb,8,8,3)color(0.5,0.5,1.0,1,nohq)";
 uvSource = "tex";
 class uvTransform
 {
  aside[] = {1,0,0};
  up[] = {0,1,0};
  dir[] = {0,0,0};
  pos[] = {0,0,0};
 };
};
class Stage2
{
 texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1.0,MCA)";
 uvSource = "tex1";
 class uvTransform
 {
  aside[] = {1,0,0};
  up[] = {0,1,0};
  dir[] = {0,0,0};
  pos[] = {0,0,0};
 };
};

 

Share this post


Link to post
Share on other sites

how is your SVLod setup? are these sails part of it?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×