Looking for CubicVR / HTML5 / WebGL 3d Engine coder

Discussions about Coding and Scripting
Post Reply
Rork
Novice
Posts: 10
Joined: Sun May 10, 2009 9:26 am
Contact:

Looking for CubicVR / HTML5 / WebGL 3d Engine coder

Post by Rork »

I'm looking for some help fixing a browser based Mesh viewer: (Current state).

I currently use the CubicVR 3D Engine with the XMLbackend (demo source) but it's possible to trade that for another 3D Engine.

What I want is:
- Rotating the mesh upright
- Scaling the mesh
- Improving lighting, shininess etc
- Smoothing the mesh (at least I think that's what UT does)
- Have better camera / mesh controls (rotate like in the UT skin chooser)
- Texture swapping?
- Animations?

I'm not sure what I'm going to do with the code yet, either use it myself, in cooperation with some others or just release it (I guess that will be done at some point). There's even a small chance that it's going to sit on my harddrive, if anyone wants to have a go at it the xml can be downloaded here

(Model / skin used: Rumiko by Roger [666] Bacon)
User avatar
Feralidragon
Godlike
Posts: 5493
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: Looking for CubicVR / HTML5 / WebGL 3d Engine coder

Post by Feralidragon »

Looks like an interesting project. I never heard about CubicVR, but perhaps for a few things you should look at its wiki.
For instance, to scale and translate 3D models it seems you have to use CubicVR Transform class:
https://github.com/cjcliffe/CubicVR.js/wiki/Transform

For the rest you probably should look here:
https://github.com/cjcliffe/CubicVR.js/ ... -Reference

Seems a rather straight forward API for web.
Rork
Novice
Posts: 10
Joined: Sun May 10, 2009 9:26 am
Contact:

Re: Looking for CubicVR / HTML5 / WebGL 3d Engine coder

Post by Rork »

Unfortunately my javascript skills are 10 years behind, I guess I could update these somewhat but wish to focus on the backend (a script that extracts various things) hence I hope someone else wants to do the main work on the frontend. Also the more advanced features like good lighting, texture swapping and animation are more then I want to learn right now. The latter two I don't care much about at the moment but would be nice to include.
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Looking for CubicVR / HTML5 / WebGL 3d Engine coder

Post by JackGriffin »

This is interesting. I wish I understood it better. What are the uses for something like this aside from the obvious of model presentation?
So long, and thanks for all the fish
Rork
Novice
Posts: 10
Joined: Sun May 10, 2009 9:26 am
Contact:

Re: Looking for CubicVR / HTML5 / WebGL 3d Engine coder

Post by Rork »

Other uses are whatever you can imagine (and build):
- Dynamic model presentation (no need to make a screenshot or extract the data, just upload the package and point a script to the filename)
- Usage of UT models in other games
- Building a live preview skinning app
- Building a modelling app
- Porting UT to the browser/other platforms
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Looking for CubicVR / HTML5 / WebGL 3d Engine coder

Post by JackGriffin »

Iniquitous did something like this on his site to showcase his monsters for 2k4. He's a really sharp guy, you might look him up about this.
So long, and thanks for all the fish
User avatar
tornvertex
Posts: 1
Joined: Fri Jan 18, 2013 9:58 pm

Re: Looking for CubicVR / HTML5 / WebGL 3d Engine coder

Post by tornvertex »

I've been studying CubicVR 3D as my WebGL API of choice. Believe me, it's one of the best WebGL API's you'll find out there currently. Also, you don't need to know much Javascript to work with it - my Javascript skills are a bit out of shape too. What you really need to know well is the CubicVR API.

Anyways, I am a bit in a hurry right now so I am just going answer to the topic regarding "Improving lighting, shininess" (reflection). From the Github documentation page examples (I added some comments to help the understanding):

Code: Select all

//for reflections you want to create an extra texture that you will apply to the mesh (reflection texture):
	var envTex = new CubicVR.Texture("../images/fract_reflections.jpg");  
	
   //once initialized you can apply the reflection texture to each material's texture used in the mesh:
	for (var i= 0; i < shipMesh.materials.length; i++) {
	      var mat = shipMesh.materials[i];

         //apply reflection texture to material texture. It's like applying a shinny film over the opaque texture:
	      mat.setTexture(envTex,CubicVR.enums.texture.map.ENVSPHERE);

         //reflection level
	      mat.env_amount=0.2;
	}
You might want to apply this piece of code directly under:

Code: Select all

      var shipObject = new CubicVR.SceneObject(shipMesh);
I do not guarantee as I am still studying it myself. Good luck.

Reflection texture from the example files used in a car mesh and water mesh (you can also search the web for more reflection textures):
Reflection texture for CubicVR 3D mesh example.
Reflection texture for CubicVR 3D mesh example.
fract_reflections.jpg (40.44 KiB) Viewed 2509 times
User avatar
Phorce
Experienced
Posts: 107
Joined: Tue Apr 14, 2009 8:24 pm
Personal rank: Sgt. Nutz
Location: UK
Contact:

Re: Looking for CubicVR / HTML5 / WebGL 3d Engine coder

Post by Phorce »

This makes a lot of sense for mods that regularly publish news releases containing model renders. Static screenshots should always be there for non-3d capable devices, printing, sending to friends, etc. That's easy enough to do with the browser javascript allowing for a fall back. But now with have the technology to fully preview shiny new mod models that a mod follower can rotate around.

I once saw a project that could translate full UT maps into (the now defunct) VRML. Not sure if it ever became fully functional. But doing this for HTML5/WebGL could be quite a job and should maybe be done after a simple model viewer 8)
"Weapons! ... for all occasions." Bill Hicks
Post Reply