-
Posts
465 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Aily
-
-
One my friend say me to compare squares, not distances, because SQR is heavy command. So
dist1#=(v1.x-v2.x) * (v1.x-v2.x) + (v1.y-v2.y) * (v1.y-v2.y) + (v1.z-v2.z) * (v1.z-v2.z)
dist2#=(v1.x-v3.x) * (v1.x-v3.x) + (v1.y-v3.y) * (v1.y-v3.y) + (v1.z-v3.z) * (v1.z-v3.z)
if dist1<dist2 ....
Without SQR calcilations
P.S. Cool glasses Alien
-
1. The best way to make house - is make it as single mesh with one flattered texture. - very fast to render.
2. Some slowly - multimaterial, when all different material meshes attached to one mesh.
3. Very slow - is group all house walls\flor.
I see that Leadwerks not lost speed on render meshes, more important is culling i thinking.
if you will be gather house by walls\flor in editor, at render it must be frustum culled many times. And if you will have many such houses, each frustum cull for each separate mesh..... And you incrase totel count of rendered objects in scene.
I thinking such things in most of engines. 3DRipper DX is good way to se how ready game rendering it resources. For example, Prince Of Persia Prodigy - don't cull beside camera objects, all scenes created by models (not terrain), and it showing 300 000 - 400 000 triangles per frame with ~1000 meshes
-
distance betwen points
local v1:tvec3=vec3(1,2,3) local v2:tvec3=vec3(4,5,6) distance#=sqr( (v1.x-v2.x)^2 + (v1.y-v2.y)^2 + (v1.z-v2.z)^2 )
-
There is no shader in blitz3d...
I don't know if i can modify the "brush" in Blitz3d, i'm going to try that. Thanks
Oh, sorry man. I was thinking that you asking about Leadwerks
-
You need to assign materials with shader "mesh_diffuse_vertexgi.frag" It's more complex than BrushFX or EntityFX.
Blend mode can't show vertex colors.
-
Hi everyone,
I want to do the following:
define a quad with custom commands (using le-commands like createmesh, createsurface, addvetrex, addtriangle etc)
I want this quad to look like a glass..
I have to be able to set its alpha value (its transparency) dynamically during run-time
How can I do this?
I have already looked in the traqnsparency tutorial.
I do not want to render refractions, a refraction shader is overkill in my case, since the glass is very thin (windshield of a car)
(the material files are not existing anyway, which was a serious disappointment for me by the way).
I just need to draw the glass.
and later I want to apply a normal map to the glass surface.
You need to assign material with blend=alpha, and then control it color by EntityColor mesh,vec4(1,1,1,alpha), and render transparent meshes in second pass after lighting.
If you don't want to use refractions, why you need normalmap then? For cubemap reflections?
-
It's amazing!!!!! It must to be a part of any 3D engine! Great man!
-
When i'm run any game, or Leadwerks application i hear some high frequency noise in my speekers. Interesting, in Winamp or any video there no any noise, just only iin games.
Did anybody have such trouble? Ar someone know how to fix it?
-
So I seem to remember small bodies moving fast sometimes miss collisions. Are you finding that with this method?
SweptCollision body,mode - never miss
-
Leadwerks sintax is easier than DarkGDK. And much*1000 times pretty render.
-
First part is good, random point in square. But not raycast, better to use bullet body.
set Pivot(dummy) target object on picked position
b=Createsphere(.1)
positionentity b,entityposition(player) ( or enemy )
pointentity b,target
setbodygravitymode b,0
setbodymass b,1
septcollision b,1 ' important
setbodyforce b,vec3(0,0,1000)
setentitycollisioncallback b,on_bullet_hit,ENTITYCALLBACK_COLLISION
First time i maked as you say, but then i was need to write separate code for enemy shots. In this issue enemy can shot just like player (you need just position it target to player) and respawn bullet.
In my gameplay demo (with spaceship) bullets maked same.
So you can control bullet size!
Your fire from weapon will be respawn before respawned particles from hitted body.
You can simple create ricochet with it
Im using raycasting only for enemy finding player
-
This is getting a lot more complicated than I thought it would be. Here's the original swf file. I think this has to be modified.
Yours works, but it plays the sound when the page loads, instead of when a message is received.
-
Play the wav file in my attachment and you will see they are not the same.
You riht! Here is new one.
-
I don't think your version is updated.
I can't understand this. Do flash play sound? I think is that you wanted
-
Catch it
The AS3 code is:
import flash.media.Sound; var beepSound:beep = new beep(); beepSound.play();
-
Hello. I'm trying to change a model (that means both mesh/physbody) for an entity and keep its properties intact (like velocity, keys, position, angles, color,etc). I've browsed the wiki to find a function suitable for me. I'm not sure about Set/GetEntityUserData. The wiki doesn't seem to say much. Anyone care to help me with a detailed explanation on how these 2 functions work. More over, how can I solve my SetModel function problem? Help is much appreciated.
You forget to say on what programming language?
In BMax:
Type MyData field x,y,z end type c=createcube() md:MyData=new MyData md.x=1 md.y=2 md.z=3 setentityuserdata c,md ' and now we can get data: md=MyData(getentityuserdata(c)) print md.x print md.y print md.z
-
Thats is really cool aily. How long doe it take you to make it?
How much time you mean? )))) There is less than 10 lines of code in shaders, about 20 minutes.
-
nice Aily... this is very similar to the one you did on the old forum...
Yes, i just port it into new version, saw here somewhere that people need it.
any suggestion on how to apply it to only a specific model instead of as a post process effect? Something like that would be extremely useful for creating a highlight/glow around a model.
I will think about it
But glow is works!
-
Any screenshots by chance?
Just click to download file, and there will be screenshots in download post.
-
File Name: Cartoon shaders
File Submitter: Aily
File Submitted: 17 Oct 2010
File Updated: 17 Oct 2010
File Category: Tools and Utilities
Just replace your shaders.pak with it, and your game became cartoon render style.
It's not affect FPS much. Just detect edge in postfilter.frag and multiply pixel by 0.1, and downsampling attenuation of directional light (for point and spot there is bad idea to do this, looks not so good).
-
Well I expect that the AppTime is calculated only once per update and then cached and it should return the same result per frame, so I think it's the same as performance.
Also for the second question I say that it's the same as performance since you're not doing any operations on the Vec3 except the initialization with default values.
At the end it's just matter of taste, I'd prefer to instantiate a variable in both cases just because if tomorrow I have to change their value it should be done on a single line and not 3+
Thanks man
-
In all examples all values are multiply by appspeed() function. So what is faster to calculation:
this:
repeat turnentity cube1,vec3(0,1*appspeed(),0) turnentity cube2,vec3(0,2*appspeed(),0) turnentity cube3,vec3(0,3*appspeed(),0) forever
or this:
repeat spd#=appspeed() turnentity cube1,vec3(0,1*spd,0) turnentity cube2,vec3(0,2*spd,0) turnentity cube3,vec3(0,3*spd,0) forever
?
And that's one, what is better (faster) to using vector constructors:
this:
repeat turnentity cube,vec3(0,1,0) forever
or this:
global turn_vec:tvec3=vec3(0,1,0) repeat turnentity cube,turn_vec forever
?
-
Do you mean that you will not be using framework? I haven't seen anbybody doing that. Every single lua test you run inside the editor doesn't require you to make a framework object, which means that a framework object is already being created when the editor is first started.
But perhaps Josh can give you a better answer on this.
I see you know LUA well (see your examples).
No, i will use framework, but want self render to it.
I saw LUA files, where calling "Flip", as i understand, in LUA, user can repalace one method with enover. And think that is possible to turn off standart render and make it my own.
-
I want to discard standart rendering in editor, and make it myself. I need simple some rework render pipeline. Don't ask me why \
So, does it possible, to connect my own LUA script that can control render?
Fortran 2008
in Programming
Posted
How about types(classes) in Fortran?
Can you show example like this: