[sldev] Hacking the wind
Vector Hastings
vector at leafpile.com
Sun Jul 26 01:41:18 PDT 2009
thank you sooo much Sheet. This is very helpful.
I probably need to noodle on which way to go with the value, a constant will
be easy but crude, and might help my current circumstance.
Ultimately I'd like to cue the wind to blow an actress' hair at just the
right moment. So I have to think out how to communicate the right moment to
the viewer.
Thanks again,
Vector
-----Original Message-----
From: Sheet Spotter [mailto:sheet.spotter at gmail.com]
Sent: Saturday, July 25, 2009 3:18 PM
To: 'Vector Hastings'
Subject: RE: [sldev] Hacking the wind
All of the comments below are based on the source code from Linden Lab's
Snowglobe viewer. The Snowglobe viewer is very similar to their main viewer,
so all of the same comments should apply to the main viewer.
Wind effects on flex-prims are likely added in this line...
mSection[i].mPosition += gAgent.getRegion()->mWind.getVelocity(
mSection[i].mPosition ) * wind_factor;
...in the LLVolumeImplFelxible::doFlexibleUpdate method within the
"indra/newview/llfexibleobject.cpp" file.
If you want the wind to have a constant velocity and direction you could try
replacing the "gAgent.getRegion()->mWind.GetVelocity(mSection[i].mPosition)"
portion with a constant.
The only place I could find that modified the wind value for the region was
this line...
datap->mRegionp->mWind.decompress(bit_pack, &goph);
...in the LLVLManager::unpackData method within the
"indra/newview/llvlmanager.cpp" file. Modifying this line would ensure the
same wind effect applied to every type of object (flexi, sky, trees, etc.).
If you wanted to get really fancy, you might even be able to do cool tricks,
like simulate a tornado. LOL
I hope this helps. Enjoy!
Sheet Spotter
-----Original Message-----
From: Vector Hastings [mailto:vector at leafpile.com]
Sent: July 25, 2009 4:07 PM
To: Sheet Spotter
Subject: RE: [sldev] Hacking the wind
Great, Thanks.
Knowing what to look for is half my battle.
I'm trying to control the direction flexi-prims are waving (hair and flags
for filming machinima).
Thanks again,
Vector
-----Original Message-----
From: Sheet Spotter [mailto:sheet.spotter at gmail.com]
Sent: Saturday, July 25, 2009 12:09 PM
To: 'Vector Hastings'
Subject: RE: [sldev] Hacking the wind
A global search through the code for "gWindVec" identified a few interesting
areas of the code. A search for "mWind" found other interesting areas.
It depends really on what you are trying to achieve.
Sheet Spotter
-----Original Message-----
From: sldev-bounces at lists.secondlife.com
[mailto:sldev-bounces at lists.secondlife.com] On Behalf Of Vector Hastings
Sent: July 25, 2009 5:23 AM
To: Second Life Developer Mailing List
Subject: [sldev] Hacking the wind
Does anyone know where wind direction and speed could be hacked in the
viewer?
Thanks to any and all,
Vector
_______________________________________________
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/SLDev
Please read the policies before posting to keep unmoderated posting
privileges
More information about the SLDev
mailing list