Jump to content
Hash, Inc. Forums

robcat2075

Hash Fellow
  • Content Count

    25,713
  • Joined

  • Last visited

  • Days Won

    164

Everything posted by robcat2075

  1. Chapter 23 Multi-dimensional arrays You already know how to use nested loops to print a graphic in a square grid, like this... XXXXXX .....X .....X .....X .....X .....X This time, instead of directly printing out the graphic, use the nested loop to put the "pixels" into a 2-dimensional array. Then use another nested loop to print the graphic from the array . Then use another nested loop to print it upside-down: Upside-Down .....X .....X .....X .....X .....X XXXXXX Use another nested loop to print it reversed: Reversed: XXXXXX X..... X..... X..... X..... X..... Hint... loops indexes don't have to increment... they can decrement, too.
  2. If you made it to the point in Math (algebra?) in school where functions, in which one or more input values yield one output value, were discussed, Expressions will make a bit more sense. They are a way to collect parameter values from your A:M universe, maybe do some math on them, and use them to create a new value for a parameter. They are useful for connecting things for which a regular constraint does not exist. You could tie the intensity of a light to the rotation of a bone. You could change the color of a material in relation to the scaling of an object.
  3. @Tom @KingVidiot @johnl3d @Roger I'll note that the TechRef has an explanation of Expressions and definitions of all the available Expression "functions" at pg 171 If you don't have it already, the TechRef can be downloaded from the FTP... ftp://ftp.hash.com/pub/docs/
  4. @Tom I've split this discussion into its own topic so others may better catch it
  5. I maybe wrong about this. I recall reading something in the documentation about using an expression to link the Glow to the position of an object , so the Glow coudl get smaller as teh object moved away from the camera. But I'm not able to start an expression for either of the Glow parameters. Maybe I dreamed it?
  6. @Phil What does that do? I've read a few forum threads about it and I suspect that what it does is included in A:M now, but if you can tell me more about how you are using it I could know more.
  7. You could use an expression to link the Chor Glow properties to the slider of a model in the chor, but Chor Glow props apply to all objects so this would be a problem if you wanted to have several streetlights in your scene, not all turning on at the same time. As a work around I'll note that Glow is an additive process. The object's color gets added on top of itself. Black is 0.0.0 so a black object will show no Glow , no matter how high the Chor glow settings are. White is 255,255,255 so a white object will max out the Glow very quickly. If your object went from black to something brighter, the glow would appear to grow and... this happens to be a transition you CAN easily key-frame in a pose slider.
  8. That's the second biggest steam hammer I've seen today! That's still not going to fit in the tunnel , is it?
  9. Here are the use-of-expressions tuts I mentioned at LAT today. @Tom @KingVidiot @johnl3d @Roger
  10. I bet you could randomize the color?
  11. We'll be swimming in information at Live Answer Time on Saturday August 8, 2020 at 12 Noon CDT. If we have time we will add elbows, knees and heels to last week's discussion of the FK-IK arm. Long-time mermaid Esther Williams was born on August 8 in 1921
  12. Hi Roger, Here's how the decal pose slider can work... DecalPoseDemo004.zip clip4944DecalPose1200.mp4
  13. Chapter 22 Arrays Sample project for Arrays Declare an array of 8 elements Make a loop that will fill each array element with a random number of 0-100 Make a loop that will print out all the elements on one line. Use "\t" to tab-space them. Add-on challenges Make a loop that will print out the squares of each number on the next line Make a loop that will print the square root of each element on the next line. (may need to #include <math.h> for sqrt()) Make a loop that will print the largest perfect square that would fit in each number on the next line. For example, if the random number is 56 the largest perfect square in that is 49. If the random number is 63, 49 is still the largest perfect square. But if the random number is 65 then 64 is the largest perfect square. Make a loop that will print the the sum of each number + the number in the array element that precedes it. A typical run might look like this... Rands 4 19 99 62 25 9 49 17 Squared 16 361 9801 3844 625 81 2401 289 Sq rts 2 4.3589 9.94987 7.87401 5 3 7 4.12311 Lrg Sqr 4 16 81 49 25 9 49 16 Sum 4 23 118 161 87 34 58 66
  14. The Live Answer Time discussion covering this is now en-YouTubed! https://youtu.be/tJk8Z3HpNMU
  15. @Rodney Sample BREAK project Write a FOR loop that will print 10 random integers... but uses BREAK to exit the loop prematurely if one of the integers is a 5 Sample CONTINUE project Add a FOR loop like the above that prints 10 random integers... and also shows them multiplied by 10. Use CONTINUE to merely skip the multiply-by-10 step for numbers that are equal or greater than 5 instead of prematurely ending the loop. Sample run BREAK! 0 0 6 8 0 5 Loop Ended! CONTINUE! 6 3 times 10 is 30 2 times 10 is 20 3 times 10 is 30 9 6 2 times 10 is 20 1 times 10 is 10 5 3 times 10 is 30
  16. @Tom I've split this discussion into its own thread so it can still be found.
  17. If paths to models was a problem, my first gambit would be to make save a PRJ with everything embedded, for the purposes of rendering.
  18. I thought of a significant difference... Sprite "size" is always a uniform scaling of their sprite image. They never get fat or skinny. Streaks have a "thickness" but instead of a length they have a "duration". The length of a streak depends on how fast it is traveling. Faster streaks are longer and if they stop moving they disappear entirely. That would be the major quality that neither can imitate of the other.
  19. I was hoping for the mysterious stranger! Differences... Sprites have many more possibilities in the properties. Do streaks render faster? Or use less memory? You should try setting up a test to compare the two. You'd probably have to set the emission rates very high to see a difference, like 100,000.
  20. I wonder if there is a way to automate making the interlocking-piece kind of puzzle?
  21. I used to have a hallucination where I saw bugs out of the corner of my eye but it went away before I saw a Cast Shadow option.
  22. I am surprised to only notice now that streaks can't cast shadows! I presumed they had that option but they don't. If I had to have streaks cast shadows I would do it with compositing... Make a render with everything set to black except the streaks set to white, shot from the vantage point of the light. This will look like white particles on black. apply that render to the light to project it on the scene. Render from the regular camera view with all objects to white, turn off streaks, turn off all other lights. This will look like white lights crawling on otherwise unlit surfaces. This is your streak shadow buffer. Render the scene normally to OpenEXR format and composite the streak shadow buffer with the OpenEXR shadow buffer to combine the shadow information. This compositing could be done in an A:M Composite project or in something like After Effects. This is sort of how Z-buffered shadows work anyway However it is probably easier to fashion a small sprite that looks like a streak and use Sprites instead 😃
  23. I just looked... "Avatar 2" is still an export format in A:M I've never tried it!
  24. I recall long ago Hash had a VR character plan and there was a format (.ava ?) you could export to but I guess it never gained traction anywhere.
×
×
  • Create New...