Ox003D Update
I describe some new things about the project. I write interfaces for importing and exporting models. SDK is available to everyone http://bit.ly/31LAtQe. Here sample from obj import\export plugin: /// import iInterface->begin_model(); iInterface->begin_polygon(); ... iInterface->begin_vertex( pos_index ); iInterface->set_position( v.x, v.y, v.z ); iInterface->set_uv( u.x, u.y ); iInterface->set_normal( n.x, n.y, n.z ); iInterface->end_vertex(); ... iInterface->end_polygon( weld ); iInterface->set_name( OxString( prev_word.data() ).data() ); if( generate_normals ) iInterface->generate_normals(); iInterface->generate_BT(); iInterface->end_model(); /// export u32 num_of_selected_objects = cInterface->getNumOfSelectedObjects(); auto object = cInterface->getSelectedObject( i ); if( object->getType() == OxObjectType::PolygonObject ){ auto poly_count = object->getPolygonCount(); auto matrix = object->getMatrix(); auto pivot = object->getPivot(); for( u32 i = 0; i < poly_count; ++i ){ auto polygon = object->getPolygon( i ); for( u32 i2 = 0, vcount = polygon->getVertexCount(); i2 < vcount; ++i2 ){ auto vertex = polygon->getVertex( i2 ); if( vertex->getParent() == nullptr ) { auto position = mulVecMat( vertex->getPosition(), matrix ); position += pivot; line = "v "; line += position.x; line += " "; line += position.y; line += " "; line += position.z; line += "\r\n"; file->write( (u8*)line.data(), line.size() ); verts[vertex] = ++position_index; } } } } ______ Now the user can manipulate the selected vertices. I hope next week I will write a material editor and UV editor. This project need help. So far, everything keeps on the enthusiasm. I will be very grateful (this is right word? sorry for my english:) ) to everyone who will help financially. All names will be listed on the splash screen. http://bit.ly/2Y6GtAH
from GameDev.net http://bit.ly/31NDE9Y
I describe some new things about the project. I write interfaces for importing and exporting models. SDK is available to everyone http://bit.ly/31LAtQe. Here sample from obj import\export plugin: /// import iInterface->begin_model(); iInterface->begin_polygon(); ... iInterface->begin_vertex( pos_index ); iInterface->set_position( v.x, v.y, v.z ); iInterface->set_uv( u.x, u.y ); iInterface->set_normal( n.x, n.y, n.z ); iInterface->end_vertex(); ... iInterface->end_polygon( weld ); iInterface->set_name( OxString( prev_word.data() ).data() ); if( generate_normals ) iInterface->generate_normals(); iInterface->generate_BT(); iInterface->end_model(); /// export u32 num_of_selected_objects = cInterface->getNumOfSelectedObjects(); auto object = cInterface->getSelectedObject( i ); if( object->getType() == OxObjectType::PolygonObject ){ auto poly_count = object->getPolygonCount(); auto matrix = object->getMatrix(); auto pivot = object->getPivot(); for( u32 i = 0; i < poly_count; ++i ){ auto polygon = object->getPolygon( i ); for( u32 i2 = 0, vcount = polygon->getVertexCount(); i2 < vcount; ++i2 ){ auto vertex = polygon->getVertex( i2 ); if( vertex->getParent() == nullptr ) { auto position = mulVecMat( vertex->getPosition(), matrix ); position += pivot; line = "v "; line += position.x; line += " "; line += position.y; line += " "; line += position.z; line += "\r\n"; file->write( (u8*)line.data(), line.size() ); verts[vertex] = ++position_index; } } } } ______ Now the user can manipulate the selected vertices. I hope next week I will write a material editor and UV editor. This project need help. So far, everything keeps on the enthusiasm. I will be very grateful (this is right word? sorry for my english:) ) to everyone who will help financially. All names will be listed on the splash screen. http://bit.ly/2Y6GtAH https://ift.tt/eA8V8J June 22, 2019 at 11:45AM
from GameDev.net http://bit.ly/31NDE9Y
I describe some new things about the project. I write interfaces for importing and exporting models. SDK is available to everyone http://bit.ly/31LAtQe. Here sample from obj import\export plugin: /// import iInterface->begin_model(); iInterface->begin_polygon(); ... iInterface->begin_vertex( pos_index ); iInterface->set_position( v.x, v.y, v.z ); iInterface->set_uv( u.x, u.y ); iInterface->set_normal( n.x, n.y, n.z ); iInterface->end_vertex(); ... iInterface->end_polygon( weld ); iInterface->set_name( OxString( prev_word.data() ).data() ); if( generate_normals ) iInterface->generate_normals(); iInterface->generate_BT(); iInterface->end_model(); /// export u32 num_of_selected_objects = cInterface->getNumOfSelectedObjects(); auto object = cInterface->getSelectedObject( i ); if( object->getType() == OxObjectType::PolygonObject ){ auto poly_count = object->getPolygonCount(); auto matrix = object->getMatrix(); auto pivot = object->getPivot(); for( u32 i = 0; i < poly_count; ++i ){ auto polygon = object->getPolygon( i ); for( u32 i2 = 0, vcount = polygon->getVertexCount(); i2 < vcount; ++i2 ){ auto vertex = polygon->getVertex( i2 ); if( vertex->getParent() == nullptr ) { auto position = mulVecMat( vertex->getPosition(), matrix ); position += pivot; line = "v "; line += position.x; line += " "; line += position.y; line += " "; line += position.z; line += "\r\n"; file->write( (u8*)line.data(), line.size() ); verts[vertex] = ++position_index; } } } } ______ Now the user can manipulate the selected vertices. I hope next week I will write a material editor and UV editor. This project need help. So far, everything keeps on the enthusiasm. I will be very grateful (this is right word? sorry for my english:) ) to everyone who will help financially. All names will be listed on the splash screen. http://bit.ly/2Y6GtAH https://ift.tt/eA8V8J June 22, 2019 at 11:45AM
ليست هناك تعليقات