-
Posts
465 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Aily
-
-
Lum, you don't understanding
I need something like
cam=createcamera()
world:tmatrix=getcameraWORLDmatrix(cam)
view:tmatrix=getcameraVIEWmatrix(cam)
proj:tmatrix=getcameraPROJmatrix(cam)
-
Try adding 10000 cubes and see if your forward renderer is still faster with your sun then. So forward renderer is only good when you make simple scenes, and not real games.
My project don't be render more than 50 000 triangles per frame. And about 20-30 DIP calls (primitives at frame), so, i think forward render will be better.
So. How about matrices?
-
I want to build my own not-deffered renderer for LW2.24, and all works fine. FSAA and light. But for result calculation of shadow map I need WorldViewProj matrix of light (i.e. camera that renders shadow depth buffer) to compare depths of source pixel and it's position in the depth texture.
So, is Leadwerks have such methods?
P.S. before ask to your question: "Why do you need forward render?"
With deffered lighting in my project (it have sun light only) i have 100 FPS (notebook), and with forward render - 250 FPS. So... think you understand.
Thanks
-
-
I don't know does anybody asked this.
Why when i render to texture by 3DSMAX direct in to DDS format Leadwerks cant draw it? I tryed different DDS compression types in MAX options, but textures don't drawing therefore.
Some time ago i downloaded cubemap textures in DDS from Nvidia site, and it's not works in leadwerks, but in MAX viewport all cool.
Funny, how many DDS formats in the world?
What you think? How it is treated?
-
Yeah, funy game. It is possible absolutley.
-
Updated new version
Added mix by texture (vertex color are discarded)
GI map
Viewport shadows
Texture copy on export
And many bug fixes.
-
It's working now, we must generated the mipmap. But if someone have something more quickly to do this with out pass by a pixmap.
With this we can see in real time the result on the object
Local sphere:TMesh = CreateSphere() PositionEntity sphere, [0.0, 0.0, 5.0] Local mat:TMaterial = LoadMaterial("abstract::plastic_green.mat") PaintEntity sphere, mat Local texture:TTexture = mat.GetTexture(0) Local pix:TPixmap = texture.GetPixels(0, 0) For Local I:Int = 0 To pix.Width - 1 For Local Ii:Int = 0 To pix.Height - 1 pix.WritePixel(I, Ii, RGBA(0, 0, 255, 1)) Next Next texture.SetPixels(pix) texture.GenMipMaps()
If you want to execute this "on the fly", it is will be very slow solution.
I've been maked some texture paint tool some time ago, and in my case I used shader to do this.
1 - get texture.
2 - clone it
3 - set source texture buffer as drawing buffer.
4 - set clone texture as buffer, that you want to draw (DrawImage(GetColorBuffer(clone_texture),0,0))
5 - set post effect shader that have x,y uniforms to set position of drawing pixel and color of it
... in shader you need to draw all source texture pixels, but calculate, if x and y of current drawind pixel is = x and y uniforms that you pass to shader, than draw color pixel.
This is realy fast way to draw to texture, and if you want to do some texture editor, you can write your own "brush" code in this post shader.
-
No i don't think so, but you can use the callback ( EnableMaterialCallback ) so when it's called do something.. Not sure if this can help you.
I think so, thanks
-
Is there any way to do this?
like this:
for mat:tmaterial=eachin USEDMATERIALS setshaderfloat getmaterialshader(mat),"some",0.5 next
-
Development is closed, all focus on LME.
-
Postet new version and VIDEO, changes described in:
-
When I'm using "Framework leadwerks.engine" EXE size is about 2mb. There is many modules that I'm not use, how to exclude them? Or how to connect only leadwerks-needed modules by "Using" command to decrase EXE size?
-
Is that a texture splatting material?
Yes, and you draw in realtime just in 3DS MAX viewport, and you cam see same picture in MAX viewport, and in Your's engine. It is easy way to model levels for 3DS MAX users.
I modified some your standart shader code to blend cubemap reflection strength with vertex color.R * mask. And make my own MAX viewport HLSL shader, that using almost same algorhytm .
I still have not time to make some video about this tool
-
File Name: LME: advanced materials for Arbuz 2.2 GMF exporter and Leadwerks 2.32 shaders
File Submitter: Aily
File Submitted: 13 Aug 2010
File Updated: 01 Oct 2010
File Category: Tools and Utilities
FEATURES:
What you se in 3DSMAX viewport is what you get in Leadwerks application!
1. Diffuse, bump, bump scale, cubemap reflection, specular,glossiness, map for masc spec/gloss/reflect.
2. 2 layer with same (diffuse,bump, etc...) now mixing by texture mask (in second coord channel)
3. GI map from 3DSMAX.
For this feature some reworked standart Leadwerks lighting shaders.
4. Now textures copy is working.
5. Viewport shadows now working!
Wee checked VertexColor mix speed, and it decrase FPS about 50%. So wee discard this solution and added mixing by texture mask (it decrase only 10-20% speed)
Video is not actual anymore, because of many changes...
You need Arbuz GMF exporter 2.2 and Leadwerks 2.32
1. download it
2. unpack 3DSMAX_LME to any folder you want.
3. copy updated GMF_MaterialExporter.ms from 3DSMAX_LME to yours 3DSMAX/scripts/startup folder (replace standart Arbuz's exporter).
Don't warry, i not changing standart exporter code, just added some new fatures to export LME.
4. Copy LME.fx viewport shader to your 3DSMAX/maps/fx folder (all standart fx viewport shaders are there)
5. open 3DS MAX and load 3DSMAX_LME\viewer\data\model\scene.max
if all done correct you will see scene with 3 realtime viewport materials.
5. Now copy form 3DSMAX_LME\viewer\shaders\mesh this files
LME_mesh.frag
LME_mesh.vert
mesh.frag
to your's shaders/mesh folder
and copy form 3DSMAX_LME\viewer\shaders\lighting this files
AmbientLight.frag
DirectionalLight.frag
(it is needed because ambient calculation(neeg for GI map) now written in mesh.frag shaders, not in AmbientLight.frag as by default)
6. Now you can use LME materials in Leadwerks
Thanks to Omid for idea, video tutorial and beta testing.
Many thanks to Arbuz for exporter.
-
Looks good.
Will it have options like normalmap power and other realtime preview stuff too?
It have normal map power now
In current state it will have two material layers separated by vertex color. Each material have diffuse+bump+spec/gloss strength+reflection(cubemap) streng+fresnel. Main material layer is black vertex color, second layer blended above when vertex colors become brihter (r color component). But I think to add 3 and 4 layers someday, not now. And it have vertex color mask, for more realistic blend betwen layers.
Now I created 3ds MAX HLSL shader (for viewport DirectXshader material), and working with exporter (it will be connected to Arbuz exporter). MAX users will can see same picture in viewport and in Leadwerks render. And grass animation too! And UV-shift texture animation (for waterfall animation for example)! It is amazing thing, but longer to develop.
Material editor will be same interface as material in 3DS MAX, and will be use same techniques and same Leadwerks GLSL shaders to export.
Now this material editor becomes "second thing to do" for me. First thing is viewport shader. But I will finish this editor too.
Sorry guys, I do my main work, and don't have much time to finish it fast, but soon you will see all of my promises.
-
Thanks to Omid Saadat, it's realy cool idea to build something easy material editor.
in ALPHA version you can't export shaders and materials (this will be raedy soon), but you can "play" with it, tune editors material lib. It's first release, sonn I will update it to export materials for 2.24 version (my current), and another, if you asked me.
- 2
-
How to export robot animation (by parts) from 3DS MAX?
Unhandled Exception:GL_STACK_UNDERFLOW
in General Discussion
Posted
Latest drivers must help you