Yaf(a)Ray 4 Truespace development info thread!

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Yaf(a)Ray 4 Truespace development info thread! // The Garage

1  ...  5  6  7  8  9  |  

Post by Jack Edwards // Mar 12, 2009, 6:28pm

Jack Edwards
Total Posts: 4062
pic
Okay here's a quick change that won't cause Yafaray to crash and should solve the transparency problem. Change the following code in the MaterialFnSet to look like this:



if (TransparencyTex != ' ')
{
XOffset = Node.Value(MaterialNode, 'TransparencyXOffset');
YOffset = Node.Value(MaterialNode, 'TransparencyYOffset');
XScale = Node.Value(MaterialNode, 'TransparencyXScale');
YScale = Node.Value(MaterialNode, 'TransparencyYScale');
// ExportTextureShader(TransparencyTex, XOffset, YOffset, XScale, YScale, false, 1.0);
ExportTextureShader(TransparencyTex, XOffset, YOffset, XScale, YScale, true, 1.0);
}

The only thing that needs to be changed is that the "false" in the last line needs to be changed to a "true".

Let me know if that solves it for you guys. :)

Post by kena // Mar 12, 2009, 7:18pm

kena
Total Posts: 2321
pic
Well... it worked, but it made the white transparent and the black solid.

I can work with it though.



18887

Post by Jack Edwards // Mar 12, 2009, 7:40pm

Jack Edwards
Total Posts: 4062
pic
That sounds like the correct results since you are setting the amount of transparency: 0 = no transparency, 1.0 = full transparency. ;)

Thanks for the testing Kena! :)

Post by kena // Mar 12, 2009, 7:58pm

kena
Total Posts: 2321
pic
NP - I actually enjoy testing things.... It's the way I think... I think. ;)

anyway... how would you get rid of the shadow of the plane here?
I used the settings you gave me for the transparency gamma, but I still get a gray box around my picture.

18888

EDIT - I guess I also need transparent shadows.
Edit again... I do have transparent shadows.

Post by Jack Edwards // Mar 12, 2009, 9:29pm

Jack Edwards
Total Posts: 4062
pic
You may want to check and make sure the white is actually maxed out. Also check your alpha values for the map. I'm not entirely sure how it's implemented, so the more you discover about how it works the better I can tweak the default settings to make it more useful.

Post by RAYMAN // Mar 13, 2009, 4:59am

RAYMAN
Total Posts: 1496
pic
Doesnt work on my side and I used a B+W Targa file...:(

Post by kena // Mar 13, 2009, 5:53am

kena
Total Posts: 2321
pic
I've been using .png file format. the Black is RGB 0,0,0 and the white is RGB 255,255,255.

I use GIMP, so I told it to map color values to alpha and the white turned transparent in GIMP

Here is the result.


18896

Post by Jack Edwards // Mar 13, 2009, 1:32pm

Jack Edwards
Total Posts: 4062
pic
Interesting, so the alpha value does affect it. I may need to expose more of the alpha settings, so that they can be set manually. Something else to try is to use a diffuse map with alpha and see what happens there.

Post by Jack Edwards // Mar 13, 2009, 8:08pm

Jack Edwards
Total Posts: 4062
pic
Attached an update for the MaterialFnSet code.

I've removed all alpha value checking and value textures like bump maps and transparency are now handled differently than color textures.

To apply the change, unzip the zip file to extract the XML file. Go into the MaterialFnSet brick and click the import script icon, then browse to where you've extracted the XML file I've attached. Make sure you click the apply changes icon before trying to render. Loading and applying the script changes may take several minutes depending on how fast your computer is. This is not an official patch or release, so if you don't know what you're doing... don't. :p

The 0.6.1 official release should be happening before the end of the week depending on how tied up I get with other projects, including setting up a website for Yafaray4tS which will hopefully get the project more visibility.

Post by kena // Mar 13, 2009, 9:08pm

kena
Total Posts: 2321
pic
I think that you fixed the color up very nice, but the transparency still isn't 100%


18909

Post by Jack Edwards // Mar 13, 2009, 11:55pm

Jack Edwards
Total Posts: 4062
pic
Hmm... not sure what to tell you about that one Kena. Can you post the image file so I can test it on my end?

Post by nowherebrain // Mar 14, 2009, 1:04am

nowherebrain
Total Posts: 1062
pic
Is there any specular or refraction...at times that will make a material show up.

Post by kena // Mar 15, 2009, 1:13pm

kena
Total Posts: 2321
pic
Is there any specular or refraction...at times that will make a material show up.


That was it. It was 0.051 on the "Spec.Refl."


Made it 0, and now this is what I get:


18965


Thanks both of you!

Post by kena // Mar 15, 2009, 3:08pm

kena
Total Posts: 2321
pic
HOWEVER!!!!

The fun part about bets-testing is that when one thing gets fixed, another crops up.

Solid colors render out ok.... MAPPED ones do not!

Here is the real-time view.
18969

Here is the Yaf(a)ray render
18970

And here is the text file I made from the render engine in case it will help you figure THIS one out.
18971

EDIT: and just so you know I didn't forget to get the right materials:
This is the settings I used for the chair

18972

Post by Jack Edwards // Mar 15, 2009, 3:15pm

Jack Edwards
Total Posts: 4062
pic
That's odd. It's clearly loading the textures. What channel are you using? MirrorColor still doesn't work as far as I can tell.

Edit: ok I see. Could be something I changed in the new code I posted.

BTW, you can use specular with transparency, but you need to match it with a Mirror Map to set the transparent areas to zero. ;)

