-
Posts
3,946 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by macklebee
-
at least in LE3 it sounds like the characters wont have this annoying phy body of the character following it around since we will now have control over when/if the phy body gets created...
-
are you telling it to free the controller/character then recreating a new character/controller? i said it appears to be releasing everything in the world... but i had not tried it with anything but simple examples. It sounds like you just need to use ResetFramework(), reload the scene, and then recreate the character/controller... At this point without you posting your code or example code there really isn't much i can do but guess at what you are doing... if you want help, its always best to post some code so people can actually see what you are doing...
-
access model and properties from InitDialog in class.lua
macklebee replied to amit's topic in Programming
are you trying to give each LOD a separate material? or are you just trying to change the material to one thing for every model instance and their LOD? how about you post what you have? -
read through this: http://www.leadwerks.com/werkspace/topic/903-lua-error/#entry8035
-
access model and properties from InitDialog in class.lua
macklebee replied to amit's topic in Programming
you can change the material for the model and its corresponding LODs with the normal properties dialog - but it makes the change the same to all of them - Or are you asking how to set different materials to the different LODs? which is doable... just as long as you remember the current version of LE will apply the same material to all instances of a particular GMF. As for accessing the object model in the InitDialog function, you just need to put that function inside the CreateObject function. -
look at the mat file for the tree that comes with the SDK as an example... you have to use the "_alphatest" frag shader.. texture0="abstract::beech_leaf_diff.dds" texture1="abstract::beech_leaf_ddn.dds" bumpscale=0.3 cullface=0 shader="abstract::mesh_diffuse_bumpmap_sway.vert","abstract::mesh_diffuse_bumpmap_specular_alphatest.frag" shadowshader="abstract::mesh_shadow_sway.vert","abstract::mesh_shadow.frag"
-
maybe using a scrollpanel from the proxy gadgets might help?
-
it seems you would need some event ID from the inherent scroll of the textarea... but i do not see any event action/ID/status for for that...
-
how are you lining up the gutter/line numbers versus the textarea in the current script editor? it seems to be working correctly... or is that something inherent from using scintilla or something like it?
-
access model and properties from InitDialog in class.lua
macklebee replied to amit's topic in Programming
if you are talking about adding custom properties in the ui for your model, then yes that is possible... look at the scripted objects that come with SDK as well as the numerous examples in the forum... as for making custom properties for each individual instance of an object, just set the options in the ui and control how that instance should behave by programming the rest of the script to respond to whatever settings you pick in the properties ui... maybe if you are more specific on what you are trying to do someone will be nice enough to help... -
well my memory is slipping but i know i had used the hooks in the past without any issues... see the video that MG posted at one time with the cctv camera, cctv screen, and switch with the hand icons... we had made those all lua scripted objects calling 2D drawing functions and it worked fine at the time... doubt if they work now with all of the engine updates though... also, the fliphook() seems to be more of a game script function whereas only one can exist in a scene at a time
-
while i agree it would be nice to have an entity 2D drawing function available, I don't understand some of the things you are stating above... i have used the AddHook() repeatedly in the past inside the CreateObject() without any issues... unless you are referring to issue of not being able to call it as an object function? which i agree is annoying but not a showstopper... the only issue i can really remember is when you delete an object that uses the same name AddHook("flip") function as other objects, the last object added to the scene will have its AddHook removed as well (assuming you do use RemoveHook in the object:Free() ) are you saying you would have errors or issues with something like this? require("scripts/class") require("scripts/hooks") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) function DrawMyName() if object.model~=nil and object.model:Culled(fw.main.camera)==0 then local pos = CameraUnproject(fw.main.camera,object.model.position) DrawText(object.model:GetKey("name"),pos.x,pos.y) end end AddHook("Flip", DrawMyName) end
-
yeah im going from memory here so i will assume that is the case... but there is always the "scripts/hooks" script that can be used and then just use the AddHook() and RemoveHook() functions in the script...
-
or just use the inherent function already available for use in object scripts... require("scripts/class") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) function FlipHook() if EntityDistance(fw.main.camera, object.model)<2 then SetBlend(1) DrawText("test", 100, 100) SetBlend(0) end end end also look at CameraUnproject in the wiki and then draw the text for a specific model based on its location in screen space... i dont have a good connection or access to LE at the moment, so thats about all i can suggest...
-
i had at one time a scripted object posted in the asset store that actually allowed you to set all of the standard items that are listed in the editor. Then if you loaded your scene the same settings would be automatically available in your program. But unfortunately with all the forum data losses and me not being able to access my LE stuff for several more weeks, I can't load it up for you... perhaps someone that downloaded it can post it for you. but in any case, ModelDetail(integer) - integer sets the LOD model reference where 0 is the highest level of detail terrain:SetShadowMode(1) Depth Of Field commands = http://www.leadwerks.com/wiki/index.php?title=Framework#Depth_of_Field_Commands
-
Particle Update: Video Blog Style!
macklebee commented on Chris Vossen's blog entry in Chris Vossen's Development Blog
it looks more like attractors and anti-attractors... not really a deflector... but maybe that aspect wasn't shown in the video. My idea of a deflector would be something like smoke going up until it hit an overhang then being deflected to move around it to maintain an upward movement. What the video appears to show is its all or nothing direction control towards or away from the attractor. But maybe Chris is sandbagging and doesn't want to show that the particles will work with multiple attractors at the same time and the effect the attractor has is based on particle proximity to it. Or something like that. Still looks great though and much better than the LE2 implementation. -
what about setting the locations of the joints between the bodies... that's always been an issue determining if you have the joint/pin set in the location correctly... is there going to still be a visual aspect to this that lets us know where it is located at? as for the parent-child-parent thing - a simple example would be newton's cradle. Would making the ball the parent instead of the two opposing strings still allow for this to work correctly? but then it gets to being a matter of making the stands that the strings are attached to separate pieces instead of one to allow for the parent-child relationship, i guess...
-
Thanks for the explanation of the prefab - makes sense. I assume the prefab also stores scripts that have been attached as well? Yes, several times I had wished the joints in LE2 were entities. That would be great to be able to use the standard entity commands on them as well as be able to see them. I think we would have alot more complex physics setups with some sort of visual representation of where the joints (and PINS!) are located in regards to the physics bodies.
-
so no more saving OBJ's if i follow correctly? this creates the physics shape from the MDL mesh? if so, thats great since that was always annoying to have to create OBJ's and GMF's. Can you explain what you mean by "attach that shape to the model and save it as a prefab"? How is the shape attached to the model? And how is it being saved as a prefab? Is a prefab a separate file type? Also, was there not a plan at one point to have some sort of visual physics editor to allow for easy construction of joints? Is this still a possibility? Or has this already been included into the editor?
-
the exported FBX model definitely has issues... when its opened in UU3D, it lists 360 bones (btw LE only supports up to 256) - 172 of which have no animation and there is no skeletal heirarchy... 75184 vertices and 69163 polygons which includes 39 empty meshes... and 69 textures/materials... and for some reason there appear to be several planes exported along with this... and a sword which is twice the size of the character that is located below the character... offhand, i dont think its the fbx2gmf converter's fault that its failing...
-
Exposing of Framework buffers to the lua interface
macklebee replied to klepto2's topic in Suggestion Box
http://www.leadwerks...ailable-in-lua/ its been posted as a bug and was reported that it was fixed - but I cannot find any sign that it has been done. Edit- the gbuffer has been exposed, but i do not know if the other buffers have been or not... -
Lots of .tga files to .dds? Same .obj to .gmf?
macklebee replied to GermanLeadBrothers's topic in Game Artwork
you can try this tool in the asset folder for the textures (even though several people claimed to have trouble with it) and this one for the obj to GMF conversions... -
agree... the noise made it look horrible... looks much better now.
-
that was a hint to show a screenshot of it or maybe a vid...