Jump to content

Russell

Members
  • Posts

    187
  • Joined

  • Last visited

Posts posted by Russell

  1. 7 hours ago, Marcousik said:

    Give it a try, put a box with a material, give the material the right shader here uploaded, and put the script on the box.

    Look that the material has 3 diff+norm+spec textures, because the shader is based on this one.

    And you have to put the path of the used material for the box in the start of the script !!

    PS all crédits to shadmar.. All I did is a conversion or maybe just nothing. 

    I love you man!! And Shadmar too!!

    Many many many thanks!!

    I have spent all day testing and changing the original shader of the dissolve models, and I have not achieved anything.

    With your files this is the result:

    20201004061902_1.thumb.jpg.84f7f5a7abe0fcb10439d4e2d81ef019.jpg

    Works great for me!!

    Now i must modify the script fot play the Dissolve effect when the Box with the texture appears in the canvas we have paint in the level...

    I will tease you the result when i finish it.

    Thank you very much Marcousik!!

  2. ? Nothing!! I don't know how achieve this in my work using one of two given ideas...

    It will be cool use Shadmar shader of DISSOLVE effect, works great on all of my 3D models...

    But i need to use it only on simple boxes with a simple texture... I don't know how make this successful...

    The only idea i've got is model a simple box in 3DS and import it to Leadwerks, and use it with dissolve shader...

    It's the only thing I can think of. There has to be some way to do it with a single box.

  3. Ok... It's a very cool shader, Works ok with models (i've made success on a Crawler, a car and a TV) but i don't know how use or make it works on simple boxes with simple textures.

    For this reason i will try this second idea:

    2 hours ago, Marcousik said:

    If not, there is a possibility to create an alpha material and downgrade the alpha value to make the object disappear.

    I have made an alpha material with the texture...

    AlphaMat.thumb.jpg.6ba268725075053830850b965aea47d2.jpg

    Now I have to investigate how increase or decrease the alpha value using a script.

  4. Ohhhh!! Cool!!!

    Following your steps in that Thread Marcousik and the original by Shadmar, i have made it with the crawler model...

    20201003125809_1.thumb.jpg.38172a40838db6e2142d08700f786a98.jpg

    But now i need do this to a SIMPLE BOX with a specific texture... (The box with the texture that dissapear in the teaser)

    I will try it now and tell you the results, since now I cannot use the UPDATEPHYSICS function in my case with the box.

  5. 1 hour ago, Marcousik said:

    Hi Russel,

    There is a super cool shader for this:

    Maybe it is not for your purpose, so just check it..

    If not, there is a possibility to create an alpha material and downgrade the alpha value to make the object disappear.

    Don't forget to remove the shape ;) when disappeared.

     

    Many thanks Marcousik!! I will try it and tell you the results.

  6. Hello there team!!
    I am developing a small secret area in my game, and it would be very useful to know if it is possible to make an object disappear using a FADE OUT effect.

    Right now, as you can see in the this teaser, my object (a canvas that we have painted) suddenly disappears using a horrible LENS FLARE effect i've putted there.

    I don't like it, but If I can make it disappear slowly with a FADE OUT effect without using the LENS FLARE, so much the better.

    I've been checking the following thread:

     

    But I don't know how use it with an object.

    Any idea, tip or suggestion that I can start from???

    Thank you very much!!

    • Like 1
  7. 6 hours ago, Josh said:

    I think your example clearly shows that this functionality will be needed in the future!

    Well, as long as we can scroll the flowgraph with the mouse wheel right as now, everything is fine for me.

    If I haven't said it yet, I'm in love with Leadwerks, with its script editor and its flowgraph!! ?

     

  8. Just now, Josh said:

    I am glad you are making good use of the system. I have not tried your game yet but I will look and see to get an idea of how you are using it. In the new editor I plan to support zooming and other additional features.

    I love leadwerks. In the next weeks i will update FotoMuseo 3D on Steam for add all the new stuff. It will be a very BIG UPDATE of content and improvements.

    I'm sure that I will love the new editor, because the one we have right now (I have the pro version and all the stuff in my steam account) has me in love. And I think that I'm squeezing it all I can.

    Many thanks Josh!!

    • Like 3
  9. Just now, Josh said:

    Wow! What kind of behavior does that perform?

    This is only for the FIRST Level of FotoMuseo. The Tutorial Level whit many elements to interact:

    • Activate the Stargate... AHEM!! The Earthgate. Seven simbols, animations and the VORTEX when it becomes active. Lot of brushes, timers, lens flares and particle emitters for make the effect of the portal kawoshh.
    • Animation for the HUD when we take the ZOOM Glasses and activate them.
    • Automatic doors and lights when we are near...
    • Lot of sounds and hud brushes for make DIALOGS with my voice explaining something of that object we take...
    • But mainly, lot of timers controlling the appearing of models, brushes and sound effects.

    Other maps doesn't need don't need so many elements like this first one. ?

    But time to time ... With the amount of secrets, funny references and things to explore that I want to add in the levels of FOTOMUSEO, in the end my flowgraphs are going to be huge.

  10. Ok, good news!!

    After several tests, Headaches, and discarded ideas, I have finally recovered the idea and development of the 2 camera entities in my prologue-animation map. ¿Why?

    Because at some point of the developtment of the new content for my FotoMuseo 3D, I will need to create an animation with 4 and 6 cameras. All of them with different context effects, screen colours and movements. And the idea of using only one camera entity placing it in 2 to 6 different locations is a bit crazy idea for my development. Yes or yes i need more than one camera.

    My problem when I opened this thread was that the TEXT and IMAGES WERE NOT SHOWN on camera2 but YES on camera1.

    As I said, after several testsI have already found the source of my problem.

    I use global variables for the new DIALOG / SUBTITLE SYSTEM that I am working on in FotoMuseo 3D. And when the dialog/subtitutle1 is disabled via code (not using a button as usual when we are playing the map), it did not empty the variable again. With which the rest of the contents that should be shown in camera2 are not seen in whole rest of animation.

    Finally, my headache it was something as simple like a badly coded variable in the animation because in the animation we don't use Buttons of the Dialog system.

    I have fixed it and now the animation works ok with 2 camera entities like in the beginning and the dialog/subtitle system is improved with non interactive moments of the gameplay.

    Thanks Slastraf for your idea, although it has not helped in my specific development, at least it has shown me the way to find the problem that was driving me crazy.

    And now I can also change the camera locations via code, something I didn't know how to do either.

    • Like 1
  11. 10 minutes ago, Slastraf said:

    Check your parameters because you are not using them except entity and i dont know if it collides with sometihg so maybe rename that.  Check if target is set and if the function is called.

    Thanks very much, I made it!! Animation made with only one camera. And now Text and Images using POSTRENDER shows all stuff ok!!

    Finally i my in my specific i don't need use the Pivot in the location of the camera2 (deleted right now).

    In my case for the prologue animation I only need setup Position and Rotation for the one camera with:

    function Script:Location2()--in
    		self.entity:SetPosition(0.953,2.579,3.319)
    		self.entity:SetRotation(0,34,0)
    		self.component:CallOutputs("Location2")
    end

    I know, is very specific and not very usefull for another situations. But at this moment I only need this.

    I only needed one more thing, and that was attach the camera to the moving platform of the camera2 to get the effect I need for the animation of the prologue.

    Thank you so much for the pivot idea Slastraf. Even if I have not used it in this animation prologue, it will be valid for other places.

  12. 11 hours ago, Slastraf said:

    Place a pivot in the exact rotation and location of your second camera and then write a small script that puts your current camera wherever the cutscene pos is. You need to think of having only one camera at all times. Store information about text/images/post process in script and disable/enable whenever you need it.

    I'm trying change position of the CAMERA to the location where the PIVOT is with this script:

    Script.Target = nil --entity
    Script.Enabled = true --bool
    
    function Script:Teletate(entity, position, normal)--in
    	if self.enabled then
    		entity:SetPosition(self.Target:GetPosition()) -- Teleports
    		self.component:CallOutputs("Teletate")
    	end
    end

    But i don't know why the camera don't change the position, Do you see anything there I am encoding wrong?

  13. 41 minutes ago, Slastraf said:

    Hey, just wanted to say that game looks really cool. Did you post more about it in showcase ? 

    No, I have not published anything in Showcase about FotoMuseo 3D. But thanks for letting me know.
    As soon as I post the new in-game content on Steam, I'll share it there.

    At the moment, i'm still working on the the new content. This will be:

    • Spanish/English - Dialog/subtitle System.
    • More secret areas.
    • One new EXPO to visit it.

    Thanks for your words Slastraf!!

    • Like 2
  14. 16 minutes ago, Slastraf said:

    Place a pivot in the exact rotation and location of your second camera and then write a small script that puts your current camera wherever the cutscene pos is. You need to think of having only one camera at all times. Store information about text/images/post process in script and disable/enable whenever you need it.

    Thank you very much for your answer!!

    I'm going to try it, even though camera1 is fixed, and camera2 is anchored on a moving platform.

  15. Hi there team!!

    I have one question i hope you can help me with...

    I have a level with only 2 cameras for show an animation prologue... Text and Images using POSTRENDER and context system works ok in CAMERA 1.

    But when i disable CAMERA1 and enable CAMERA2 for continue animation in another location of the map, TEXT and IMAGES don't appear on CAMERA 2...

    Anyone have any tip or idea why is this happening??? If you need more information ask me... I don't know how solve this...

    Thank you very much!!

  16. Here... This is my discarded code using LABEL for large subtitles with WRAP option:

    Script.FuenteHud = nil
    
    local gui = GUI:Create(context)
    local base = gui:GetBase()
    base:SetScript("Scripts/GUI/Label.lua")
    
    Script.TextoSubtitulo=""--string "Texto: "
    
    function Script:Start()
    	self.enabled=false
    	self.entity:Hide()
    	
    	self.FuenteHud = Font:Load("Fonts/monotypecursiva.ttf",14)
    
    	x=context:GetWidth()-context:GetWidth()/2
    	y=context:GetHeight()-context:GetHeight()/8
    	widget = Widget:Label("",x,y,800,200,base)
    end
    
    function Script:ModificaTexto()--in
    	widget = Widget:Label(""..self.TextoSubtitulo,x,y,800,200,base)
    	widget:SetStyle(LABEL_BORDER + LABEL_CENTER + LABEL_MIDDLE + LABEL_WRAP)
    end
    
    function Script:LimpiaTexto()--in
    	widget:Hidden()
    	context:Clear()

     

    And this is the result using this code:

    20200922125927_1.thumb.jpg.0a117176c27166ec419b8e20f1177326.jpg

    Is not a bad start, but i don't like the result, or how improve this...

    At this moment, my best option is to continue using images to design the texts (5-10 kbs per image):

    20200921021007_1.thumb.jpg.139747536bcc10d8be6daa89d76386ad.jpg

    I know is not the best solution, but until I control by code how to place the subtitles in the designated place regardless of the resolution chosen, I will continue using this system.

    Thanks for your answers team!!

  17. 4 minutes ago, Marcousik said:

    Ok look at the function description, I think you forgot something very easy:

    https://www.leadwerks.com/learn?page=API-Reference_Object_Context_DrawText

    • DrawText(string text, number x, number y, number kerning=1.0)

    > The x,y are what you are seeking I suppose, coordinates place  on the screen.

    Thanks for your answer.

    But this ist not a working solution for me, since depending on the resolution of the game on the user's computer, those coordinates change, and text could go out of frame.

    Also I need to use the WRAP option to wrap the text in several lines for long texts, with Drawtext I don't know how to control that. Based on what i know i think only LABEL has that property. But i have the same problem. If i adjust X and Y on in FULL HD using context.GetHeight() or context.GetWidth(), if I change the resolution to HD or less, the text doesn't appear in place. Appears out of frame.

    Even if I don't use any frames and i leave the text free on the screen, i don't know how center down in the screen in all resolutions.

    This drive me crazy. ? XD

  18. 2 hours ago, Thirsty Panther said:

    You could split your Talk animation in two.

    Talk 1 animation 0-950

    Talk 2 animation 450-950

    Then just call the animation you want.

    Thirsty Panther nice to read you too!!

    I love you man!! This save my day!!

    I didn't know that I could extract fragments of the animations openen in the *.mdl models from ASSETS tab!!

    Now i have "Talk2Ticket" animation for my model, and the full "Talk" animation for other actions ingame.

    Works great!! Thank you very much!!

    For other people if they reach this thread with the same question:

    extract.jpg.cbc779b7f679e59f0b0f6b1ec8f059cc.jpg

    • Like 1
  19. 56 minutes ago, Marcousik said:

    idk if you can use frames for this, i'm not sure. But you could try using a timer by testing (for example:)

    if Time:GetCurrent() - self.FirstAnimStarted > 2000 then -- <start second animation>

    Thanks Marcousik!!

    I like the idea, but I'm not sure if it works for me in my specific case.

    The animation is changed by pressing a button. From the IDLE animation (animation1) it goes to the TALK animation (animation2) and it starts at frame 0.
    It would be very useful for me to get the TALK animation to start at frame 450 the same moment I push the button.

    Anyway i will try this idea. Thanks!!

  20. 58 minutes ago, Marcousik said:

    Hello Russel

    This is pretty simple: Leave a transparent place in your texture where the text should be written. Draw the texture in blend mode.

    Then write the text with Context:DrawText() after declaring a Font:Load() varaible. So you can write and change your text as you want.

    Hello Marcousik!! Nice to read you again!!

    Despite being simple, I can't create a script to write text in the frame that I have designed for our character's dialogues. (Dialogs of several lines that fit the designed box)

    Ejemplo.thumb.jpg.c14fa3999411a19b9f4cbffaf1e1a32e.jpg

    As you can see in the screenshot, I have already used DrawText () for the texts that are at the bottom left:
    "Outside of the FotoMuseo"
    "FotoMuseo 3D - Exterior FotoMuseo"

    But if I want to write text inside that Frame box, I don't know how can align it, nor how I use the WRAP parameter and make it look good and fixed to the inside of the frame.

    At this moment, and until I learn how to program a Script that fits the text in this FRAME, I am using transparent images with text (for each dialog).

    So I can leave it like this:

    Llave.thumb.jpg.be4627c61820756288083195aa27f97b.jpg

     

    Or even display images in the text box like this too:

    Dragon.thumb.jpg.c61d2e021115174957229b5b170dd2e9.jpg

     

    But no idea how write any TEXT in the Frame using CODE (which is what I want to do) and make it look good and fixed to the inside of the frame.

    Thanks a lot!!

  21. Hello there again team!!

    I have an animated 3D model with 2 animations:

    • IDLE or STAND (frames: 0 to 400)
    • TALKING (frame 0 to 950)

    And with a version of SimpleAnimation.lua like this:

    Script.Speed=4.0--float
    Script.Sequence="0"--string
    Script.Anim2Speed=4.0--float
    Script.Anim2Sequence="0"--string
    
    function Script:Start()--in
    	self.entity:PlayAnimation(self.Sequence,self.Speed/100.0,1)
    end
    
    function Script:CambiaAnim()--in
    	self.entity:PlayAnimation(self.Anim2Sequence,self.Anim2Speed/100.0,1)
    end

    With this script I can change the animation ok.

    But I need change animation from IDLE to TALKING and TALKING animation start from frame 450.

    Can I change the animation of my model starting always from frame 450? Is possible?

    Thank you very much!!

×
×
  • Create New...