Hacker News new | ask | show | jobs
by daredevildave 3651 days ago
Sadly it doesn't seem to generate UVs for the models. But using the cube projection in Blender seems to do an OK job.

Add a skybox and a couple of simple particle effects in PlayCanvas.

And we have some WebGL spaceships :-)

https://playcanv.as/p/kZtPZpnH/

7 comments

Awesome!

I took a screen-shot, to help out the computationally challenged:

http://www.weegeeks.com/upload/a1studmuffin-daredevildave-sp...

Genuine question - why are UVs always a huge issue? Isn't it trivial to generate a UV from the actual 3D model? Or do you mean that they just don't give you an image that actually fits the model?
It's trivial to generate "some" UVs. However, in this case there is a texture with a lighting pattern as part of the generator. Ideally the model would be unwrapped so that the correct areas of the texture correspond to the correct area of the model.

In the case of an artist working from scratch the skill is generating UVs that allow the artist to easily paint the texture and provide an even area for each part of the model. Otherwise some areas will be stretched and blurry.

Pardon my ignorance, but what are UVs?
https://en.wikipedia.org/wiki/UV_mapping

Though daredevildave may have meant environment mapping instead.

Nope, that's right. There is no UV co-ordinates generated in the blender script. (Well, I think it uses world space cube for UVs, which is an option that PlayCanvas doesn't support).

I used the automatic Cube Projection unwrap in blender before exporting to FBX and importing into PlayCanvas.

i agree with that!
Thanks!
Texture mapping(U ~= X, V ~= Y).
nice mapping
yes it is
Holy crap that site basically stops my computer.
That feeling when your cell phone is better than someone's desktop.
Firefox yes. Safari no.

Chrome though would start opening everything on Google apps.

Hmm. I only buy X220s (almost 6 years old now) (because they are strong, long (15 hrs+ under linux) battery life and replaceable battery etc etc) and they are very cheap (I picked up a few for $70 per system) and was prepared for crash & burn but actually it runs this demo under Linux Chrome without issues. What GPU do you have?
Oops, also just realized there were some 4096 textures in there. I've resized them down.
Runs flawlessly on my 2015 MBP on it's native display.

Drag the window over to my cinema display, and holy 4fps and crash batman!

Interesting, could be the particle effects. They fall back to CPU if your machine doesn't support float textures.
Very cool -- what about sliders to feed parameters for new ship generation :)
Unfortunately, the ship generation is done offline in Blender. I'd have to re-write his ship generator in javascript.
That's pretty awesome.
UVs are not needed any more since a long time. They have many drawbacks (the first one being that they are explicit).

The renderers I used in production, when I left the VFX industry ca. 2010, all supported PTEX [http://ptex.us/ptexpaper.html].

Blender seems to have WIP support for it too nowadays [ https://wiki.blender.org/index.php/User:Nicholasbishop/Ptex]

They are still very much required for games/real-time rendering :-)

I hadn't heard ptex before, it's interesting stuff. Sounds like the reason it isn't in general usage for realtime stuff is the memory overhead: http://sebastiansylvan.com/post/casting-a-critical-eye-on-gp...