[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4505: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4507: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4508: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4509: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
RabidHaMsTeR.Org • View topic - input of 3d models

input of 3d models

Suggestions + Info on development of R4 visuals

Moderators: rabidhamster, Rovastar

input of 3d models

Postby m_vav » Thu Sep 16, 2004 4:55 am

I found a better way that the other one i posted about to get 3d models into r4. I use program 3d object converter 3.0 http://web.axelero.hu/karpo/3dc32300.zip and I use 3d studio max 6. Before the scale was hit or miss, now its set in stone by using organic3.raw as a reference.

To get the proper scale open your 3d model in 3d studio max and organic3.raw with 3d object converter. Its a raw triangle object that needs to be converted and saved as a VRLM Scene V1.0 ASCII (*.wrl). 3d studio max will then import this file using import in the file tool bar. Leave the check boxes checked. Then scale your model to the organic3 object size. Delete the organic3 model in the 3d studio max scene.

Export ( using export in file toolbar) your model as a ASCII Scene Export (.ASE) file in max. Then open your model you just saved in 3d object converter. And save it as a RAW Triangles (*.raw) file. Put this file you just saved into the model folder should be: R4\data\model in r4. Edit organicbackground.r4 in notepad from the predefine folder. Change the filename organic3.raw to the name you used to save your .raw file. See example of where the file name is in this chunk of organicbackground.r4.

void init() {
black.col = 0;
strcpy(tex.filename,"r4_fullscreen_2.jpg");
strcpy(mod.filename,"organic3.raw");
strcpy(mod.shader,"T0;GSS;GTS;B10;D;");

Then start up r4 and you should see your model in the scene.

I am not a programmer so the one thing I can't figure out how to set yet is the orientation of the object. Mine never seem to end up in the orientation that i want them to be in. Any help with this part would be great. I have been just changing values of numbers trying to figure out what each one does in organicbackground.r4.

The only way i have gotten the orientation to be right is to use the model i made in max for reference then duplicate the object a little bigger over the one that is the reference and convert it over again. It doesn't work every time and figuring out how to mess with the orientation of the object would be better.

The reason I have tried to figure this out is that I do a lot of 3d modeling in 3d studio max and it won't output a .raw triangles file. I didn't want to have to buy yet another 3d modeling program so i found this shareware that will allow you to use these functions even if it is not registered. The 3d object converter won't open all the models in r4 but it will open organic3.raw.

I will put up a few scenes using this conversion process in a few days. www.turbosquid.com has some free good models that you can grab up to use as a test to try this out. You just have to search for the free models. But that will give you a start if you aren't a modeler.
Last edited by m_vav on Thu Sep 16, 2004 5:22 am, edited 1 time in total.
m_vav
 
Posts: 19
Joined: Thu Jan 01, 2004 3:20 am

Postby m_vav » Thu Sep 16, 2004 5:04 am

m_vav
 
Posts: 19
Joined: Thu Jan 01, 2004 3:20 am

Postby rabidhamster » Thu Sep 16, 2004 8:14 am

rabidhamster
Site Admin
 
Posts: 1100
Joined: Fri Mar 21, 2003 12:31 pm
Location: Cambridge, England

Postby m_vav » Fri Sep 17, 2004 11:30 pm

yes there is a scale variable its at the bottom of this chunk

radius = 3.4 - (sounda*0.5);
mod.eyex = radius*sin(rot)*cos(tilt); // pan around the object
mod.eyey = radius*cos(rot)*cos(tilt);
mod.eyez = radius*sin(tilt);
mod.upx = sin(rot)*sin(tilt); // set up vector
mod.upy = cos(rot)*sin(tilt);
mod.upz = -cos(tilt);
mod.lookx = cos(rot)*1;
mod.looky = -sin(rot)*1;
mod.lookz = 0.0; // look up a bit
mod.scale = 0.75;

The way to get the model in is just using the organic3 object to get close to the scale so you can change this scale variable to what size you like. Kind of a fine turing variable.

I still can't figure out exactly how to change the mod.eyex, y ,z to do exactly what i want. Been messing with it a little but i just can't find a way to edit its default angle other than use the object as a reference see how its orientation is in the scene, then make another model over the top of it.

Damn i wish i would have kept up with programming instead of stopping with basic so long ago. I went with electronics theory and design instead. Oh well i guess i will just have to start cracking open books again.

I think that it requires a bit of editing and inserting a bit of code that would make an orientation variable. But thats just really a shot in the dark.

A loader would be the bomb where you could look from the angle of the camera like max and when you pop it in its exactly the same angle for eyex, y, z. Just a thought.
m_vav
 
Posts: 19
Joined: Thu Jan 01, 2004 3:20 am

Postby rabidhamster » Mon Sep 20, 2004 8:13 am

I can't remember if I left it in, but there was a scene called modelmove that you can tweak. I think the tweaks allowed you to move the camera around, and the web interface would show you the X,Y and Z coordinates. Have a look for it - you should be able to just copy it and change the model filename, then use the values produced in another scene.

I'll look at adding teh preview feature. Ideally you'd be able to specify movements too, so it could jump between different viewpoints. That would be part of the Java scene creator though i reckon. I'll try and put some more work into it.

You may also find it helpful to note that putting sin(x) (where x is a function like 2*time) in one axis, and cos(x) in the other produces a circle over time - multiplying one side by a value makes an ellipse. that may help with the understanding of whats actually happening. Best bet is to remove the sin's and cos's, get it lined up, then add them back in multiplied by small values until you get the object moving the way you want.

- Gordon
rabidhamster
Site Admin
 
Posts: 1100
Joined: Fri Mar 21, 2003 12:31 pm
Location: Cambridge, England


Return to R4

Who is online

Users browsing this forum: No registered users and 9 guests

cron