Amabilis Software    3D Canvas Community    3D Canvas Discussion Forums  Hop To Forum Categories  Fixed Bugs    canvas 7 env mapping and material plugins (Resolved in 7.0.0.1)
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Member
Picture of Paul Gausden
Posted
Hi Richard,

There appears to be no texture transform set for the env map.

I tried to write a plugin to do the fix it with the following code:

  Dim mTxTransform As D3DMATRIX

    ' use x axis transform
    ' 
    mTxTransform.m13 = 0.5
    mTxTransform.m22 = -0.5
    mTxTransform.m31 = -0.5
    mTxTransform.m41 = 0.5
    mTxTransform.m42 = 0.5

(I'm not sure if you are using multi or single pass)
    If TextureCombined Is Nothing Then
        D3DDevice.SetTransform D3DTS_TEXTURE0, mTxTransform
    ElseIf NormalMap Is Nothing Then
        D3DDevice.SetTransform D3DTS_TEXTURE1, mTxTransform
    Else
        D3DDevice.SetTransform D3DTS_TEXTURE2, mTxTransform
    End If

(then draw primitives etc... )



but it crashed with an error hex 80010108

I then tried to compile and run the RotateColors sample, but that failed with the same error code.

This message has been edited. Last edited by: Amabilis Support,
 
Posts: 1146 | Location: Surrey, UK | Registered: Fri November 07 2003Reply With QuoteEdit or Delete MessageReport This Post
Member
Picture of Paul Gausden
Posted Hide Post
There are also some odd effects when you apply an env map using the cylindrical or spherical mapping....
 
Posts: 1146 | Location: Surrey, UK | Registered: Fri November 07 2003Reply With QuoteEdit or Delete MessageReport This Post
Member
Picture of Amabilis Support
Posted Hide Post
Yes, it looks like you are right.

3D Canvas uses many texture stages (I think up to 5). You would need to check with Direct3D as to which one is used for what. What you need to do is a compare of the texture provided as "environment map" with those used by the device to find which stage uses the environment map. It's going to change depending on whether there is a bumpmap etc.

I'm surprised RotateColors doesn't work. It couldn't be simpler. It works almost exactly the same as the "set specular color" plug-in.
 
Posts: 1493 | Registered: Thu November 06 2003Reply With QuoteEdit or Delete MessageReport This Post
Member
Picture of Paul Gausden
Posted Hide Post
It's the same with any material plugin.

I just cut out all the code from the sample, leaving just the setindices and drawprimitive and the crash still happens.
 
Posts: 1146 | Location: Surrey, UK | Registered: Fri November 07 2003Reply With QuoteEdit or Delete MessageReport This Post
Member
Picture of Paul Gausden
Posted Hide Post
hmmm - the error code seems to be related to late binding of objects.
 
Posts: 1146 | Location: Surrey, UK | Registered: Fri November 07 2003Reply With QuoteEdit or Delete MessageReport This Post
Member
Picture of Amabilis Support
Posted Hide Post
Material plug-ins definitely use late binding. I wonder if there is something that I need to supply to make it so you can correctly compile. I'll have to investigate.
 
Posts: 1493 | Registered: Thu November 06 2003Reply With QuoteEdit or Delete MessageReport This Post
Member
Picture of Amabilis Support
Posted Hide Post
I've fixed the problem where there was no texture transform. It's in 7.0.0.1.

I haven't figured out the rest brought up by this.
 
Posts: 1493 | Registered: Thu November 06 2003Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

Amabilis Software    3D Canvas Community    3D Canvas Discussion Forums  Hop To Forum Categories  Fixed Bugs    canvas 7 env mapping and material plugins (Resolved in 7.0.0.1)

© Amabilis Software 2003-2008