Forum Moderators: wheatpenny, TheBryster
Vue F.A.Q (Last Updated: 2024 Oct 26 8:50 am)
Thanks folks. I don't know about 'expert' dlk, maybe dedicated dabbler?
Some notes:
1)The +27 in the SetPosition line is specific to the size of the bollard I created, and would need to be adjusted for use with another object.
Message edited on: 03/29/2005 17:07
Mark
Thanks for the tip about the density filter. I keep forgeting about filters for some reason - too keen to play with the 'new' features I guess :) I'm not sure if this works from console (as your image suggests you were doing.) I was testing with an external .py file, and just reloading it after each edit. Another possibility is if the light is inside the solid part of the bollard. The bottom cylinder in my example was 25 units high, with 5 unit glass and 5 unit cap. So an offset of +27 in SetPosition puts the light near the middle of the glass. Also I set direction to surface at 0 (vertical) so I wouldn't have to take angles of rotation into account either.
Mark
Incredible work. Looks like I'm going to have to start messing around with python
I've created a py file too. When you launch one, you can see it in the console. It is because you see the console on the capture. Well, may be I should check the vob. I'll do it tomorrow (tired now. very late here). Thanks again.
PS about the capture about filter. The filter filter box is in front of the value of %. I put 1%. With 1% I had too many vob. So I edit the filter...
Attached Link: http://www.aelfheim.co.uk/Vue/Demos/Eco-lights.htm
I've now posted a quick flash tutorial and zip of bollard object and script at the above address.Mark
At the moment the script is set up as a callback at the start of each frame render.
Simply rearranging it to:
T = ObjectByName("T1")
Eco = GetEcosystemOnObject(T)
strong = 20
for i in range(0, Eco.GetInstanceCount()):
pos = Eco.GetInstancePosition(i)
l1 = AddPointLight()
l1.SetPosition(pos[0],pos[1],pos[2]+27)
l1.SetPower(strong)
means that it will run just once when loaded, creating the lights immediately. If you then modified the ecosystem you would have to remove the lights and rerun the script
Alternatively, for an animated ecosystem (candles bobbing in the waves?) a few lines of code could be added to erase the existing light set before recreating the new one.
def pyLightsCallback(k):
T = ObjectByName("T1")
Eco = GetEcosystemOnObject(T)
strong = 20
DeselectAll()
SelectByType(VuePython.VUEBasicObject.VOT_PointLight)
Delete()
for i in range(0, Eco.GetInstanceCount()):
pos = Eco.GetInstancePosition(i)
l1 = AddPointLight()
l1.SetPosition(pos[0],pos[1],pos[2]+27)
l1.SetPower(strong)
<br></br>T = ObjectByName("T1")
T.SetInitFrameCallback(pyLightsCallback)
--
Mark
Message edited on: 03/30/2005 18:38
Mark
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
Added terrain (named T1) and populated with LOW density of bollards (160 instances).
Simple python script (below) and WAIT.
--
Mark
Mark