Author Topic: True 3D?  (Read 6153 times)

Offline MrRocketman

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: True 3D?
« Reply #15 on: February 22, 2017, 06:00:32 PM »
Awesome thanks for the video link. Exactly what I was hoping for. Working on building the source now.


Sent from my iPhone using Tapatalk

Offline sean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1727
    • View Profile
    • Xlights and Nutcracker Forum
Re: True 3D?
« Reply #16 on: February 22, 2017, 10:43:28 PM »
What exactly do you mean by

I did take the time to create one 3D effect - near the end of the video.

Did you write new code? Or just use the existing effects on the 2D matrices?

Also, is there a general process for adding new effects to XLights? Or do I just start digging? I definitely won't have time to do full 3D, but I want to at least try to add some effects that work on a 3d matrix.



Sent from my iPhone using Tapatalk

Steps are like this
1) Pull down latest copy of xlights from github
2) Follow README.windows, README.linux, README.osx depending on what platform you will develop on.
3) Follow steps and pull down wxwidgets and codeblocks. Build libraries, modify paths
4) open xlights.cpb in xlights sub folder. this should launch codeblocks with the windows project file.
5) Select "Mingw Release" from middle pull down.
6) Press F9 and wait 10-15 minutes.

You should see xlights launch. This will take many hours to get all of this stuff configured. please note any discrepancies in our documentation. it was last updated maybe 1-2 years ago. we will correct anything that is no longer true.

congrats you now can build it

To add an effect look for some of the simple effects like ON, OFF, butterfly

look at the file structure we use. when building new effects you also have to build an icon for them. i use iconfx.

develop in your own branch.

General rule is to not break any existing effects or functionality. adding new effects is pretty isolated so is a good start. Look at effects that have state like snowstorm. These effects have to know what was happening in the rpevious frame.

Always remember your code needs to compile under windows, linux and mac. No os specific stuff, or if it cant be helped sandwich code with ifdef. the developers (Gil, Keith, Dan) frown on too many of those.