Edit2:
I can confirm the issue. Will fix it and post an update for you.

Post by kena // Mar 15, 2009, 3:17pm

kena
Total Posts: 2321
pic
That's odd. It's clearly loading the textures. What channel are you using? MirrorColor still doesn't work as far as I can tell.

I was editing my post as you were posing your's - see the last image for the settings I used. and so far, mirror color works for me. at least before this last fix.... the lighter the mirror color - the more like a mirror.

Post by Jack Edwards // Mar 15, 2009, 3:36pm

Jack Edwards
Total Posts: 4062
pic
From my tests Mirror (reflectivity map) works, Mirror Color (specular color map) doesn't. :(

I fixed the diffuse map issue. Try this update for the material function set.

Post by kena // Mar 15, 2009, 4:07pm

kena
Total Posts: 2321
pic
OK - I think that one works for both of them

18974

Thanks for fixing those!

Post by Jack Edwards // Mar 15, 2009, 4:14pm

Jack Edwards
Total Posts: 4062
pic
Good news! That's also given me an idea to test for mirror color, but I think I'll mess with that tomorrow.

Let me know if you notice any other problems.

BTW, I think I may have figured out a way to implement support for face specific materials, so that the exporter will support using different materials per triangle face. It will involve a fair amount of coding but should make for a much more reliable material handling solution. I'm likely not going to get it done for this release, but it should make the following one.

Post by Jack Edwards // Mar 15, 2009, 4:53pm

Jack Edwards
Total Posts: 4062
pic
:banana:Got Mirror Color to work! :banana:

Here's the trick:

Scalar maps:
<do_color bval="false"/>
<do_scalar bval="true"/>
<color_input bval="false"/>

Color maps:
<do_color bval="true"/>
<do_scalar bval="false"/>
<color_input bval="true"/>

Color Scalar map:
<do_color bval="true"/>
<do_scalar bval="true"/>
<color_input bval="true"/>

Bummer doesn't seem to work for glass. No clue what's up there, anycase this update should fix Mirror Color mapping for ShinyDiffuse material. Please test. :)

Post by kena // Mar 15, 2009, 6:28pm

kena
Total Posts: 2321
pic
Thank you for all your work on this one. I will test it out as soon as I can... which material type does it fix for?

Post by RAYMAN // Mar 15, 2009, 11:44pm

RAYMAN
Total Posts: 1496
pic
There must be a typo its ture not true...:confused:

Post by Jack Edwards // Mar 16, 2009, 12:40am

Jack Edwards
Total Posts: 4062
pic
LOL thanks Peter. I fixed it.
Don't worry, that was hand typed and not a cut and paste from the code. ;)

@Kena, thanks. All five materials should work with that update. The MirrorColor mapping w/ the Glass material doesn't appear to do anything though so it may be that is turned off inside YafaRay itself...

Post by Jack Edwards // Mar 31, 2009, 2:17pm

Jack Edwards
Total Posts: 4062
pic
Just wanted to give you guys a heads up that I've started working on the website for YafaRay4tS.

It was nice taking a break to work on the MMC, but it's time to get back to work, heh. Anyways, give me a week to get site developed and go live with it. Also in the works are updates to the light objects and help files. The help will available online in addition to from within the YafaRay4tS add-on.

If you guys have any ideas for a YafaRay4tS logo or the time to make one let me know. ;)

Post by v3rd3 // Apr 1, 2009, 11:33pm

v3rd3
Total Posts: 388
Does something like this appeal? If so, lemme know. If not, what would you like changed?


I am assuming the logo you are looking for will be distributed electronically only..... if you want a print logo I will change it to a 3 colour flat.

Post by Jack Edwards // Apr 2, 2009, 1:24am

Jack Edwards
Total Posts: 4062
pic
Thanks v3rd3, but I think we should avoid 3D objects as logos and go with something more like vector art. I do have an idea I thought up yesterday that I need to test out and see how it looks.

The main use for the logo would be as icons for the Yafaray4tS and on the YafaRay4tS webpage. I have some concerns with using the actual YafaRay logo, since we don't have permission to do that and our project is separate from theirs.

Post by v3rd3 // Apr 2, 2009, 2:49am

v3rd3
Total Posts: 388
Here is a 3 color I threw together....

Post by nealiosnoise // Apr 2, 2009, 2:58am

nealiosnoise
Total Posts: 77
pic
took me 5 hours, but think its alright..


19279

Post by v3rd3 // Apr 2, 2009, 5:01am

v3rd3
Total Posts: 388
Which tool did you use to get that effect nealiosnoise? :lol:

Post by Jack Edwards // Apr 2, 2009, 10:11pm

Jack Edwards
Total Posts: 4062
pic
LOL nealiosnoise :)

@V3rd3,

The vector one is much more towards what I'm looking for. The eye thing is definitely cool, but it doesn't give the impression of trueSpace or yafaray. Maybe horizontal speedlines coming off the tS butterfly?

Also don't worry about putting text in the logo. Mainly what we need is just a graphic to use for the icon so that we don't have to use the YafaRay one. And you can use as many colors as you want. ;)
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn