Closed Thread Icon

Preserved Topic: 3D using VML (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=18553" title="Pages that link to Preserved Topic: 3D using VML (Page 1 of 1)" rel="nofollow" >Preserved Topic: 3D using VML <span class="small">(Page 1 of 1)</span>\

 
amikael
Bipolar (III) Inmate

From: övik
Insane since: Dec 2002

posted posted 12-13-2002 02:26

Anyone interested in helping me boosting this?
It's Space3D I'm thinking of.
http://www.naltabyte.se/space

It needs to be improved in so many ways I can't count them..

(^-^)b

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 12-13-2002 08:31

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

amikael
Bipolar (III) Inmate

From: övik
Insane since: Dec 2002

posted posted 12-13-2002 10:12

I dont care about the speed.
I'm more interested in boosting the quality, especially the z-indexing.
I got the speed covered for later, and I will reuse the engine for SVG once it's trimmed to handle the shapes better.
This is for the time being, since it does'nt require anything in particular to run in a browser as of yet.

(^-^)b

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 12-13-2002 19:11

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

amikael
Bipolar (III) Inmate

From: övik
Insane since: Dec 2002

posted posted 12-15-2002 23:23

This is'nt a raytracer.
Instead it's using vector graphics to draw 3D-polylines to create shapes, according to x, y and angle.
This is because it's using PI as the base for calculations, to draw the images faster.
(This far out, this high/low, and in that anglular direction from the centre)
It's fast enough to manipulate the images in realtime since the only value I need to change/update is the angular value, but the tricky part is the z-indexing.
The reason for this is that a shape is built from several subshapes and it's a bit tricky if one subshape is folded around an other, to decide which is infront/above.
All I have is a string of points, and I process each individually to calculate a 'statistic evaluation' expressed as a value.
It works for the most part, but sometimes I miss.(bugger)

function setIndex(y,a,h,t,x,s)
{

/*
a = angular value
y = y
x = x
h = height of sphere, if this is lower that 0, the image is upside down
t = adjustment I use if something has gone awfully wrong earlier in the chain
s = value to be manipulated to affect the strength of the index-value I hope will come of this...
*/

var c=cutData(a);

/*
cutdata() translates the angle to 90 to -90 values from back to front
The eval() functions is due to the fact that I could'nt get parseInt to work
*/

if(h >= 0){
var z=(c-(y*s));
x=eval(x+"+"+c);
z=eval(z+"+"+x);
}

else if(h <= 0){
var z=(c+(y*s));
x=eval(x+"+"+c);
z=eval(z+"+"+x);}

if(t!=0){
z=eval(z+"+"+t);
}

if(keys[10] > z && h >= 0){
keys[10]=z;
}

else if(keys[1] <= z && h < 0){
keys[10]=z;
}
}

As you can see, it's really clumsy, so I'll kill for a better solution.
Anyone??



(^-^)b

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 12-21-2002 21:57

amikael: I just re-arranged your code

code:
function setIndex(y,a,h,t,x,s)
{
/*
a = angular value
y = y
x = x
h = height of sphere, if this is lower that 0, the image is upside down
t = adjustment I use if something has gone awfully wrong earlier in the chain
s = value to be manipulated to affect the strength of the index-value I hope will come of this...
*/

var z = cutData( a )

/*
cutdata() translates the angle to 90 to -90 values from back to front
The eval() functions is due to the fact that I could'nt get parseInt to work
*/

x += z
z += x+t+y*(h<0?-s:s)


if( h<0?keys[ 1 ]<=z:keys[ 10 ]>z )
keys[ 10 ] = z
}


I removed all the evals. The code is not much obfuscated and should be a little faster ( at least it's meant to be )

Regarding your goal, I don't konw if your main goal is to render some great pictures or to make a 3D API.
In the first case, then I don't understand why use VML which is ( to my knowledge ) damn limitated and slow compared to SHOCKWAVE 3D which works pretty well on many platform and which is especially designed to make 3D.
In the second case, I think you'd get better and faster results if you make an INTERFACE between JAVASCRIPT and a SHOCKWAVE 3D file.

Please enlight me

Mathieu "POÏ" HENRI

[This message has been edited by poi (edited 12-21-2002).]

amikael
Bipolar (III) Inmate

From: övik
Insane since: Dec 2002

posted posted 12-22-2002 02:02

Why?
For one simple reason, for the fun of it.
As a developer, I'm interested in the mechanics.
And just because I'm sketching this using javascript, doesn't mean I can't port it to C++ at any given moment, not using VML at all, giving me something far more powerful..
The only element I actually use from VML is the polyline, and that works identical for most all technologies creating vectorized graphics, so I'm in no way tied down to JavaScript, or VML for that matter.
Trust me, I can put this to good use... :-)


(^-^)b

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 12-22-2002 12:35

amikael: Sounds like a great project - why not indeed. I think it is important to show where we can push these kind of things

Have you thought of using a server with Batik to make some of the work easier? I've not used Batik but am interested in it.

SVG links:
http://development.gurusnetwork.com/links/151/

___________________
Emps

FAQs: Emperor

« BackwardsOnwards »

Show Forum Drop Down Menu