WebmotherfuckinGL

shindig

New member
Jul 21, 2012
1,290
10
0
Seattle, WA
When webGL gets supported by all browsers it's going to be so awesome. I found an easy way to generate 3d environments from 3d models.

I made 2 examples, look at the source, how simple it is.
v79n5d.png

Example 1: http://leefromseattle.com/json/desert.html

x3a3df.png

Example 2: http://leefromseattle.com/json/island.html



Video:
WebGL Demo - YouTube

Might be neat for rotating banners or something, or camera fly throughs.



I also found a cool tool from UCLA that lets you make 3d meshes from 2d pngs based on the transparency (alpha).

image15.png

w2d2wz.png


Good for little items in games like coins, stars, and non rectangular terrains in 2d/2.5d games. It generates colliders so your character can walk along curves.
 
  • Like
Reactions: bluechinagroup


Oh yes, this will be great for my client that owns a country and western bar. They've always wanted a 3D site, complete with cactus's that looks like a Disney cartoon game!
 
sigh....you can use whatever 3d models, I threw some in from my game assets for a "demo" of meshes being textured in js. lol sorry it's not your taste, it doesn't have to spin and you could tie it to keyboard or mouse input.

I make kids games, hence "cartoony" models, thanks for comparing me to disney though.
 
With the kinect you can scan and generate meshes/textures of real shit as well.

[ame=http://www.youtube.com/watch?v=XmRLSgoaYj8]3d modeling and texturing with the kinect sensor - YouTube[/ame]

Then throw it in the native browser with webGL. Works on my samsung tab 7 tablet, but the textures look like shit and it's slow.
 
lol @ the haters thinking shindig was using this as an example of how future websites could be made!!1

for browser based games it's the next gen.
 
Is j3d still being updated?

Not in 9+ months.

I just use it to rebuild the objects which are stored in a json string. In the unity game engine you can drag/drop 3d meshes wherever, then serialize to json string.

Then you feed it through j3d to reconstruct everything and can simply access the meshes by name to rotate/move them. In the example it's simply rotating the "root" object which everything else is a child of.

I threw a girl in:
[ame=http://www.youtube.com/watch?v=vcJIl4ZateM]WebGL2.0 - YouTube[/ame]
http://leefromseattle.com/json/real.html
 
Not in 9+ months.

I just use it to rebuild the objects which are stored in a json string. In the unity game engine you can drag/drop 3d meshes wherever, then serialize to json string.

Then you feed it through j3d to reconstruct everything and can simply access the meshes by name to rotate/move them. In the example it's simply rotating the "root" object which everything else is a child of.

I threw a girl in:
WebGL2.0 - YouTube
http://leefromseattle.com/json/real.html

Ya, been a while since I checked it out. Unity will have it's full webgl exporter out this winter at least.
 
Ya, been a while since I checked it out. Unity will have it's full webgl exporter out this winter at least.

Yeah they just added windows rt and blackberry publishing from Unity. In some ways it's easier than web dev because you can write once in C#, and publish native apps to half a dozen platforms with minimal effort.

There are so many fucking plugins available from 3rd parties with the engine, it's nuts.

At work I've got so many gadgets to fuck around with in unity, 2x leap motion sensors, microsoft kinect for windows sensor, asus xtion pro sensor, 2x sphero ar balls, oculus rift, half dozen tablets, etc.

It's fun as hell.
 
Check out how these 3d skyboxes look in the browser....
Bluesky1.jpg

Bluesky2.jpg

Demo: http://leefromseattle.com/jsonB/page.html

redsky2.jpg

Demo 2: http://leefromseattle.com/jsonB/skybox2.html



That's after I reduced them in size, not sure how big I can use in the browser, the originals are 2048x2048px 6x images I reduced to 1024x1024. Would take longer to load with 2048, but probably look really sick.

The canvas can be resized to whatever, for a banner or something with 3d logo moving around, or orbiting a space shuttle.
 
Which browsers currently support Web GL. Awesome thread Shindig. Fuck the haters. They're god damn small minded idiots who don't see the big picture.

Currently IE is the only holdout and they're adding it to IE 11. The others have supported it for a while....

It doesn't work on ios mobile browsers but works on android and blackberry mobile browsers. lol blackberry.

But all the code is just javascript so it should be able to run anywhere.

I got my leap motion sensor working to move div elements with your hand movement, would be sick to make it control the camera.