Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Feature request
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 05-22-2011, 05:28 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Particle engine modifier "fix"?

This might be more of a question than a feature request, since the issue is kind of strange.

I've noticed this a long while back when fiddling around with particle emitters. The modifiers seemed strange to me because they didn't really do what I wanted. Sooner or later I had figured out that the modification of variables over a given time window is essentially bugged.

Let's say I got a particle and I want to make sure that the alpha of it goes from 1 to 0 in half a second. I'd do something along the lines of this:
PHP Code:
addLocalModifier("range"00.5"alpha""add", -1, -1); 
This will not work as intended, though. The particles will only fade halfway and stop around 0.5 alpha. This is because (I believe) the specified modification values (-1 and -1, to make sure it's always -1) seem to be on a per second base. That means it reduces the alpha by 1 per second. Since we only have a time window of half a second, it will only go as low as 0.5 alpha. This will do what we really want:
PHP Code:
addLocalModifier("range"00.5"alpha""add", -2, -2); 
Works perfectly fine. But I don't like it. It's a hackish thing to do and it just seems strange to me, overall. I know that "fixing" this issue would break tons of code, though. I don't know what could possibly be done. Different function call maybe?
__________________
Reply With Quote
  #2  
Old 05-22-2011, 05:37 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
I would do:

addLocalModifier("range", 0, 0.5, "alpha", "replace", 1, 0);
Reply With Quote
  #3  
Old 05-22-2011, 05:54 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Well, damn. I always knew I was stupid as ****. Thanks :/
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:10 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.