-
Posts
3,946 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by macklebee
-
Or just open in UU3D, perform a UV unwrap, select the faces of the object and assign them to a separate mesh group, and then save as FBX. I could be wrong, but I was always under the impression the whole idea behind the OBJ export was for the user to have a layout/size reference for their real models in a modelling app that would replace the CSG in the LE scene.
-
I was going to suggest to use GetLayerAtPoint() and then GetLayerTexture() - don't know if it would work, but that's what i would attempt. EDIT -- unfortunately, it appears that GetLayerAtPoint() does not work - which is a shame since GetLayerTexture() does.
-
http://www.leadwerks.com/werkspace/topic/15206-texture-load/#entry102487 and http://www.leadwerks.com/werkspace/topic/14624-lua-editor-quality-setting-whats-it-in-code/#entry99571
-
I know what a list is, and like I said - I am not against that as an option - and it may be a good solution for linux users as I am not sure tooltips work for them . But you said you had to increase the size of a thumbnail to be able to read the name. I am just pointing out that you could just get it from hovering the mouse over the file in question.
-
I have no issue with getting a display list as an option, but maybe I am missing something... if you just hover your mouse over the file, a tooltip shows the name. Are you not seeing the tooltips?
-
Questioning View distance options on models
macklebee replied to Marcousik's topic in General Discussion
Nope - if it does exist in LE4, it is not exposed to lua at the moment that I have found. Also, regarding your question about the difference between Max and Infinite: They both appear to take you to the far range of the camera's view range - so there does not appear to be any functional difference. Keep in mind the LE4 settings right now for view ranges are different from LE2: Near = 15m Medium = 30m Far = 100m Max = 1000m (or whatever the camera's Far view setting is if changed from default) Infinite = 1000m (or whatever the camera's Far view setting is if changed from default) example code: window = Window:Create("entity viewrange example",0,0,800,600,512) context = Context:Create(window) world = World:Create() camera = Camera:Create() plane = Sprite:Create() plane:SetPosition(0,0,15) plane:SetColor(1,1,1,1) plane:SetViewRange(Entity.NearViewRange) plane.viewrange = "Near = 15m" plane:SetSize(10,10) toggle = 0 while window:KeyDown(Key.Escape)==false do if window:Closed() then break end if window:KeyHit(Key.Space) then toggle = 1 - toggle if toggle==1 then camera:SetPosition(0,0,-1) else camera:SetPosition(0,0,0) end end if window:KeyHit(Key.D1) then plane:SetViewRange(Entity.NearViewRange) plane:SetPosition(0,0,15) plane.viewrange = "Near = 15m" end if window:KeyHit(Key.D2) then plane:SetViewRange(Entity.MediumViewRange) plane:SetPosition(0,0,30) plane.viewrange = "Medium = 30m" end if window:KeyHit(Key.D3) then plane:SetViewRange(Entity.FarViewRange) plane:SetPosition(0,0,100) plane.viewrange = "Far = 100m" end if window:KeyHit(Key.D4) then plane:SetViewRange(Entity.MaxViewRange) plane:SetPosition(0,0,1000) plane.viewrange = "Max = 1000m" end if window:KeyHit(Key.D5) then plane:SetViewRange(Entity.InfiniteViewRange) plane:SetPosition(0,0,1000) plane.viewrange = "Infinite = 1000m" end Time:Update() world:Update() world:Render() context:SetBlendMode(Blend.Alpha) context:DrawText("plane's View Range: "..plane.viewrange,2,2) context:DrawText("Camera Distance from plane: "..camera:GetDistance(plane),2,22) context:DrawText("Press 1, 2, 3, 4, or 5 to change view ranges",2,42) context:DrawText("Press SPACE to move plane IN/OUT of the view range",2,62) context:SetBlendMode(Blend.Solid) context:Sync(true) end -
Questioning View distance options on models
macklebee replied to Marcousik's topic in General Discussion
LE2 had the ability to change the entity view ranges to custom values using a global setting. LE4 may have this as well, but it doesn't appear to be exposed to lua. Agree that it would be nice if some of these settings could be user defined. LE2: SetWorldCullRange C++: void World::SetCullRange( flt nearrange=50, flt mediumrange=250, flt farrange=500 ) BlitzMax: SetWorldCullRange( nearrange:Float=50, mediumrange:Float=250, farrange:Float=500 ) Sets the current world's entity view ranges. -
Most of my model materials and textures are saved within that particular model's folder itself. I agree - I would prefer if the material's texture folder opened in the folder where the material has been created as that's typically where the textures are located. Also, same with the Model Editor when assigning a material, it would be useful to have that open at the same folder as the model, since i save my model's material and textures with it.
- 1 reply
-
- 1
-
Without posting what you have or you giving more detail about what you are trying to do or even explaining the error, it makes it difficult to help you.
-
Time function Time:Millisecs() not working as expected
macklebee replied to Defranco's topic in Programming
Its because the value that you keep subtracting from 'self.thirst' is constantly getting larger. self.thirst=self.thirst-self.location_rate_thirst*(self.thirst_time-Time:Millisecs()) Time:Millisecs() returns the system time in milliseconds. if you want a constant rate of decrease then do something like: function Script:UpdateWorld() if self.thirst > 0 then self.currenttime = Time:Millisecs() if self.currenttime>self.thirst_time+2000 then -- 2000 = 2 seconds self.thirst = self.thirst - 0.5 --- or however much you want to descrease but should be a constant if thats what you want self.thirst_time = self.currenttime end end ... end -
It made more sense to use centimeters in the Editor when creating CSG as it would be easier to texture with common texture sizes (256, 512, etc instead of 2.56, 5.12, etc). The engine position related commands use or return meters.
-
Funny enough i did a similar shader a couple of years ago and named it sincity due to that exact thing. Tried my hand at it after playing the game Betrayer which did a similar effect.
-
--Entity gets "has stopped working" error
macklebee replied to tipforeveryone's topic in Leadwerks Engine Bug Reports
Does 'box 5' have mass or a script attached to it? If not, then it has been collapsed with the rest of the scriptless, massless CSG in the scene - essentially making 'box 5' no longer a viable standalone entity. If you are wanting to use a massless, scriptless CSG entity for setting the position for something based on a key hit, then i would suggest obtaining the position of that entity in the Start function to be used later in UpdateWorld() - as it appears the Start functions are called prior to the CSG collapsing. Script.point = nil --Entity "Point" function Script:Start() self.pos = self.point:GetPosition(true) end function Script:UpdateWorld() if window:KeyHit(Key.A) then self.entity:SetVelocity(0,0,0) self.entity:SetPosition(self.pos,true) end end Or just use a pivot or attach an empty script to the CSG... -
yeah doesn't appear to be a way to grab it from the new PlayAnimation(), but the older method or using the old Animation Manager script, you should be able to grab that value since the user is the one setting the frame value. I am not - just giving ideas on how to get this value. Are you talking about multiple instances of models playing the same sequence that may be at different points in their animation? If so, you would grab that value just like you would for anything else for that specific instance. The question arose because they are wanting to save the animation value along with other states when saving a game. I assume this person is also tracking entities so he can save their position, rotation, health, animation sequence name, etc... so i am having trouble understanding why the current frame (or at least a very close approximation) could not be saved as well.
-
You are setting that frame value for SetAnimationFrame() - so save it as member for that entity to be gathered at a later time. Yes, Josh I understand that the actual frame being set could be an interpolation but for the most part a person could get away with grabbing the integer value of the current frame value and no one would be the wiser.
-
Other than the new PlayAnimation() command, are you not setting the frame value for the command SetAnimationFrame()? why could you not save that variable value?
-
EDIT - Weird, but Entity:GetAnimationFrame(#) is exposed to lua. I assume the reason its not documented is due to Josh's reason as the frame can be just an interpolated point between frames? EDIT2 - Sorry Genebris - yes it will cause a crash. I had that in my original post but erased it all after I saw Josh's post.
-
You probably need to reset the rotation and scale transforms before exporting. Similar posts have been made in the past concerning weird import results: http://www.leadwerks.com/werkspace/topic/5938-helicopter-blades-not-animating-correctly-yes-ive-googled-it/#entry51532
-
The LE exported OBJ can be textured in 3DCoat but when you convert the OBJ to B3D via Milkshape3D it will not texture properly? I guess I am confused by your description because I don't see how Josh would be responsible for the Milkshap3D B3D conversion? Seems like you need to talk to Milkshape3D developers. In any case, you should be able to create new UV mapping for any model using majority of modeling apps.
-
Actually it does give the whole map. You do not see the whole map in the minimap because I implemented in the minimap's shader the ability to zoom in/out and a masked circle. Also, if you look at the code i posted you will see that the minimap is only rendered once - so yes, it does render the entire map or I would not be able to see the edges at all.
-
(4.3) Child Entities Do Not Cast Shadows
macklebee replied to T0X1N's topic in Leadwerks Engine Bug Reports
Yes - this is new with the point and spot lights (not the child using the parent's shadowmode). I just hope this wasn't the big optimization that is being touted for 4.3, because if so... -
(4.3) Child Entities Do Not Cast Shadows
macklebee replied to T0X1N's topic in Leadwerks Engine Bug Reports
Yep - now that I can reproduce. My guess is that this is related to what reepblue is experiencing with his bug report as well - part of the optimization I would assume. http://www.leadwerks.com/werkspace/blog/41/entry-1879-leadwerks-game-engine-43-released/