idflood / ThreeNodes.js

vvvv "clone" in javascript/webgl
http://idflood.github.com/ThreeNodes.js/
Other
2.18k stars 316 forks source link

Using Texture, Shadows and Strings #9

Open ChanceTheMaker opened 12 years ago

ChanceTheMaker commented 12 years ago

Are these not implemented yet? Can't figure out how to get a texture linked. Screenshot please. Also a shadow demo would be nice.

idflood commented 12 years ago

I've not tested these things recently. For the texture I suspect there will be some crossdomain issue. It was working with a local image on a plane some time ago but I will see if i can make an example.

ChanceTheMaker commented 12 years ago

Hi, I'm running on mown server, so xdomain shouldn't be a problmem for me right now. I'm just not sure how insert the filename inro the node,

idflood commented 12 years ago

I wanted to create examples for texture/string and shadow but you are right, these things are broken. I will try to add tests and then fix them to prevent this from happening again.

ChanceTheMaker commented 12 years ago

Ok. I'm glad it's not just me. I very interested in helping as well.

I'll do a checkout on the repo and see if I can spot anything or fill in any gaps and/or add anything.

I've shown it to some of my colleagues who are some of the best 3D animators in the world who I used to work with. They are really impressed and excited about it as well.

I'm really looking to try to create a city generator with it and another project. So I'm willing to contribute.

I was also looking for ramps/gradients. Maybe you do this with a canvas rendered texture based on uv or something.

And, boolean operations. There is a library called CSG that does booleans. http://learningthreejs.com/data/constructive-solid-geometry-with-csg-js/

and also physics this... http://jeromeetienne.github.com/microphysics.js/playground/

Another awesome feature I used to have/like was live on-demand (toggleable) thumbnails at each relevant node.

Cheers, Chance

-----Original Message----- From: idflood [mailto:reply@reply.github.com] Sent: Monday, December 19, 2011 10:42 PM To: aobjects Subject: Re: [ThreeNodes.js] Using Texture, Shadows and Strings (#9)

I wanted to create examples for texture/string and shadow but you are right, these things are broken. I will try to add tests and then fix them to prevent this from happening again.


Reply to this email directly or view it on GitHub: https://github.com/idflood/ThreeNodes.js/issues/9#issuecomment-3215276

idflood commented 12 years ago

great links :)

Let me know when you start creating the city generator, I've always been interested in this. Here are two interesting documents on this subject: http://www.vision.ee.ethz.ch/~pmueller/documents/procedural_modeling_of_cities__siggraph2001.pdf http://www.vision.ee.ethz.ch/~pmueller/documents/mueller.procedural_modeling_of_buildings.SG2006.web-version.pdf

Now on the reported issues, I think the string issue should be easy to fix. With some luck it's just that the string node doesn't create the sidebar input when selected.

The shadow issue may be more difficult since I had to modify three.js to make it work. I suspect I didn't made all necessary changes when I updated to three.js r46.

ChanceTheMaker commented 12 years ago

I see. So you have to run a modded version of Three.js? Bummer. Are there many changes?

I have had to do a lot of fixing to make some really good examples work. The good thing is that I learned some really great stuff along the way.

I'm including the file I just started (very very rough) of the city generator. So you get an idea of what I'm experimenting with. Would be much better with textures and shadow. I think I need a faster computer to dev with this.

I am also interested in repurposing the nodes for a completely different use.

-----Original Message----- From: idflood [mailto:reply@reply.github.com] Sent: Tuesday, December 20, 2011 1:09 AM To: aobjects Subject: Re: [ThreeNodes.js] Using Texture, Shadows and Strings (#9)

great links :)

Let me know when you start creating the city generator, I've always been interested in this. Here are two interesting documents on this subject: http://www.vision.ee.ethz.ch/~pmueller/documents/procedural_modeling_of_cities__siggraph2001.pdf http://www.vision.ee.ethz.ch/~pmueller/documents/mueller.procedural_modeling_of_buildings.SG2006.web-version.pdf

Now on the reported issues, I think the string issue should be easy to fix. With some luck it's just that the string node doesn't create the sidebar input when selected.

The shadow issue may be more difficult since I had to modify three.js to make it work. I suspect I didn't made all necessary changes when I updated to three.js r46.


Reply to this email directly or view it on GitHub: https://github.com/idflood/ThreeNodes.js/issues/9#issuecomment-3216319

idflood commented 12 years ago

The modifications are related to this issue: https://github.com/mrdoob/three.js/issues/598 This is the basic modification from the previous verions (pre r46): https://github.com/mrdoob/three.js/commit/1ab47a5ef5b21469f43d728ea6cdc10c691cf7bd

It had some conflicts when merging with the new version. Something certainly went wrong and I believe there may be some little piece of modification missing.

edit: in fact this is working I think. I guess that the problem is that the material node should rebuild the shader when there is a change on different options about cast/receive shadow.

idflood commented 12 years ago

I've fixed the string in this commit: a68d39b652b5a01dbfce8fef4682264aa276f12c Also added the missing map attribute in lambert and phong: a68d39b652b5a01dbfce8fef4682264aa276f12c There is also a new example: 82fbd520fda0dcc369befe2a22b5de35cd41682b