Sean
Littleton, CO
Latest releases http://nutcracker123.com/nutcracker/releases
xLights/Nutcracker Forum http://nutcracker123.com/forum/index.php
Fbook [url=https://www.facebook.com/groups/62

Offline plaberge

  • Full Member
  • ***
  • Posts: 118
    • View Profile
    • Laberge Christmas Lights
Re: True 3D?
« Reply #17 on: February 23, 2017, 12:24:57 AM »
What exactly do you mean by

I did take the time to create one 3D effect - near the end of the video.

Did you write new code? Or just use the existing effects on the 2D matrices?


I considered writing something but ran out of time, so in the end I Flinstoned it. To test my concept, I treated each of the 9 planes as a 9x9 matrix and manually adjusted the position & timing of the effects on each plane to give me the desired result.

The way I thought of implementing it was to create a function that applied a transform (user-specified shift, rotate, shrink, etc.) to an existing effect from one layer to the next. Instead of creating a 3D model, I was going to create a 3x3 matrix of the 9x9 planes and apply the effect on the first 9x9 submatrix, transform it apply it to the second and so on. The effect would then look 3D on the isometric projection I created in the layout. I didn't think it all the way through but I thought that way all current effects would work as they do on any matrix. I also considered using something like the current fade in/out to control timing of effects across each plane. I know there are better ways of doing this but this seemed fairly simple to write by comparison and should work on any rectangular 3D object.

Since I looked at this, there have been several enhancements to Xlights that appear implement all the base transforms, so it may be a lot simpler to implement today than a couple of years ago.
Paul.
Halfmoon Bay, BC

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: True 3D?
« Reply #18 on: February 23, 2017, 09:46:49 AM »
I really think we need entire 3D layout support before its practical to have 3D effects.  It would take a huge amount of rewriting.

Offline keithsw1111

  • Administrator
  • Hero Member
  • *****
  • Posts: 2733
    • View Profile
    • Kellyville Christmas Lights
Re: True 3D?
« Reply #19 on: February 23, 2017, 12:02:35 PM »
Do I get my dollar?

Offline kevinp

  • Sr. Member
  • ****
  • Posts: 373
    • View Profile
Re: True 3D?
« Reply #20 on: February 23, 2017, 01:03:44 PM »
Do I get my dollar?

American or Australian?   ;D
Kevin Pankratz
Blaine MN

Offline arw01

  • Full Member
  • ***
  • Posts: 191
    • View Profile
Re: True 3D?
« Reply #21 on: February 23, 2017, 02:53:06 PM »
Do I get my dollar?

Sure, send me your paypal address and I will send you the $1.00 aud, that's what $0.60 American these days?

Offline MrRocketman

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: True 3D?
« Reply #22 on: February 27, 2017, 11:31:49 PM »
How do I go about submitting a pull request? Seems I need to have permissions. I dipped my toes in by fixing a small bug in the single line effect.


Sent from my iPhone using Tapatalk

Offline keithsw1111

  • Administrator
  • Hero Member
  • *****
  • Posts: 2733
    • View Profile
    • Kellyville Christmas Lights
Re: True 3D?
« Reply #23 on: February 27, 2017, 11:44:49 PM »
I didn't think you needed permissions to create the pull request. Only to do the merge.

Offline sean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1727
    • View Profile
    • Xlights and Nutcracker Forum
Re: True 3D?
« Reply #24 on: February 28, 2017, 12:56:56 AM »
I didn't think you needed permissions to create the pull request. Only to do the merge.

You dont need to do a pull, just download the zip of entire code.

Sean
Littleton, CO
Latest releases http://nutcracker123.com/nutcracker/releases
xLights/Nutcracker Forum http://nutcracker123.com/forum/index.php
Fbook [url=https://www.facebook.com/groups/62

Offline MrRocketman

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: True 3D?
« Reply #25 on: February 28, 2017, 01:09:01 AM »
Ah well duh. Guess I had to fork it first. Pull request submitted.

What's the process for becoming an actual contributor on the main repo? Submit more good pull requests? Ha


Sent from my iPhone using Tapatalk

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: True 3D?
« Reply #26 on: February 28, 2017, 07:10:36 AM »
Well I think Dan will need to review that change since I believe he wrote SingleStrand effect.  Just remember one man's bug is another man's feature.  You could be altering behavior for others that have fine tuned exactly how they wanted their SingleStrand effect to look.  That's the hardest part of implementing changes in our code base.  You can't just alter things without considering backwards compatibility.

Offline sean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1727
    • View Profile
    • Xlights and Nutcracker Forum
Re: True 3D?
« Reply #27 on: February 28, 2017, 08:48:38 AM »
our dev team is made of three main developers: Gil Jones, Dan Kulp and keith Westley. We do not meet and discuss what a developer wants to do, the general rule is to not change behavior of previous effects unless they are bugs.

The 40 or so effects have primary owners. For example Chris Debenham enhanced the pinwheel effect so it would save 4 times faster (performance enhancement) and also eliminated the holes that occurred on the outside edges of large models. Both very good things, unfortunately this changed the behavior of the pinwheel effect. People had bought sequences from Lilia for Pentatonix's Hallelujah. The highlight of that sequence was a pinwheel effect that created a cross. The new pinwheel code dropped one arm of the cross.

Testing that our changes do not break behavior but still allow for performance improvements is one of our challenges.

Cleanest thing for new developers to the team is to create a new effect (try downloading Madrix and using their demo code to get some ideas of effects that we might add). Also finding a real bug is a good start too. We just need to make sure the idiom "You always create a defect when you solve one" has been tested.

What is your git hub user? I will add you to the team. You can then work in your own branch.



Sean
Littleton, CO
Latest releases http://nutcracker123.com/nutcracker/releases
xLights/Nutcracker Forum http://nutcracker123.com/forum/index.php
Fbook [url=https://www.facebook.com/groups/62

Offline MrRocketman

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: True 3D?
« Reply #28 on: February 28, 2017, 03:27:13 PM »
Okay great. Thank you for the info. I'll branch and work on a new effect!

My GitHub username is MrRocketman.

Thanks!