Code center > Darwinbots3
About Darwinbots3
Numsgil:
There's nothing right now. I thought about it a couple times but I could never decide if it was a good idea to add. For DirectX you're not necessarily better off updating existing things over just pushing an entire new array, and usually you're more interested in updating a spatial section of the scene that the user can see than updating entities 2, 4, 7, and 9, say.
And you'd probably want to have the unique identifier you're using encode the hierarchy of scene->cel->collage->collage->collage->...->entity in some way. At the simplest we could encode it in a string so each scene, cel, collage and entity had a unique name and the final entity's pedigree name would be like "scene1.background.tree47.branch12.leaf6.triangle39" or something like that.
Maybe the hierarchy only goes down to the first collage. The collages are supposed to represent things that basically don't move relative to each other, so assuming anything downwards from the collage has the same relative transform it had the frame before is probably fair.
Peter:
Updating existing things seems necessary. I'm animating the slipstream testbed a few seconds and I'm up to a few MB. :wacko:
Normally it doesn't do any updates between cycles, does it?
Also, svg doesn't seem to want to take affine matrix into animations. Is there a method to calculate the angle/scaling I'm overlooking?
Numsgil:
--- Quote from: Peter on April 12, 2015, 11:06:50 AM ---Updating existing things seems necessary. I'm animating the slipstream testbed a few seconds and I'm up to a few MB. :wacko:
Normally it doesn't do any updates between cycles, does it?
--- End quote ---
It resends everything every time the viewport gets invalidated. I don't remember if there's a timer that forces it to draw at 60 FPS but certainly everytime you drag the display or zoom in/out it redraws.
--- Quote ---Also, svg doesn't seem to want to take affine matrix into animations. Is there a method to calculate the angle/scaling I'm overlooking?
--- End quote ---
Isn't there an <animatetransform> tag?
If you have to you can extract the scale, rotation, skew and translation from an affine transformation, you'll need to SVD decompose the first two columns like I was mentioning before. The translation is just the last column, though, so that part's easy :)
Peter:
--- Quote from: Numsgil on April 12, 2015, 04:56:26 PM ---
--- Quote from: Peter on April 12, 2015, 11:06:50 AM ---Updating existing things seems necessary. I'm animating the slipstream testbed a few seconds and I'm up to a few MB. :wacko:
Normally it doesn't do any updates between cycles, does it?
--- End quote ---
It resends everything every time the viewport gets invalidated. I don't remember if there's a timer that forces it to draw at 60 FPS but certainly everytime you drag the display or zoom in/out it redraws.
--- End quote ---
It would send the same basic drawings then? Just to be certain. There isn't something that calculates what's between 2 frames and draws that. It just draws the situation of a frame. If 60FPS is on, it may draw exactly the same multiple times.
I'm asking because SVG does intermediates itself. I don't think intermediate calculating happens currently, I just want to make sure.
--- Quote from: Numsgil on April 12, 2015, 04:56:26 PM ---
--- Quote from: Peter on April 12, 2015, 11:06:50 AM ---Also, svg doesn't seem to want to take affine matrix into animations. Is there a method to calculate the angle/scaling I'm overlooking?
--- End quote ---
Isn't there an <animatetransform> tag?
If you have to you can extract the scale, rotation, skew and translation from an affine transformation, you'll need to SVD decompose the first two columns like I was mentioning before. The translation is just the last column, though, so that part's easy :)
--- End quote ---
<animatetransform> doesn't want a affine matrix, but scale, rotation, translation and skew. :(
I'll take a good look at the .fx files you linked. I already had the translation, that was the one where I was quite confident I was going to implement it correct.
Numsgil:
--- Quote from: Peter on April 13, 2015, 04:42:09 AM ---
--- Quote from: Numsgil on April 12, 2015, 04:56:26 PM ---
--- Quote from: Peter on April 12, 2015, 11:06:50 AM ---Updating existing things seems necessary. I'm animating the slipstream testbed a few seconds and I'm up to a few MB. :wacko:
Normally it doesn't do any updates between cycles, does it?
--- End quote ---
It resends everything every time the viewport gets invalidated. I don't remember if there's a timer that forces it to draw at 60 FPS but certainly everytime you drag the display or zoom in/out it redraws.
--- End quote ---
It would send the same basic drawings then? Just to be certain. There isn't something that calculates what's between 2 frames and draws that. It just draws the situation of a frame. If 60FPS is on, it may draw exactly the same multiple times.
--- End quote ---
It sends the same thing, yeah. If it's humming along at 60 FPS it just sends through the current transform of everything 60 times a second, changed or not.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version