Jump to content

Icare

Members
  • Posts

    73
  • Joined

  • Last visited

Posts posted by Icare

  1. Hi !

     

    who can explain to me why my code doesn't work ?

    If I set the entitytype of the sphere to 20, and the filter too, there isn't result of the linepick, if I set it to 0 it's ok....

     

    local sphere:tmesh=createsphere()

    EntityType(sphere, 20, 1)

     

    Print GetEntityType(sphere)

     

    Local pick:TPick = LinePick(Vec3(0, 0, -5), Vec3(0, 0, 10), 0, 20)

    If pick <> Null Then

    Print "ok"

    End If

     

    thank,

     

    Nicolas

  2. If I understand everything, you want to put a shadow map on your model. I have no idea how we can do it.

     

    It will be more simple, if you post all yours textures and mesh, I will be able to make some tests...

     

    Does the material is ok on the model on ADN material?

     

    don't forget, that if you use ADN you must use shader.pak that is give with it

     

     

     

    SetShaderFloat(GetMaterialShader(mymaterial),"alphatest",0.50)

    => is the extrat parameters for you material, so you mest set this value, where mymaterial is the material of you object, that you can obtain by mesh.GetMaterial

     

    Nicolas

  3. It's working fine, but I found a bug (sorry) :lol:

     

    IF I'm selects a destination as opposed to the current leadership, and it has not yet reached the first destination. This may occur immediately or after a

    certain time

     

    AMD X4 640

    4 GO

    ATI 5770

    Seven Home 64 bits

     

    Nicolas

  4. stuff, I'm thinking that come from new mouse control, but I don't explain why this bug it's only on Intel processor. I don't have this bug and it's alway diffuclt to add a fixe

     

    For GL ans Sway, yes it will support in a next release with the material type combobox

     

    I would like to work with someone on Intel processor, I'will send him my source code and with Messenger we can try to resolve it

     

    Nicolas

  5. I found why your parallax effect doesn't work, your alpha channel on diffuse is completely white texture like said Josh

     

    APHA channel of the diffuse texture mustrepresent your image. You can get something not too badly with :

    - get the negative off diffuse

    - increase her brightness

    - glue the result in your alpha channel

     

     

    You use an older version of ADN that not support Parallax, go to the main post and download the 1.1. After you must select the material type on PARALLAX not DIFFUSE

     

    Nicolas

  6. I'm not realy good with shader, I have juste use the existing shader from leadwerks and add some little change in mesh.frag to have more specular or set some value who are not in uniforms.

     

    After I just add the geston of some tags who wasn't treated like LW_SPECULAR : For example on cubmap or if there was no presence of a normal map

     

     

    But I can try

    • Upvote 1
  7. Hi !

     

    I had the same problem. The parallax effect is not obvious to use because we must not forget to put a alpha layer in your texture ...

     

    If you use the POM.FRAG, the default settings in the MESH.FRAG do not get the correct effect.

     

    I have implemented it in the next release of ADN, which makes it easier to configure, it will come out in a few days

    ADN Material editor

  8. Hi,

     

    Who can explain to me the usefulness of the shadowshader in .mat

     

    And how do you dynamically set it in a material, because there is nothing in the wiki or in the command loadshader ...

     

    thanks

     

    Nicolas

  9. You're thinking thaht I've aldready try EVENT_MOUSEWHELL :-), it's never receive on any gadget ...

     

     

    It's very diffuclt, because that I use Maxgui, KEYDOWN, KEYHIT, MOUSEX etc ... don't work, I must use event. So I can get an event into an event, but it's working fine with right mouse ...

     

    My source code for event detection, it's an HookFunction

     

    Function GUIHook:Object(iId:Int, tData:Object, tContext:Object)
    
    Local Event:TEvent = TEvent(tData)
    
    
    Select Event.id
    
    	Case EVENT_MOUSEDOWN
    		If Event.Source = cavLeadWerks
    			If Event.data = 1 bControl = True
    			If Event.data = 2 bZoom = True
    			If ActiveGadget() <> frmMain ActivateWindow(frmMain)
    		EndIf
    
    	Case EVENT_MOUSEUP, EVENT_MOUSELEAVE
    		If Event.Source = cavLeadWerks
    	 		bControl = False
    			bZoom = False
    		EndIf
    
    	Case EVENT_MOUSEMOVE
    		If Event.Source = cavLeadWerks
    			AdnMouseX = Event.x
    			AdnMouseY = Event.y  
    
    			sngMouseX = Sgn((AdnMouseX + GadgetX(cavLeadWerks)) - (GadgetWidth(frmMain) / 2))
    			sngMouseY = Sgn((AdnMouseY + GadgetY(cavLeadWerks)) - (GadgetHeight(frmMain) / 2))
    		EndIf
    
    	Case EVENT_KEYDOWN
    		adnKey = Event.data
    
    	Case EVENT_KEYUP
    		adnKey = 0
    		adnKeyhit = False
    
    	Case EVENT_MOUSEWHEEL
    		DebugLog "Mouse wheel"
    
    
    	Case EVENT_MENUACTION
    		DoMenuAction(Event.data)
    
    	Case EVENT_WINDOWCLOSE
    		If Event.source = frmMain
    			CloseADN()
    		EndIf
    
    	Case EVENT_WINDOWSIZE
    		If Event.source = frmMain
    			SetGraphics CanvasGraphics(cavLeadWerks)
    		End If
    
    
    	Case EVENT_GADGETACTION
    		DoGadgetAction(Event.Source, Event.data)
    
    	Case EVENT_GADGETSELECT
    		If Event.source = treeview Then
    			SetGadgetText(lbsurface, GadgetText(SelectedTreeViewNode(treeview)))
    
    			 loadsurfacemateriel(SelectedTreeViewNode(treeview))
    		EndIf
    
    EndSelect
    
    Return tData
    
    End Function
    
    

  10. Hi,

     

    For my texture editor (DNA Material) I improved the use of the mouse and keyboard.

     

    But I encountered two problems with maxGui:

    - No detection of the mouse wheel

    - No EVENT_KEYDOWN if right mouse button is active

     

    Does anybody have an idea of why?

     

    Nicolas

  11. Hi !

     

    Some news about ADN... I'm working on a new realse that include :

     

    New shaders:

    * FallOff (found in the forum)

    * Parallax

    * Added supplemantaires parameter declarations in the header,which you must add in your source code (look at falloff screen shot)

     

     

    New features:

    * Normal map generating (with code found in the forum)

    * Free camera mode

    * Opening your own model (multi child, multi surface)

     

    ADN11.JPG

     

    ADN112.JPG

     

     

    There are some little bugs on the texte zone , like you can seen on the screen capture

     

    Soon in your PC :-)

     

    Nicolas

    • Upvote 1
  12. Hi

     

    I'm thinking that I found a bug in object with multi surface...I found a temporary solution, but it's very strange, it looks like the surface doesn't reset after a create

     

    In first time my code who created 2 plans and I assign 2 materials, but the second surface doesn't show correctly the material. And the screen shot

     

    	_mesh = CreateMesh()
    
    	surf = _mesh.AddSurface()
    	surf.AddVertex([1.0, 1.0, -1.0], [0.0, 0.0, 0.0], [0.0, 0.0])
    	surf.AddVertex([1.0, 1.0, 1.0], [0.0, 0.0, 0.0], [1.0, 0.0])
    	surf.AddVertex([1.0, -1.0, 1.0], [0.0, 0.0, 0.0], [1.0, 1.0])
    	surf.AddVertex([1.0, -1.0, -1.0], [0.0, 0.0, 0.0], [0.0, 1.0])
    	surf.AddTriangle(0, 1, 2)
    	surf.AddTriangle(0, 2, 3)
    	mat = LoadMaterial("abstract::skyright.mat")
    	PaintSurface surf, mat
    
    	' Front Face
    	surf = _mesh.AddSurface()
    	surf.AddVertex([1.0, 1.0, -1.0], [0.0, 0.0, 1.0], [1.0, 0.0])
    	surf.AddVertex([1.0, -1.0, -1.0], [0.0, 0.0, 1.0], [1.0, 1.0])
    	surf.AddVertex([- 1.0, -1.0, -1.0], [0.0, 0.0, 1.0], [0.0, 1.0])
    	surf.AddTriangle(0, 1, 2)
    	surf.AddTriangle(0, 2, 3)
    	mat = LoadMaterial("abstract::test.mat")
    	PaintSurface surf, mat
    

     

    And the screen

    surface01.jpg

     

    the solution, I must Create two Time the First vertex on the second surface

     

    
    	_mesh = CreateMesh()
    
    	surf = _mesh.AddSurface()
    	surf.AddVertex([1.0, 1.0, -1.0], [0.0, 0.0, 0.0], [0.0, 0.0])
    	surf.AddVertex([1.0, 1.0, 1.0], [0.0, 0.0, 0.0], [1.0, 0.0])
    	surf.AddVertex([1.0, -1.0, 1.0], [0.0, 0.0, 0.0], [1.0, 1.0])
    	surf.AddVertex([1.0, -1.0, -1.0], [0.0, 0.0, 0.0], [0.0, 1.0])
    	surf.AddTriangle(0, 1, 2)
    	surf.AddTriangle(0, 2, 3)
    	mat = LoadMaterial("abstract::skyright.mat")
    	PaintSurface surf, mat
    
    	' Front Face
    	surf = _mesh.AddSurface()
    	surf.AddVertex([- 1.0, 1.0, -1.0], [0.0, 0.0, 1.0], [0.0, 0.0])
    	surf.AddVertex([- 1.0, 1.0, -1.0], [0.0, 0.0, 1.0], [0.0, 0.0])
    	surf.AddVertex([1.0, 1.0, -1.0], [0.0, 0.0, 1.0], [1.0, 0.0])
    	surf.AddVertex([1.0, -1.0, -1.0], [0.0, 0.0, 1.0], [1.0, 1.0])
    	surf.AddVertex([- 1.0, -1.0, -1.0], [0.0, 0.0, 1.0], [0.0, 1.0])
    	surf.AddTriangle(0, 2, 3)
    	surf.AddTriangle(0, 3, 4)
    	mat = LoadMaterial("abstract::test.mat")
    	PaintSurface surf, mat
    

     

    And the screen

    surface02.jpg

     

    Nicolas

×
×
  • Create New...