Jump to content

How to Transparency and framework ?


Wchris
 Share

Recommended Posts

i have a problem with tranparency

 

There is a tutorial about transparency, but it's not using framework.

 

i used ADN to create a red transparent texture for the bouda, but when using it in my project the transparent object is overriden by water and terrain.

 

***********************************************************************
                 Material Generated by ADN 1.1 R3

***********************************************************************
texture0="abstract::red.dds"
clamp0=0,0,0
color=1.00000000,0.141176477,0.141176477,0.589999974
blend=1
depthmask=0
depthtest=0
alphatest=0
overlay=0
zsort=0
cullface=1
castshadows=0
specular=0.759999990
bumpscale=3.06999993
gloss=0.460000008
shader="abstract::mesh_diffuse.vert","abstract::mesh_diffuse_specular.frag"
shadowshader="Abstract::mesh_shadow.vert",""

 

I don't understand what's going on. here's a screenshot. Any clue ?

 

tryed to use the transparency world to load the mesh and material, but same result

 

Thank you, this is driving me nuts

 

post-44-041335100 1286499125_thumb.jpg

 

i hope in LE3 it will be easyer to use transparency without playing with worlds, just telling the transparency ratio et voilà, but LE3 is far away

redbouda_transparent.zip

Windows 7 home - 32 bits

Intel Quad Q6600 - nVidia GTX 460 1GB - 2 GB RAM

Link to comment
Share on other sites

Still searching...

 

got something working with

***********************************************************************
                 Material Generated by ADN 1.1 R3

***********************************************************************
texture0="abstract::red.dds"
clamp0=0,0,0
color=1.00000000,0.141176477,0.141176477,0.589999974
blend=1
depthmask=1
depthtest=1
alphatest=1
overlay=0
zsort=1
cullface=1
castshadows=0
specular=0.759999990
bumpscale=3.06999993
gloss=0.460000008
shader="abstract::mesh_diffuse.vert","abstract::mesh_diffuse_bumpmap.frag"
shadowshader="Abstract::mesh_shadow.vert",""

 

Now it's transparent but visually it's not like the first screenshot

 

i did not want it to be affected by light or shadow, i just wanted a transparent object that acts like a ghost 3D placeholder and tells the players where to drop his item with the same shape.

 

 

post-44-005863400 1286523887_thumb.jpg

Windows 7 home - 32 bits

Intel Quad Q6600 - nVidia GTX 460 1GB - 2 GB RAM

Link to comment
Share on other sites

  • 2 weeks later...

Ok got it working :) ,

post-44-015722300 1287875644_thumb.jpg

loading my mesh into the framework transparency world was not enought

The trick was to render the transparency world myself after RenderFramework like this :

        RenderFramework;
        SetWorld(GetLayerWorld(GetFrameworkLayer(2)));
        RenderWorld;
        LEsetWorld(GetLayerWorld(GetFrameworkLayer(0)));

Why is framework not doing this itself in RenderFramework :) ? I have no clue but there is probably a reason.

 

this is the final material file

***********************************************************************
                 Material Generated by ADN 1.1 R3 

*********************************************************************** 
texture0="abstract::red.dds" 
clamp0=0,0,0 
color=1.00000000,0.141176477,0.141176477,0.589999974 
blend=1 
depthmask=0
depthtest=1
alphatest=0 
overlay=0 
zsort=1
cullface=1
castshadows=0 
specular=0.759999990 
bumpscale=3.06999993 
gloss=0.460000008 
shader="abstract::mesh_diffuse.vert","abstract::mesh_diffuse_specular.frag" 
shadowshader="Abstract::mesh_shadow.vert",""

Windows 7 home - 32 bits

Intel Quad Q6600 - nVidia GTX 460 1GB - 2 GB RAM

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...