-
Posts
1,272 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by VeTaL
-
-
Yep, there were some problems with rendering
-
For now, i'm using 2 GUIs:
1. ImGui (taken from raycast lib, and, to be correct, from Chris Paulson's Game )
pros: its extremely simple, fast and code-driven.
negs: it doesnt support skins, so it cant be end-user UI
add: in combination with _raise/_event system (i tried to find, where i got it, but wasn't scusessed), it makes creation of debug panels extremely simple:
1) its needed to inherit from GameObject: PlayerManager : public GameObject
2) its needed to define 3 virtual functions
virtual void UpdateEvent( float gameLoopTime); virtual void RenderEvent( float gameLoopTime); virtual void RenderGuiEvent( float gameLoopTime);
3) its needed to define RenderGuiEvent, which would be called every frame while drawing gui
void PlayerManager::RenderGuiEvent( float gameLoopTime ) { imguiBeginScrollArea("Player debug", 800, 10, 200, 200, &_debugScroll); if (_controller) { _playerPos = EntityPosition(_controller); sprintf(_debugBuf, "playerX: %f", _playerPos.X ); imguiValue( _debugBuf ); sprintf(_debugBuf, "playerY: %f", _playerPos.Y ); imguiValue( _debugBuf ); sprintf(_debugBuf, "playerZ: %f", _playerPos.Z ); imguiValue( _debugBuf ); imguiSeparator(); } imguiEndScrollArea(); }
and thats all!
2. CeGui (i already had realization, but also nice tutorial was found here)
pros: it supports skins and layout editor
cons: its not so simple and flexible, it contains its own realisation of XML-parser, input and a lot of garbage
add: after some additional work (well, you can just close your eyes at the structure of CEGUI and use it as "black box"), you can get nice UI for end-user.
What are you thinking about it?
-
Troubles with picture, as for me
PS: its ok now
-
Is there any possibilities of this?
-
-
vec4 ambient = gl_LightSource[0].diffuse * (1.0-falloff) * 0.25 * diffuse; gl_FragData[0] = ambient + (lightcolor * diffuse * attenuation * shadowcolor) + (specular * shadowcolor);
Thats ok.
-
Got a crash.. working on it
-
The problem is that i cant find linking between light and shader.
So, i created copy of Leadwerks Engine SDK\Models\Entities\Light\Point\ and called it Leadwerks Engine SDK\Models\Entities\Light\PointArea\
then i renamed all files into light_pointArea
now i'm searching for linking with pointlight.frag (i want to create pointlightarea.frag), but total commander says that there is no text "pointlight.frag" in folder Leadwerks Engine SDK\Models\Entities\
-
Found old thread and wanted to make Area light and share it for community, but new version is differs from last one
It's already supported. Uncomment line 343 of shaders\lighting\pointlight.frag:
//ambient = gl_LightSource[0].diffuse * (1.0-falloff) * 0.25 * diffuse;
Now, pointlight.frag consists of 122 lines
-
Just wanted to add own 5 cents.
In old Gamestudio magazine, it was said that there are three types of weapon:
- raytrace (crossbow in Half-life with zoom)
- physic bullet (crossbow in Half-life without zoom, mashine gun and so on)
- grenades (you know, what i mean ) - actually, this is physic bullet with huge mass and low speed
So its for you to chose, which solution suits you best
-
he-he
Okay, looking like, a choise with composite model is the best as is solves both questions
-
I'm also thinking about composite models: afaik, in Crysis different enemies was constructed in such way, with different legs/bodies and so on.
But how easy it would be to animate?
-
I just used
MoveWindow(GetConsoleWindow(), 0, 10, 800, 600, TRUE);
This prevent from apperaing console window under main render window.
-
Okay, attaching model to bone is solved (sword, shield and so on), but what about attaching body armor/helmet?
1) About armor: looking like animator should create a speshial bone, which should indicate body rotation. i'm afraid that position of person's shoulder will differ from position of armor's shoulder.
2) About helmet (same for gloves and so on): as he is attaching on the head, the head is not visible (or hand in case with gloves). Wouldnt it be a waste of polygons?
Or its better to create separate models and just cnahge "head" -> "helmet with face", "hand" -> "glove" ?
-
EntityParent(sword,FindChild(mi1->GetModel(),"Bip01 R Finger0"),1);
Really, this works nice.... such a stupid mistake
Thanks, macklebee, for your time
-
120 fps with no decals
103-105 with 1 decal
96-99 with 2 decals
88-91 with 3 decals
85 with 4 decals
79 with 5 decals
74 with 6 decals
-
http://broniac.blogspot.com/2011/06/deferred-decals.html
Didnt read it yet, but looking interesting.
-
I'll test, maybe if you attach to finger, there is nothing to break... and if sword is attached to Spine - all other hieracy is broken... i'll check your variant
-
I'm talking about this ( http://www.leadwerks.com/werkspace/topic/3460-equipment-attaching/page__view__findpost__p__31510 )
Did you used EntityParent or SetEntityMatrix ?
-
2 Flexman:
I used weapon from here http://www.leadwerks.com/werkspace/files/file/214-2-medieval-weapons/
macklebee is right:
//The origin was in the middle of the blade, instead of at the middle of the handle.
The main idea of delta-movement and delta-rotation was in correction.. but as you said that
1) I changed the origin and orientation of the sword, parented it to the hand, positioned and rotated as needed, and ran the animations and it worked just fine.
2) I guess I am missing the issue here. I can parent a sword to the crawler's hand, then set the rotation and position as needed in the un-animated state. Then when I turn on the animation, the sword follows the hand automatically.
3) If i set the parent of a model or a mesh, it will automatically take the scale of the parent. So if the parent is being scaled by .5, then the child model/mesh would have to scaled by 2 to keep it the original size. Scaling a child model/mesh has no effect of the parent.
this is great information to sum up the most number of attaching questions.
PS: but i'm missing nice-working Parenting, it should be more productive
-
Second test:
SetEntityMatrix(sword,GetEntityMatrix(FindChild(mi1->GetModel(),"Bip01 R Hand")));
this works fine, no need in 3 points... but i wish parenting get work: while attaching there is need in delta-position
So, now i will need to add delta-matrix to sword's matrix every frame... if parenting would work as expected, i will need to add delta position only once, while parenting
-
-
Okay, i know that the best way of doing this is shader, but....
I have model of fat and thin face... now i want to get a new model: i get every vertex of first model, then from second model, got an equation of "division of the segment in a given ratio" and a coefficient (A).
if A = 0 then each vertex of new face is on the place of vertex from first face (they are similar)
if A = 0,5 then i have my own face - between first and second
if A = 1 then my face is similar to second face
The question is: do anybody work on this before using Leadwerks? Is this idea effective?
And what about instancing: if i would move one vertex of instanced model, wouldnt all other models change?
-
Get UV texture from raytrace
in Programming
Posted
Thanks for links, i'll look through them.
//if you are just after the texture, could you not just use a combination of pick.surface, GetSurfaceMaterial(), and GetMaterialTexture()?
err.. what? )