clodterrain + mangalore ; rendering PB

View: New views
2 Messages — Rating Filter:   Alert me  

clodterrain + mangalore ; rendering PB

by je.a.le :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I will need huge terrain so instead of re-inventing the wheel i decided to port
clodterrain (contrib dir, old code) into current nebula2/mangalore code.

a) so far, the ok parts :
moved all classes into nebula regular tree ; compil as lib
move all resources (textudes, shader, etc) into "export" or "data" too
removed opende, replaced with direct ode objects
convert lua script into tcl
created a new standalone viewer, into magalore tree

compilation, linking ok,
compiling new terrain data (clod, tqt) works
viewer launch

b) now, what's wrong !!!!!
the terrain doesn't render at all. the clod terrain IS loaded - i checked -,
others dummy obj render well, moved the camera far away but it's not as simple
as that !. Seem the clod object go into render process too (RenderGeometry)

I only know basic about shader and I think the pb is here. clodterrain use and
old renderpath struct, here how i -try- to merge it into dx9*_renderpath.xml


<!-- render path for DX9 with 2.0 shaders -->
<RenderPath name="dx9hdr" shaderPath="renderpath:2.0">
        <Shaders>
.....
.....
        <Shader name="splatterrain" file="shaders:splatterrain.fx" />
        </Shaders>
.....

     <Section name="default" >
         <!-- depth pass -->
         <Pass name="depth" shader="passes" technique="tPassDepth"
renderTarget="Depth" clearColor="0.0 0.0 0.0 1.0" clearDepth="1.0" clearStencil="0">
             <Phase name="depth" shader="phases" technique="tPhaseDepth"
sort="FrontToBack" lightMode="Off">
    <Sequence shader="splatterrain" />
.....




What do you think ??? what/how should I debug know ????

Thks.

--
for my 3d work it's over there --> http://j.a.l.free.fr/3dsmax
update 26 Aug 2006


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

*** NOTE: To reply to the list use "reply to all",  ***
***       to reply direct to the sender use "reply" ***
_______________________________________________
Nebuladevice-discuss mailing list
Nebuladevice-discuss@...
https://lists.sourceforge.net/lists/listinfo/nebuladevice-discuss

Re: clodterrain + mangalore ; rendering PB

by je.a.le :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

je.a.le wrote:

> I will need huge terrain so instead of re-inventing the wheel i decided to port
> clodterrain (contrib dir, old code) into current nebula2/mangalore code.
>
> a) so far, the ok parts :
> moved all classes into nebula regular tree ; compil as lib
> move all resources (textudes, shader, etc) into "export" or "data" too
> removed opende, replaced with direct ode objects
> convert lua script into tcl
> created a new standalone viewer, into magalore tree
>
>

I got "something" displaying :

http://j.a.l.free.fr/nebula2/nclodterrain-070112.jpg

Nota : this is a texture mapped terrain, I will test tile mapped tomorrow, will
see if textures show up as expected !


As yo can see there're "some" problems ! : the terrain doesn't react to
material/light params, whatever I set, on the n2 or fx files : always displays
like this ; any ideas how I can resolve this ?????????

Here how a set shaders.

In dx9hdr_renderpath.xml :

<RenderPath name="dx9hdr" shaderPath="renderpath:2.0">
<Shaders>
   ....
<!--clod terrain -->
<Shader name="splatterrain" file="shaders:splatterrain.fx" />
<Shader name="pterrain" file="shaders:phases.fx" />
</Shaders>

<Section name="default" >
....

<Pass name="SceneOpaque" shader="passes" technique="tPassEnvironment"
renderTarget="Scene">
        <Phase name="nolight"
        ....
         </Phase>
       
        <Phase name="nclodterrain"  shader="pterrain" technique="tPhaseTerrain"
sort="FrontToBack" lightMode="Off">
        <Sequence shader="splatterrain"  shaderUpdates="No"  mvpOnly="Yes" />
        </Phase>

        .....
</Pass>
....
</RenderPath>


for phases.fx :
.....
technique tPhaseTerrain
{
     pass p0
     {
         AlphaTestEnable = False;
         ZFunc           = LessEqual;
     }
}
.....

splatterrain.fx , basically the same as svs :
....
technique t0
{
     pass p0
     {
          TextureTransform[0] = <TextureTransform0>;

         ZWriteEnable     = True;
         ColorWriteEnable = RED|GREEN|BLUE|ALPHA;
         ZEnable          = True;
         AlphaBlendEnable = <MatTranslucency>;
 
         SrcBlend         = One;
         DestBlend        = One;
         NormalizeNormals = True;

         AlphaFunc        = Greaterequal;
         AlphaRef         = <AlphaRef>;

         CullMode = <CullMode>;

         SpecularEnable = false;

         Sampler[0] = <WeightSampler>;
         Sampler[1] = <DetailSampler>;

         ColorOp[0]   = SelectArg1;
         ColorArg1[0] = Texture;

         ColorOp[1]   = Modulate;
         ColorArg1[1] = Texture;
         ColorArg2[1] = Current;

         ColorOp[2]   = Disable;
       
        VertexShader = compile vs_2_0 vsMain();
         PixelShader  = 0;
     }
}



Any hints would be nice, Thks


--
for my 3d work it's over there --> http://j.a.l.free.fr/3dsmax
update 26 Aug 2006


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

*** NOTE: To reply to the list use "reply to all",  ***
***       to reply direct to the sender use "reply" ***
_______________________________________________
Nebuladevice-discuss mailing list
Nebuladevice-discuss@...
https://lists.sourceforge.net/lists/listinfo/nebuladevice-discuss