Daspex Posted February 17, 2022 Author Share Posted February 17, 2022 The Ships room takes its shape slowly,still need to add more space vessels and some animations to release a beta version at the end of the month. Link to comment
Daspex Posted April 12, 2022 Author Share Posted April 12, 2022 (edited) Edited April 12, 2022 by Daspex Link to comment
Daspex Posted April 12, 2022 Author Share Posted April 12, 2022 (edited) https://mega.nz/file/wsphCbKS#3LLD9FcdB2YKs5EprUKf9dU5Qf0VGItJKozHgUTOZDk Beta version will be released asap. Edited April 12, 2022 by Daspex Link to comment
Daspex Posted January 5, 2023 Author Share Posted January 5, 2023 (edited) Coming soon.. This is one of my wip rooms I want to show to you.It is a room with scifi vessels and serveral animations and a lot of room Options. For example you can switch between landed on a planet or being in space. The skydome is switchable between night and day,also the planets can be switched on and off.The skymaps and ground are colorizeable via room options as well. Of course it will have TV Screen support too. Edited January 5, 2023 by Daspex 3 Link to comment
Daspex Posted January 10, 2023 Author Share Posted January 10, 2023 Terminal building test... 1 Link to comment
Daspex Posted February 28, 2023 Author Share Posted February 28, 2023 Animated Wallclock On a request Im trying to create a Wallclock with animated hands/pointers.This is not a big deal but the speed of the hands is.(At least without bs code documentation.) The common workflow of animating and F-Curve modifier is not working with the ctk utils or I dont see how to do it. So I just did the hands animations by approximation of start and end positions of them.Also math doesnt help cause the unsynced rotation starts very fast the first time the toy is loaded and continues very slow to faster.But I think its good enough to be used in our game as an animated wallclock. Wallclock2.mp4 Next is to add the clock sound... Link to comment
Curtis_S Posted March 1, 2023 Share Posted March 1, 2023 (edited) "Synced" to what? If you're doing this in TRS, then you should be rotating your second hand plane in 6 degree increments every 1000ms, adding the other two consecutively every 60th turn. Is there no way to count seconds in this game? EDIT: Sure there is, here's a snippet... ScSection . { .Label "TEMPLE-INIT"; .Do [ ScTopic :ACT0001 . { }; ScWait . { .Seconds 5f; }; ScTopic :ACT0002 . { }; ScWait . { .Seconds 5f; }; ScTopic :ACT0003 . { }; ScWait . { .Seconds 5f; }; ScTopic :ACT0004 . { }; ScWait . { .Seconds 5f; }; ScJump . { .Jump "TEMPLE-EXIT"; }; ]; }; Edited March 1, 2023 by Curtis_S Link to comment
Curtis_S Posted March 1, 2023 Share Posted March 1, 2023 I think Marburg and I already had the discussion of whether or not you could run a timer loop in this script without everything grinding to a halt, and I believe the answer was no. OTOH, I've never actually tried it. 1 Link to comment
Daspex Posted March 1, 2023 Author Share Posted March 1, 2023 (edited) As i already said the common method with 6 ° etc. dont work.With sync I mean to apply an F-Curve modifier To “sync“ the hands rotating in blender,this way one animation can be used for all three hands. Seems to be I have to use three different animations,which can be timed separately but have to figure out if appimport works inside of tool scripts cause the hands have to be imported via appimport to work as one toy together. I could also put all anims in one file but I like to have serveral parts cause its easier to edit/update. Ill try 3 single animations and see how it works. Or I just add a sound and release it like it is,it is not to be a realtime clock but the hands are moving around and that should be enough to give an illusion to a scene. Edited March 2, 2023 by Daspex Link to comment
Curtis_S Posted March 2, 2023 Share Posted March 2, 2023 18 hours ago, Daspex said: As i already said the common method with 6 ° etc. dont work.With sync I mean to apply an F-Curve modifier To “sync“ the hands rotating in blender,this way one animation can be used for all three hands. Seems to be I have to use three different animations,which can be timed separately but have to figure out if appimport works inside of tool scripts cause the hands have to be imported via appimport to work as one toy together. I could also put all anims in one file but I like to have serveral parts cause its easier to edit/update. Ill try 3 single animations and see how it works. Or I just add a sound and release it like it is,it is not to be a realtime clock but the hands are moving around and that should be enough to give an illusion to a scene. Why can't you just stick the whole thing inside of tool_group? Link to comment
Daspex Posted March 2, 2023 Author Share Posted March 2, 2023 You mean wo animated hands? Link to comment
Curtis_S Posted March 2, 2023 Share Posted March 2, 2023 No, I mean the whole thing (however many objects). The only way it's going to stay together is if they all have the same parent (that's the whole idea of groups). I don't know how you would do them separately. Link to comment
Curtis_S Posted March 2, 2023 Share Posted March 2, 2023 Example... clockworx.mp4 Two problems with this method: 1) 3dsmax performs all of its rotations in quaternions, but exports everything in euler; meaning that to get it working in the klub I'd have to divide the animation into 90deg blocks to avoid gimbal lock. 2) The animation is 43200 keyframes long (number of seconds in a 12 hour period). Link to comment
Curtis_S Posted March 2, 2023 Share Posted March 2, 2023 (edited) On the plus side, it only takes like five minutes to make (took me longer to make the image for the hands). Edited March 2, 2023 by Curtis_S Link to comment
Curtis_S Posted March 2, 2023 Share Posted March 2, 2023 (edited) It needs to be setup to where you're just adding 6 degrees to each, at intervals of 1, 60, and 360 respectively. That's only like 4 lines of code. The problem getting it into the klub is you have your objects in one file and your scripts in another.. How in the hell are you supposed to pass variables back and forth? Smarter people than me probably do this in their sleep! Edited March 2, 2023 by Curtis_S Link to comment
Daspex Posted March 2, 2023 Author Share Posted March 2, 2023 (edited) 1 hour ago, Curtis_S said: No, I mean the whole thing (however many objects). The only way it's going to stay together is if they all have the same parent (that's the whole idea of groups). I don't know how you would do them separately. With AppImport function like in rooms but didnt found the right syntax yet,if its possible at all in toy scripts.I you put animations in every single part/bs file,they run forever in its ammount of frames,this way every animation has its single loop and constant animation speed,which is not the case if all animations run together in one animation.Thats the reason why.I dont know anorher way to do so.The appimport works like a group somehow but seems to work in its own environment and so the animations run at one time but in its own loop independently of each other. Edited March 2, 2023 by Daspex Link to comment
Daspex Posted March 2, 2023 Author Share Posted March 2, 2023 (edited) 1 hour ago, Curtis_S said: Example... clockworx.mp4 2.68 MB · 0 downloads Two problems with this method: 1) 3dsmax performs all of its rotations in quaternions, but exports everything in euler; meaning that to get it working in the klub I'd have to divide the animation into 90deg blocks to avoid gimbal lock. 2) The animation is 43200 keyframes long (number of seconds in a 12 hour period). This is exactly the reason for appimport,think of my scifi room,without appimport groups of gliders all gliders would run a while than stop cause of its different framecount and only start by zero if the longest frame has been ended and start again.The keyframes for the hour hand would be over one million.lol This is the blender way but the result is oc not readable for ctk... https://blenderartists.org/t/seconds-hand-animation-of-60-seconds/577795 Edited March 2, 2023 by Daspex Link to comment
Daspex Posted March 2, 2023 Author Share Posted March 2, 2023 16 minutes ago, Curtis_S said: It needs to be setup to where you're just adding 6 degrees to each, at intervals of 0, 60, and 360 respectively. That's only like 4 lines of code. The problem getting it into the klub is you have your objects in one file and your scripts in another.. How in the hell are you supposed to pass variables back and forth? Smarter people than me probably do this in their sleep! Yeah,maybe lua script but i also have no clue... Link to comment
Curtis_S Posted March 2, 2023 Share Posted March 2, 2023 (edited) If you could poll the system clock it'd be a piece of cake. You just poll the clock once a second, then plug those values (Hx30, Mx6, Sx6) into your rotation vectors. I know it's doable, there are different length loops running all over the place (water, palm trees, tentacles...). Edited March 2, 2023 by Curtis_S Link to comment
Daspex Posted March 3, 2023 Author Share Posted March 3, 2023 (edited) 2 hours ago, Curtis_S said: If you could poll the system clock it'd be a piece of cake. You just poll the clock once a second, then plug those values (Hx30, Mx6, Sx6) into your rotation vectors. I know it's doable, there are different length loops running all over the place (water, palm trees, tentacles...). Yeah,It looks like Marburg called rotations defined in anim01.bs.They are containers to which the mesh will be linked to,thats how I understand that.But if I look deeper inside of anim01.bs it looks horrible to me. Edited March 3, 2023 by Daspex Link to comment
Curtis_S Posted March 3, 2023 Share Posted March 3, 2023 14 hours ago, Daspex said: Yeah,It looks like Marburg called rotations defined in anim01.bs.They are containers to which the mesh will be linked to,thats how I understand that.But if I look deeper inside of anim01.bs it looks horrible to me. anim01 is just a library. You don't _need_ to call from it, you can write it directly into the script, or call from a separate file. It just wants for a bit of code reference that probably doesn't exist anywhere outside of 3X HQ. Link to comment
Curtis_S Posted March 3, 2023 Share Posted March 3, 2023 (edited) That said, here's a realtime clock in javascript, if someone knows how to translate it to BS... You just need to substitute VAR NODE for your three rotation vectors (H, M, S): <script type="application/x-javascript"><![CDATA[ var Clock = new function() { window.addEventListener("load", setClock); function setClock() { var sec; var min; var hr; var deg; var node; var dt = new Date(); var deg=0; min = dt.getMinutes(); sec = dt.getSeconds(); ms = dt.getMilliseconds(); deg = (360/60)*(sec+ms/1000); node = document.getElementById("seconds"); deg %= 360; node.setAttribute("transform","rotate("+deg+",0,0)"); deg = (360/3600)*(60*min+sec); node = document.getElementById("minutes"); deg %= 360; node.setAttribute("transform","rotate("+deg+",0,0)"); hr = dt.getHours(); deg = 30*hr + 30/60*min; var node = document.getElementById("hours"); deg-=150; deg %= 360; node.setAttribute("transform","rotate("+deg+",0,0)"); document.getElementById("asec").beginElement(); document.getElementById("amin").beginElement(); document.getElementById("ahr").beginElement(); var timeout = ((60-dt.getSeconds())%60)*1000; timeout-=dt.getMilliseconds/1000; setTimeout(setClock,timeout); } }(); ]]> </script> animationclock.svg Edited March 3, 2023 by Curtis_S Link to comment
Daspex Posted March 3, 2023 Author Share Posted March 3, 2023 2 hours ago, Curtis_S said: anim01 is just a library. You don't _need_ to call from it, you can write it directly into the script, or call from a separate file. It just wants for a bit of code reference that probably doesn't exist anywhere outside of 3X HQ. Anyway he calls rotations from ingame,but its the same problem,the toy script needs a different syntax it dosnt accept the syntax from AvRoom.bs,like the animation loops I also called them from ingame but the syntax is different to AvRoom.bs.If I figure out the syntax for time scale all will run fine... Link to comment
Daspex Posted March 3, 2023 Author Share Posted March 3, 2023 2 hours ago, Curtis_S said: That said, here's a realtime clock in javascript, if someone knows how to translate it to BS... You just need to substitute VAR NODE for your three rotation vectors (H, M, S): <script type="application/x-javascript"><![CDATA[ var Clock = new function() { window.addEventListener("load", setClock); function setClock() { var sec; var min; var hr; var deg; var node; var dt = new Date(); var deg=0; min = dt.getMinutes(); sec = dt.getSeconds(); ms = dt.getMilliseconds(); deg = (360/60)*(sec+ms/1000); node = document.getElementById("seconds"); deg %= 360; node.setAttribute("transform","rotate("+deg+",0,0)"); deg = (360/3600)*(60*min+sec); node = document.getElementById("minutes"); deg %= 360; node.setAttribute("transform","rotate("+deg+",0,0)"); hr = dt.getHours(); deg = 30*hr + 30/60*min; var node = document.getElementById("hours"); deg-=150; deg %= 360; node.setAttribute("transform","rotate("+deg+",0,0)"); document.getElementById("asec").beginElement(); document.getElementById("amin").beginElement(); document.getElementById("ahr").beginElement(); var timeout = ((60-dt.getSeconds())%60)*1000; timeout-=dt.getMilliseconds/1000; setTimeout(setClock,timeout); } }(); ]]> </script> animationclock.svg 43.27 kB · 2 downloads Thanks,but I just need someone to translate the AvRoom bs-code syntax of time scaling to theTcToolsVx syntax... Link to comment
vascosnts Posted March 3, 2023 Share Posted March 3, 2023 5 hours ago, Daspex said: Thanks,but I just need someone to translate the AvRoom bs-code syntax of time scaling to theTcToolsVx syntax... Wath about to try making the pointers of the clock to work with extra toy sliders? Link to comment
Recommended Posts