This will be pushed to the gh-pages branch later, hopefully I will be able to fix the shadows in the next hour.

ChanceTheMaker commented 12 years ago

Nice. Can't wait to try out the textures.

-----Original Message----- From: idflood [mailto:reply@reply.github.com] Sent: Tuesday, December 20, 2011 11:02 AM To: aobjects Subject: Re: [ThreeNodes.js] Using Texture, Shadows and Strings (#9)

I've fixed the string in this commit: a68d39b652b5a01dbfce8fef4682264aa276f12c Also added the missing map attribute in lambert and phong: a68d39b652b5a01dbfce8fef4682264aa276f12c There is also a new example: 82fbd520fda0dcc369befe2a22b5de35cd41682b

This will be pushed to the gh-pages branch later, hopefully I will be able to fix the shadows in the next hour.


Reply to this email directly or view it on GitHub: https://github.com/idflood/ThreeNodes.js/issues/9#issuecomment-3223455

ChanceTheMaker commented 12 years ago

Awesome.

Everything is working with the exception of shadows.

I even started creating some of my own custom nodes

On Dec 20, 2011, at 11:02, idfloodreply@reply.github.com wrote:

I've fixed the string in this commit: a68d39b652b5a01dbfce8fef4682264aa276f12c Also added the missing map attribute in lambert and phong: a68d39b652b5a01dbfce8fef4682264aa276f12c There is also a new example: 82fbd520fda0dcc369befe2a22b5de35cd41682b

This will be pushed to the gh-pages branch later, hopefully I will be able to fix the shadows in the next hour.


Reply to this email directly or view it on GitHub: https://github.com/idflood/ThreeNodes.js/issues/9#issuecomment-3223455

idflood commented 12 years ago

Cool :)

Just keep in mind that it's still really experimental. I try on each update to not break things, the json save and load format is one of the most problematic thing. I will try to keep a backward compatible format but it's not 100% sure that it will be possible.

ChanceTheMaker commented 12 years ago

If you break the format, we may still be able to convert old to new.

On Dec 21, 2011, at 7:14, idfloodreply@reply.github.com wrote:

Cool :)

Just keep in mind that it's still really experimental. I try on each update to not break things, the json save and load format is one of the most problematic thing. I will try to keep a backward compatible format but it's not 100% sure that it will be possible.


Reply to this email directly or view it on GitHub: https://github.com/idflood/ThreeNodes.js/issues/9#issuecomment-3234802

ChanceTheMaker commented 12 years ago

Hey,

I see you've added fog and the timeline shelf. Can you add any keyframes or channels yet? Can't wait to see that.

We'll need to add expressions if possible

Anything else?

You can see a few of the things, I've built here. http://farplanets.com/zc3D/ThreeNodes2/public/

Open the attached files with this version to see the textures.

I added a ticket on GitHub with all my carefully studied feature requests on it.

Thanks, Chance

-----Original Message----- From: idflood [mailto:reply@reply.github.com] Sent: Wednesday, December 21, 2011 7:14 AM To: aobjects Subject: Re: [ThreeNodes.js] Using Texture, Shadows and Strings (#9)

Cool :)

Just keep in mind that it's still really experimental. I try on each update to not break things, the json save and load format is one of the most problematic thing. I will try to keep a backward compatible format but it's not 100% sure that it will be possible.


Reply to this email directly or view it on GitHub: https://github.com/idflood/ThreeNodes.js/issues/9#issuecomment-3234802

ChanceTheMaker commented 12 years ago

Also,

Renaming is cool (Although, I still think cursor should be the hand or pointer still since you drag with the title. It's a little harder to tell how to do that and dragging with "I" bar is a little wonky.

Also, I just noticed that the nodes don't keep their state after reload with respect to windowshade/hide/show.

-----Original Message----- From: idflood [mailto:reply@reply.github.com] Sent: Wednesday, December 21, 2011 7:14 AM To: aobjects Subject: Re: [ThreeNodes.js] Using Texture, Shadows and Strings (#9)

Cool :)

Just keep in mind that it's still really experimental. I try on each update to not break things, the json save and load format is one of the most problematic thing. I will try to keep a backward compatible format but it's not 100% sure that it will be possible.


Reply to this email directly or view it on GitHub: https://github.com/idflood/ThreeNodes.js/issues/9#issuecomment-3234802

idflood commented 12 years ago

I'm missing the attached files. I would love to see what you did : )

You can add keyframes to any number fields. Right now "number" and "vector3" fields at least.

idflood commented 12 years ago

That's really awesome, glad to have asked for the files :)

idflood commented 12 years ago

Thanks. The installation setup is only required to develop the project. It automatically compiles coffeescript files to javascript, sass files to css and so on. I should make that clearer.

I've never imagined that threenodes.js could be used for games but why not. The project sounds really interesting, tell me when you have more information.

idflood commented 12 years ago

Cool, that sounds really interesting. Since I'm doing threenodes.js on my freetime you can include me in the 'package'. I'm not sure about what the package really means, but a game project sounds really motivating.